From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Bilateral Image Filter

Solved!
Go to solution

Hello,

 

has someone an idea if a bilateral filter for image smoothing is available in the vision framework? I did not find anything similar. At the moment I use a median filter for image smoothing (remove noise an texture) but the results produced by ImageJ / Fiji with a bilateral Filter are a lot more impressive.

 

Best regards,

 

Paul

0 Kudos
Message 1 of 9
(6,340 Views)

Hello,

 

there is no bilateral filter. You can implement it yourself or (if you just need to use it) use OpenCV's implementation (as a .dll):

 

http://docs.opencv.org/modules/imgproc/doc/filtering.html?highlight=bilateralfilter#bilateralfilter

 

If you would like to use the OpenCV implementation and are having problems implementing it, I have this filter already implemented for filtering depth images. Tell me and I can share it with you.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 2 of 9
(6,317 Views)

Hi Klemen,

 

I had a look to your blog and found that "hough circle" opencv dll implementation. I found the cpp-source for the dll wrapper and remembered that is a long long time ago I coded C++ at school. Smiley Embarassed So I may ask you to give me the wrapped dll? I can give you only a virtual granola cereal bar because I am sure I have no piece of code which is interesting for you in exchange.

 

Best regards,

 

Paul

 

0 Kudos
Message 3 of 9
(6,298 Views)

Hello,

 

sure, here you go (please see the attachment). The .dll was built using OpenCV 2.4.6.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 4 of 9
(6,294 Views)

Hello Klemen,

 

thank you very much! You made my day, a new toy for my project! Smiley Happy I only have one problem because I get a nasty "access violation" error. I tried to implement your DLL as given in the "function prototype" but maybe I overlooked something. So I created a Test vi and put it into the attachment.

Could you give me a hint where I have make a mistake in the code?  Thank you very much!

 

Paul

 

0 Kudos
Message 5 of 9
(6,286 Views)
Solution
Accepted by topic author Meisspa

Hello,

 

please see the image (block diagram) below:

 

Bilateral filter_LV2010.png

 

Try allocating memory for the new image. Tell me how it goes.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 6 of 9
(6,282 Views)

Hello Klemen,

 

after seeing your example it is so obvious.  Allocate a blank array as placeholder in the memory for the output pointer! Smiley Embarassed Works great!

Thank you!

 

Best regards,

 

Paul

 

 

0 Kudos
Message 7 of 9
(6,280 Views)

Hi Meisspa

 

I download the dll and the vi, but there always some error missing some dll, I already get opencv 2.4.6. Do I I need to install the vs2010?

CLD
CAU
0 Kudos
Message 8 of 9
(6,023 Views)

Hi,

I have installed latest OpenCV version, I am getting this error

Rahulbala_0-1611984816094.png

How to build a .dll for the new opencv version?

 

Thanks

Rahul 

0 Kudos
Message 9 of 9
(2,292 Views)