Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Watershed filtering ?

Hi !

Has anyone applied watershed filtering to an image under LabView?
If so I would appriciate some help, or any ideas that could be useful.

I´m trying to use watershed filtering in order to segment bubbles in a froth
image.
Due to total reflections at the top of the bubbles, resulting in very steep
transients, I´ve had to smoothe the image first.
This was done using a combination of FFT filters.
Other suggestions as to filtering?

Haven´t had to much success in my efforts yet, but I´ve only been trying for
a short period so perhaps with Your help there will be success in the end.

Yours/

--
Roger Ohlund, MSc Engineering Physics
Lovsele 83, 930 10 Lovanger, Sweden
Tel. +46 70 3333543, +46 913 41041
Email: angler@mail.bip.net
Email: an
gler@acc.umu.se
0 Kudos
Message 1 of 29
(6,488 Views)
Roger,

I would probably use a 3x3 or 5x5 convolution filter to smooth out your data.

There are a couple of IMAQ tools that might help you. The first is IMAQ Separation, which will separate regions that are run together. The second is IMAQ Segmentation, which will make labelled regions larger until they touch. Both work with binary images, so you would need to threshold your original image before using them.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 29
(6,480 Views)
I am trying to seperate binary image of circles that are heavily overlapped. The IMAQ separation, segmentation or circle detection don't work well for heavy overlapping circles and failed to detect those chunk of circles.

I've looked up the internet and found that could be the answer to seperate overlaping circles. However the programming of watershed algorithm could take me awhile and might be an impossible task to me. Is there any other way to achieve it?

Attached is the binary image of the circles. Any help/suggestion is appreaciated. Thanks
0 Kudos
Message 3 of 29
(6,450 Views)
What are you exactly trying to do ? Are you trying to obtain the bubble diameter in the foam ? Or some other information ? When dealing with overlapping particles, segmentation may not be the most efficient approach...

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 29
(6,439 Views)
Thanks first for your reply.

The original image is an 8-bit image of randomly positioned spheres with varying intensities. They could be separated or touching one another. I've thresholded the image to produce the image I attached in previous post.

I am trying to segment the circles to identify each one and extract information such as the circle's mean intensity etc. For non-touching or mildly-touching circles the IMAQ Find Circle is able to detect the circles but for cases where 3 or more circles are jointed, the vi is unable to identify these circles. For the worse case scenario (where one circle is surrounded by 6 circles), even the watershed morphology will not be able to segment the circle at the center. I'm now still trying to figure out what method to use to effectively perform the task.
0 Kudos
Message 5 of 29
(6,438 Views)


@JoshMonkey wrote:
Thanks first for your reply.

The original image is an 8-bit image of randomly positioned spheres with varying intensities. They could be separated or touching one another. I've thresholded the image to produce the image I attached in previous post.

I am trying to segment the circles to identify each one and extract information such as the circle's mean intensity etc. For non-touching or mildly-touching circles the IMAQ Find Circle is able to detect the circles but for cases where 3 or more circles are jointed, the vi is unable to identify these circles. For the worse case scenario (where one circle is surrounded by 6 circles), even the watershed morphology will not be able to segment the circle at the center. I'm now still trying to figure out what method to use to effectively perform the task.



In the past I have used two different methods to deal with overlapping particles.
- In the first case, I had thick disk shaped particles of various sizes, randomly packed (8 bit images). I used a texture analysis technique (Haralick) to derive a descriptor of the texture, and I established a calibration curve of this texture descriptor against the mean disk diameter. The method was then embedded in a real-time system.
In the second case (still under work), I had to count overlapping circles. I applied a statistical analysis (derived from Principal Component Analysis) of the particle descriptors (area, perimeter, moments of inertia, ferret diameter, etc...) to classify the particles, according to the number of overlapping circles. May be this second approach could be adapted to your problem ?
May be you could post an unthresholded image to help the discussion ? BTW, I don't understand what is the "circle's mean intensity".

CC
Chilly Charly    (aka CC)
0 Kudos
Message 6 of 29
(6,434 Views)
It's an image of glow-spheres which produces different intensity levels that I wanted to detect.

I am now considering to use the IMAQ Find Circular Edge to search for the best fit circles on the object (of merged circles). This would probably work for most cases but not for the worst case scenario (1 circle surrounded by 6 other circles.

I've read that there might be some other alternative vis for vision 6 or 7 but since I am using an older version, these vis are not available for me to test on my image.
0 Kudos
Message 7 of 29
(6,434 Views)
Hi all,

Did you tried "Find Circles" instead of Find circular edge, I have read sometime back it will be good for this kind of applications. I have tried little bit on the image u gave and it looks good. I accept that it will be tough on 3 overlapping circles. But after this process you can easily omit the wrong circles with the combination of Find circular edges results. Just a thought, i want to throw on your way.

Thanks,
Logic
0 Kudos
Message 8 of 29
(6,422 Views)
I've tested the Find Circle and just like the result you attached it couldn't separate 3 or more overlapping circles. The Find Circular Edge however doesn't solve my problem either because it isn't automated.

The spheres are like image of marbles but the edges to the spheres are blurred due to the fluorescent glow. Such glow causes the spheres to appear to attach to one another even before thresholding. To separate them I still think it's best to use a general rule that relies on the partial circular shape of the clustered object to identify each circle.
0 Kudos
Message 9 of 29
(6,420 Views)
Still, I think it would be usefull to know your ultimate goal : do you want just to measure the bubble diameter, or do you need some other information that should be extracted from the image features? Are you sure that the bubble image is representative of the whole bubble ? Could you provide an un-tresholded image ?

CC
Chilly Charly    (aka CC)
0 Kudos
Message 10 of 29
(6,416 Views)