Hi all,
I'm having a problem trying to size droplets in microscope images using (what I can ascertain from t'internet appear to be) standard methods within ImageJ. I've tried various combinations of binarizing, thresholding, edge finding, etc. but I can't find something that works for all of the droplets within an image. I suffer from the dual problems of the droplets appearing "hollow" when binarizing/thresholding (and fill holes doesn't seem to like them) and in many cases droplets touching. A typical image is shown at the following link: https://lh3.googleusercontent.com/G8YVgXf2vj4YKhkOVu-ATD91DBsB7HzmkjfFUgRyVkc=w1280-h960-no I feel like this should be fairly simple, but I'm not making headway. Hence asking the experts! Any advice would be very gratefully received. many thanks, Rico |
Dear Rico,
You can try the following macro, which I created some time ago for exactly the same purpose. Therefore, you still need to install the BioVoxxel Toolbox (if using Fiji from the update sites list. For ImageJ from here: http://www.biovoxxel.de/development/). This is necessary, since one of the functions depends on this library. You might later on still need to adapt it, but for the image you sent to the list it works fairly well. At least the recognition works fine. It determines the size of an ellipse created from your particles. Since some droplet "borders" are a little lighter and more blurry than others, the size determination is not perfect but a fairly good approximation. Hope it helps. cheers, Jan //-----------------------------------macro start run("Set Measurements...", "area mean standard modal min centroid center perimeter bounding fit shape feret's integrated median skewness kurtosis area_fraction stack display redirect=None decimal=3"); thresholds = getList("threshold.methods"); Dialog.create("Threshold"); Dialog.addChoice("Thresholding method: ", thresholds, "Default"); Dialog.show(); Threshold=Dialog.getChoice(); title=getTitle(); run("Duplicate...", "[dup_" + title + "]"); duplicate = getTitle(); selectWindow(duplicate); run("Median...", "radius=2"); run("Enhance Contrast...", "saturated=0 normalize"); //run("Threshold..."); setAutoThreshold(Threshold); run("Convert to Mask"); run("Invert"); run("Analyze Particles...", "size=800-50000 circularity=0.65-1.00 show=Masks exclude"); maskImage = getTitle(); run("Invert LUT"); run("Fill Holes"); selectWindow(maskImage); run("EDM Binary Operations", "iterations=10 operation=dilate"); run("Watershed"); run("Analyze Particles...", "size=0-infinity circularity=0.00-1.00 show=Ellipses"); ellipses = getTitle(); selectWindow(ellipses); run("Invert"); run("Fill Holes"); run("Watershed"); run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Outlines display clear"); setBatchMode(false); close(duplicate); close(maskImage); close(ellipses); //-----------------------------------macro end 2015-07-05 8:39 GMT+02:00 lasercowboy <[hidden email]>: > Hi all, > > I'm having a problem trying to size droplets in microscope images using > (what I can ascertain from t'internet appear to be) standard methods within > ImageJ. > > I've tried various combinations of binarizing, thresholding, edge finding, > etc. but I can't find something that works for all of the droplets within > an > image. I suffer from the dual problems of the droplets appearing "hollow" > when binarizing/thresholding (and fill holes doesn't seem to like them) and > in many cases droplets touching. > > A typical image is shown at the following link: > > > https://lh3.googleusercontent.com/G8YVgXf2vj4YKhkOVu-ATD91DBsB7HzmkjfFUgRyVkc=w1280-h960-no > > I feel like this should be fairly simple, but I'm not making headway. Hence > asking the experts! > > Any advice would be very gratefully received. > > many thanks, > Rico > > > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Sizing-hollow-touching-particles-tp5013424.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- CEO: Dr. rer. nat. Jan Brocher phone: +49 (0)6234 917 03 39 mobile: +49 (0)176 705 746 81 e-mail: [hidden email] info: [hidden email] inquiries: [hidden email] web: www.biovoxxel.de -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Jan,
That works fantastically! Thank you so much. For the reference of future users, I had to add a run("8-bit"); command before the thresholding step (~line 14ish). Thanks again - this will save many hours of manual measurement, and make several students very happy indeed! cheers, Rico |
Free forum by Nabble | Edit this page |