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.

kl3m3n's blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Labview vs OpenCV template matching

Klemen
Active Participant

Hello,

I have come across some questions about the template/pattern matching algorithms in Labview and OpenCV. Mainly about the performance comparison of the algorithms. So, to possibly answer the questions and give people some basic material for further testing, I have prepared a Labview application to compare both algorithms.I have tested this just briefly using one sample image (see below, first image for Labview and the second for OpenCV):

Labview

Labview.png

OpenCV

OpenCV.png

Based on this image only:

- the score is better in OpenCV (it is true that no pyramid downsampling was performed).

- the execution is faster in Labview (again, it is true that no pyramid downsampling was performed)

- OpenCV has no subpixel resolution by default (would need some additional coding, but the question is, is the subpixel resolution really worth it?)

For some reason I cannot use "All" setting for learning the template information in Labview. Can anyone confirm this please?

Also "Low Discrepancy Sampling" is a lot faster than "Pyramids" based matching in Labview... Possibly because of the nature of the image I used? Or maybe some additional tweaking is needed via the advanced options?

Anyway: If anyone finds out anything interesting, please post it here, since I am also curious (also using pattern matching techniques in my applications)!!!

The .dll was built with OpenCV 2.4.6 and VS2010. The Labview application requires at least Labview 2013, since the new pattern matching algorithms were introduced in 2013 version. There is also source code attached in case anyone takes this thing a bit further.

My test image and template is also attached.If you create your own template you can do it in any image editing program (Paint, etc...).

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."
Comments