LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Blurring Image by IMAQ low-pass filter (LabVIEW student edition 2017)

Solved!
Go to solution

Hello everyone,

I'm having trouble with using the IMAQ low-pass filter VI. I'm obtaining images, from which plotting a band of image pixels. The x-axis shows pixel position (image's width) while the y-axis is pixel intensity. There is noise in my images and I want to apply the low-pass filter in order to easily detect the right peaks. However, I get the output image 100% similar to the original image after using IMAQ low-pass filter. I'm wondering if anybody can help me use this VI properly.

Thank you!

0 Kudos
Message 1 of 5
(3,871 Views)

Attach your VI, and also attach a sample Image you are using as input.

 

Bob Schor

0 Kudos
Message 2 of 5
(3,821 Views)

Hi Bob,
Thanks for your reply. I attach here the VI and 1 example picture needed to be processed. I expect to get #peakfound=6 for this, but I got 23. I know there are noises, this low-pass VI may not work for mine..

Download All
0 Kudos
Message 3 of 5
(3,815 Views)
Solution
Accepted by topic author hamy96

If you read through the help documentation for the IMAQ LowPass you're trying to use, it's essentially a fancy median filter.  It takes the values of the pixels surrounding your pixel to a certain distance, compares to see if they're above a threshold, and then sets the pixel in question to an average of those pixels.

 

This kind of filter is designed to remove what's known as "salt and pepper" distortion/noise.  When you get those random specs in place, it's very good at removing those.  But, that's not really what you're after.

 

To get around this, there's a couple things you can do.  The first is to continue down an approach like you have where you're looking to use filtering to reduce some of the high frequency elements in your images.

 

You'll likely have an easier time taking a look at the help for the Peak Detector VI.  Specifically, take a look at width.  For a noiseless signal, you can get this down to 3 (the default value).  For a signal with noise, you can increase this width value.  Width is meant to be half the distance of one of your expected peaks.  I removed the Lowpass VI from your VI and wired in a width of 10 here.  When I did that, it immediately gave me the 6 peaks value you were seeking.  It's also a relatively low number so I wouldn't expect you to miss any peaks.  If you're concerned, you can tweak this number to a value between 3 and 10 to make it high enough to miss the noise you're seeing without being large enough to miss any peaks of interest.

 

0 Kudos
Message 4 of 5
(3,795 Views)

Hi,

 

Sorry for getting back to you late. You're right, I will try to modify the width and tolerance number and see if it works for other images as well.

 

Thanks a lot.

0 Kudos
Message 5 of 5
(3,769 Views)