I agree with Herbie's conclusion. Which means that to improve your detection, you must retake images.
You seem to be capturing these using a regular camera. Actually whether it's a camera or a microscope, try closing the aperture diaphragm to get the deepest field of view possible and have all bubbles in focus.
Regarding the glass defects. Perhaps taking an empty image of the chamber before loading it, so that you can either:
1. Perform a flat-field to clean out the small imperfections
2. Remove the regions that simply cannot be measured by thresholding this empty image.
VoilĂ . Best of luck to you
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
> Herbie
> Sent: mardi 6 mai 2014 15:42
> To:
[hidden email]
> Subject: Re: Counting bubbles
>
> Yuri,
>
> no help with your problem...
>
> ...if this
>
> > Because of fissures in the glass and bubbles that are out of focus it > is
> hard to have appropriate results.
>
> is the cause.
>
> -- Image acquisition contributes most importantly to the quality of automatic
> image analysis.
>
> -- Most often you cannot compensate for bad conditions in image acquisition
> by post ho image processing.
>
> Your experimental conditions support these statements.
>
> The problem with out-of-focus bubbles can perhaps partially be remedied
> but the glass defects will disturb as long as you work with this kind of
> illumination.
>
> The very dark structures are plants I guess. Don't they disturb as well?
>
> Best regards
>
> Herbie
>
> ::::::::::::::::::::::::::::::::::::::
> On 06.05.14 14:07, YuriGagarine wrote:
> > Hi all,
> > I am posting because I am stucked for weeks. I have a macro to do
> > which have to count bubbles, to have their distances from the bottom
> > and their radius and the %Area of bubbles.
> >
> > What I have done so far was :
> > - Capture two images, one lighted to allow the user to select the
> > bottom and one without light to be easier to analyse (this step is
> > done in order to be able to calculate the distance of each bubble from
> > the bottom and also calculate the %Area)
> >
> > - Compute an automatic thresholding that work well (I used the default
> > one, I think it is the ISODATA algorithm)
> >
> > - Compute the "Ultimate Points" after the thresholding and recover the
> > results in order to draw circles on the original image and see if it
> > worked well.
> >
> > Because of fissures in the glass and bubbles that are out of focus it
> > is hard to have appropriate results.
> >
> > What I am asking for are proposals for my project, I am running low of
> > ideas now.
> >
> > Here are the images :
> > <
http://imagej.1557.x6.nabble.com/file/n5007594/3-eclaire.jpg>
> > <
http://imagej.1557.x6.nabble.com/file/n5007594/333333.jpg>
> > <
http://imagej.1557.x6.nabble.com/file/n5007594/Sans_titre.png>
> >
> > Thanks in advance and sorry for my english.
> >
> >
> >
> > --
> > View this message in context:
> >
http://imagej.1557.x6.nabble.com/Counting-bubbles-tp5007594.html> > Sent from the ImageJ mailing list archive at Nabble.com.
> >
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> >
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html