Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Having problems detecting a low contrast fluid

Hello,

 

I'm trying to detect a fluid drop / coating with a camera and LV.

But I'm having problems isolating the drop from the background.

(see attachement)

 

I've tried different things like increasing contrast, using edge filters and so on. But in the end all these things also increase noise, although I'm using median or gaussian filters. It just won't work.

 

Any ideas on how to solve this problem? 

 

0 Kudos
Message 1 of 10
(4,822 Views)

Hi rouven84,

you can move the histogram to get a better contrast.

 

Mike

0 Kudos
Message 2 of 10
(4,811 Views)

thanks mike.

what do you mean by "moving" the histogram?

The problem is, that every step I've tried in order to increase the contrast, also added additional noise to the image, so that I could not threshold or find edges by using sobel properly.

0 Kudos
Message 3 of 10
(4,809 Views)
What illumination method are you using? Are you able to try different approaches such as backlighting or lighting from a low angle (darkfield). Is the drop on a glass slide, if so, try injecting light into the side of the slide. Many problems such as this one can be solved with lighting rather than software processing.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 10
(4,782 Views)

Yes, contrast is very low, but you can separate your drop from the background. Another question - how stable this will work for different drops, but anyway script in attachment.

Median filter with small kernel will help you to eliminate the noise a little bit, then threshold and some morhpological processing for removing small particles:

 

 

Also the problem, that background have gradient. You should probably change lighting conditions, or if it impossible, but gradient always the same, you can prepare reference image without drop and then simple subtract this background from your image.

 

Andrey.

Message Edited by Andrey Dmitriev on 10-21-2008 06:18 PM
Download All
0 Kudos
Message 5 of 10
(4,777 Views)

Hello AnalogKid,

I'm using backlighting atm. Of course, I can change the lighting conditions and I've already tried some different lighting angles and sources.

The drop is on a glass slide, so I could also try injecting the light into the side of the glass, as you said. I'm going to try that now...

 

 

@Andrey:

 

Thank you, too, for your help and script. Basically, the steps you processed on the image are the ones, I've already tried. But your result seems much butter. I'm going to test your script and report the results later.

 

The only problem I'm seeing, is, that median filter could take too long to process, as I'm planing to process about 5 images / sec. in real time later on.. but we will see. 🙂

Thanks so far! I'll post the results later!

0 Kudos
Message 6 of 10
(4,750 Views)

The low contrast blues.  :smileysad:

 

One thing that may help is either some color filters for your lighting or lens, or both.  Even if you're using a B&W camera, color filters can do a lot to enhance a low contrast image.

 

Another thought might be to use a black light.  Depending on the fluid you're inspecting, it might be helpful. 

 

Good luck.

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 7 of 10
(4,703 Views)

Lighting, lighting, lighting.

 

If you can light from the front, try a low angle ring light (assuming the drop has some height.) If you must use a backlight, see what IR would do (remember to remove the IR filter from the camera, if you have one.)

0 Kudos
Message 8 of 10
(4,675 Views)
Hello AnalogKid, My labview does't have the vi about median filter, but now I need this function. So can you give it to me? Thanks a lot!
0 Kudos
Message 9 of 10
(4,107 Views)

 


@melo_xu wrote:
My labview does't have the vi about median filter, but now I need this function. So can you give it to me? Thanks a lot!

IMAQ NthOrder VI

 

0 Kudos
Message 10 of 10
(4,098 Views)