LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter noise images?

Hallo,

 

I would like to filter noise images. Here is one of my images and the result after filtering the image with the Vision Assistant. I would like to filter the separated cells as much as possible but the noise generated by the fluid flow as a background could not be filtered. I would like to delete the the lines of the fluid flow from the image. Could you please assist me or advise me? Thank you!

0 Kudos
Message 1 of 8
(282 Views)

Since you are using modules, the machine vision forum might be more appropriate for your question. We also cannot tell what kind of settings you are using in the vision assistant. Typically a screenshot of the panel does not really tell us much.

 

Still, a greyscale image is just 2D data and it is possible To use plain LabVIEW tools to do all processing. Obviously, simple thresholding is not suitable but there are other obvious distinction between objects and background. In general, the more we know about the objects, the better the detection. Are the objects always the same size? Is the background always horizontally banded?  Do you really need an image output or would just e.g. counting the objects be sufficient?

Message 2 of 8
(250 Views)

Here's a quick attempt subtracting a least absolute residual polynomial fit from each row, followed by thresholding at 30.

 

altenbach_0-1754577417750.png

 

Message 3 of 8
(236 Views)

Subtracting a background obtained by convoluting with a suitable horizontal kernel followed by another filter to remove single spikes seems to work quite well. You still need deal with edge effect on both sides and maybe tweak the two kernels, but overall it works quite well and is fast.

 

altenbach_0-1754586281988.png

 

altenbach_1-1754586468025.png

 

 

Message 4 of 8
(210 Views)

Thank you for your assistance! Is it necessary to ask the same question in the machine vision forum? The spherical objects are biological cells. In a microfluidic channel I put a suspension with cells and I make 7 images with 7 different microfluidic pressures. I've attached the first and the last image. At the beginning the cells are almost spherical but during the increase of the pressure they become more elliptical. The background is always horizontally banded. I need an image output in fact.

 

Download All
0 Kudos
Message 5 of 8
(181 Views)

So this seems to work quite well on all your pictures. See if the code makes sense. A few things could be improved and tuned, of course.

The default values seem to work quite well.

 

altenbach_0-1754661528548.png

 

altenbach_1-1754661761346.png

 

Seems pretty fast...

Message 6 of 8
(145 Views)
  • Thank you very much for your assistance! The solution is working very good! Could you please explain why do you use Sine Pattern VI? What is the purpose regarding image processing? 
0 Kudos
Message 7 of 8
(110 Views)

@tiho_bg wrote:
  • Could you please explain why do you use Sine Pattern VI? What is the purpose regarding image processing? 

No reason except convenience. All you need is a useful kernel and you could easily use a Gaussian (or 2D Gaussian), but since these are infinitely wide, you need to truncate.

 

I take the square of the sine to drop more nicely to zero but other exponents can be used. Have a look here for some examples.

 

In this case we know that the background changes slowly with X and smoothing with a function that is wide in X will basically wipe out the sharp bubbles but have very little effect on the background. Taking the difference leaves only the bubbles above a given threshold. You'll still end up with occasional very narrow peaks (often single bright pixels) so the second convolution leaves only "bubbles" that are above a certain size.

 

You can definitely try to play with the parameters and see how they influence the result. Maybe even find settings that are better than my current defaults. Good luck!

Message 8 of 8
(85 Views)