Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

does imaqpatternmatch has scaling allowance?

I implemented imaqpatternmatch to look for an object in an avi and am able to return success. However, when I increase the scale of the object, the patternmatch fails. Is imaqpatternmatch able to detect scaling of the object and find it? Is it some parameters that I have to change?
0 Kudos
Message 1 of 7
(3,143 Views)
See When you are increasing the scale of the object the pattern match fails because it is related to the resolution ,for the match you have to change the resolution of the image by the same factor by which you are zooming in or out(in your words scaling)
0 Kudos
Message 2 of 7
(3,142 Views)
Is there an easy way for me to code this in? How do you propose I solve it?
0 Kudos
Message 3 of 7
(3,141 Views)
You could use the IMAQ Resample.vi to display a reduced or enlarged image of a user-defined size. Check out the following two examples which use this VI:
NI Developer Zone Example: Zoom Image Using IMAQ Vision
Developer Zone Example: LL Grab in IMAQ Vision Display Resize Image with Window Display

I hope this helps!

Best wishes,
Dawna P.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(3,143 Views)
Are there similar methods for LabWindows? I am not using LabView for my application.
0 Kudos
Message 5 of 7
(3,143 Views)
Yes in LabWindows/CVI the imaqResample is the equivalent

A. Talley
Applications Engineering
National Instruments
0 Kudos
Message 6 of 7
(3,142 Views)
Yes you can try the following steps
1)When you are creating pattern for match find out the height and width of the pattern in pixels.
2)Next time when your scaling changes you are not able to match the pattern so for that open that image into the vision builder and find the height and width in pixels it will differ from original so you keep resampling the image by some value and try to match the pattern.When your pattern matches get the pixel values and make a relation such as for x lenght and y width ?? is the resampling value .It will work
0 Kudos
Message 7 of 7
(3,142 Views)