Counting bubbles

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Counting bubbles

YuriGagarine
This post was updated on .
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 :
lighted image
Image that I analyse
Zoom in the image after the processing

Thanks in advance and sorry for my english.
Reply | Threaded
Open this post in threaded view
|

Re: Counting bubbles

Herbie-3
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
Reply | Threaded
Open this post in threaded view
|

Re: Counting bubbles

Olivier Burri
Dear Yuri,

I agree with Herbie's conclusion. Which means that to improve your detection, you must retake images.

Some ideas:

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

All the best

Oli


Olivier Burri
Engineer - Image Processing
& Software Development
EPFL - SV - PTECH - PTBIOP

> -----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

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Counting bubbles

Anderson, Charles (DNR)
Yuri,

Try taking reference photos without any bubbles, then photos with bubbles, with the same camera and lighting settings. Then subtract one from the other using the image calculator.

Threshold, then use Analyze Particles accepting only those particles with circularity near 1.0. You can get the centroid and area output in the results table.

Measure distance from the surface, as bubble sizes change with pressure, not distance from an irregular bottom. Note the centroid Y value is pixels from the top, which I think is what you want. Import the results table to a spreadsheet or stats program to examine area as a function of Y (depth).

Charles

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Burri Olivier
Sent: Tuesday, May 06, 2014 9:04 AM
To: [hidden email]
Subject: Re: Counting bubbles

Dear Yuri,

I agree with Herbie's conclusion. Which means that to improve your detection, you must retake images.

Some ideas:

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

All the best

Oli


Olivier Burri
Engineer - Image Processing
& Software Development
EPFL - SV - PTECH - PTBIOP

> -----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

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html