Dear all,
I'm trying to analyse a set (timelapse) of pictures taken from water-in-oil droplets (see picture). I searched on the forum and tried for two hours now, but nothing did work so far (i'm a beginner). First of all I would like to analyse the size of the droplets (over time), secondly I would like to analyse the average greyvalue of the droplets (over time), one or two of them is enough. At the same time I would like to measure the greyvalue of the background. Big thanks for your help! <http://imagej.1557.x6.nabble.com/file/n5011111/DSC_0758_-_Copy.jpg> |
Hi,
there is not image ;) Emanuele
Image Analyst @Ifom-IEO research campus -MI-
|
Mm that's strange :) Thanks for noticing. Here is the image:
|
In reply to this post by rikschuff
Hi Rikschuff,
the problem is how to handle the bright centers of the bubbles. One possibility is detecting them based on their circularity with "Analyze Particles", but this does not work for bubbles at the edge. Apart from this problem, here is a rough idea how it could be done: requires("1.49n"); run("8-bit"); input = getTitle(); run("Subtract Background...", "rolling=20 light sliding"); setThreshold(0, 238); setOption("BlackBackground", false); run("Convert to Mask"); run("Options...", "iterations=2 count=1 pad edm=Overwrite do=Nothing"); run("Close-"); //remove highlights near the edges setThreshold(0, 0); run("Analyze Particles...", "size=100-Infinity circularity=0.7-1.00 show=Masks"); imageCalculator("Add create", "Mask of "+input, input); run("Watershed"); run("Set Measurements...", "mean area centroid redirect=&input decimal=5"); run("Analyze Particles...", "size=100-Infinity circularity=0.80-1.00 show=Nothing exclude display clear summarize"); run("Set Measurements...", "mean area center redirect=&none decimal=5"); You will need some software for post-processing the Results Lists, to track the particles. Maybe you can also convert the output to images with a single dot for the particles, e.g. like this: http://imagejdocu.tudor.lu/doku.php?id=macro:Particle_Properties_to_Image and then use some particle tracker, e.g. this one: http://courses.washington.edu/me333afe/ImageJ_tutorial.html Michael ________________________________________________________________ On Jan 7, 2015, at 17:26, rikschuff wrote: > Dear all, > > I'm trying to analyse a set (timelapse) of pictures taken from water-in-oil > droplets (see picture). I searched on the forum and tried for two hours now, > but nothing did work so far (i'm a beginner). > > First of all I would like to analyse the size of the droplets (over time), > secondly I would like to analyse the average greyvalue of the droplets (over > time), one or two of them is enough. At the same time I would like to > measure the greyvalue of the background. > > Big thanks for your help! > > Mm that's strange :) Thanks for noticing. Here is the image: > <http://imagej.1557.x6.nabble.com/file/n5011120/DSC_0758_-_Copy.jpg> ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Rikschuff,
sorry, I had pasted an old, non-functioning version of the macro. Here is the correct one (still with the restriction that it does not work correctly at the edges): requires("1.49n"); run("8-bit"); input = getTitle(); run("Duplicate...", "title=binary"); run("Subtract Background...", "rolling=20 light sliding"); setThreshold(0, 238); setOption("BlackBackground", false); run("Convert to Mask"); run("Options...", "iterations=2 count=1 pad edm=Overwrite do=Nothing"); run("Close-"); //remove highlights near the edges setThreshold(0, 0); run("Set Measurements...", "mean area centroid redirect=None decimal=5"); run("Analyze Particles...", "size=100-Infinity circularity=0.7-1.00 show=Masks"); imageCalculator("Add create", "Mask of binary", "binary"); run("Watershed"); run("Set Measurements...", "mean area centroid redirect=&input decimal=5"); run("Analyze Particles...", "size=100-Infinity circularity=0.80-1.00 show=Nothing exclude display clear summarize"); run("Set Measurements...", "mean area centroid redirect=None decimal=5"); Michael ________________________________________________________________ On Jan 8, 2015, at 12:11, Michael Schmid wrote: > Hi Rikschuff, > > the problem is how to handle the bright centers of the bubbles. One possibility is detecting them based on their circularity with "Analyze Particles", but this does not work for bubbles at the edge. Apart from this problem, here is a rough idea how it could be done: > > requires("1.49n"); > run("8-bit"); > input = getTitle(); > run("Subtract Background...", "rolling=20 light sliding"); > setThreshold(0, 238); > setOption("BlackBackground", false); > run("Convert to Mask"); > run("Options...", "iterations=2 count=1 pad edm=Overwrite do=Nothing"); > run("Close-"); //remove highlights near the edges > setThreshold(0, 0); > run("Analyze Particles...", "size=100-Infinity circularity=0.7-1.00 show=Masks"); > imageCalculator("Add create", "Mask of "+input, input); > run("Watershed"); > run("Set Measurements...", "mean area centroid redirect=&input decimal=5"); > run("Analyze Particles...", "size=100-Infinity circularity=0.80-1.00 show=Nothing exclude display clear summarize"); > run("Set Measurements...", "mean area center redirect=&none decimal=5"); > > You will need some software for post-processing the Results Lists, to track the particles. Maybe you can also convert the output to images with a single dot for the particles, e.g. like this: > http://imagejdocu.tudor.lu/doku.php?id=macro:Particle_Properties_to_Image > and then use some particle tracker, e.g. this one: > > http://courses.washington.edu/me333afe/ImageJ_tutorial.html > > > Michael > ________________________________________________________________ > On Jan 7, 2015, at 17:26, rikschuff wrote: > >> Dear all, >> >> I'm trying to analyse a set (timelapse) of pictures taken from water-in-oil >> droplets (see picture). I searched on the forum and tried for two hours now, >> but nothing did work so far (i'm a beginner). >> >> First of all I would like to analyse the size of the droplets (over time), >> secondly I would like to analyse the average greyvalue of the droplets (over >> time), one or two of them is enough. At the same time I would like to >> measure the greyvalue of the background. >> >> Big thanks for your help! >> >> Mm that's strange :) Thanks for noticing. Here is the image: >> <http://imagej.1557.x6.nabble.com/file/n5011120/DSC_0758_-_Copy.jpg> ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by rikschuff
Hi Rikschuff, hi Michael,
the following macro gives a very similar result but should not have problems with the background nor the different shading. One part is based on the Difference of Gaussian and this should make the outlines of your droplets here more pronounced. But this currently also just solves the detection step and still not the tracking part. //------------------------------------------ roiManager("reset"); setBatchMode(true); setOption("BlackBackground"); original = getTitle(); run("8-bit"); run("Invert"); selectWindow(original); run("Invert"); sig1 = 0.5; sig2 = 3; run("Duplicate...", "title=DoG"); DoG = getTitle(); run("Duplicate...", "title=intermediate"); intermediate = getTitle(); selectWindow(intermediate); run("Gaussian Blur...", "sigma=sig1"); selectWindow(DoG); run("Gaussian Blur...", "sigma=sig2"); imageCalculator("Subtract", "DoG", "intermediate"); selectWindow(DoG); run("Enhance Contrast...", "saturated=1 normalize"); run("Auto Threshold", "method=Huang white"); run("Fill Holes"); run("Analyze Particles...", "size=500-Infinity circularity=0.80-1.00 show=Masks display exclude clear summarize add"); setBatchMode(false); run("Invert LUT"); //------------------------------------------ Hope it helps. cheers, Jan 2015-01-08 10:53 GMT+01:00 rikschuff <[hidden email]>: > Mm that's strange :) Thanks for noticing. Here is the image: > <http://imagej.1557.x6.nabble.com/file/n5011120/DSC_0758_-_Copy.jpg> > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Analysing-water-in-oil-droplets-tp5011113p5011120.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 |
Free forum by Nabble | Edit this page |