LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Imaq match pattern 4

Solved!
Go to solution

Hi everyone,

 

I am currently working on an application using pattern matching. Now, the goal is to find and calculate the position of a marker (2D) on the index finger in real world coordinates. The marker can be freely chosen, let's say a white square double-sided tape with a black circle on it. Then I made a template of this marker and with 'IMAQ Find Pattern 4' the marker is identified and with the calibration template image the real-world coordinates are calculated. Everything works fine.

 

An important characterization is that there is always only one marker in the image, meaning that the output node 'Number of Matches' of the 'IMAQ Find Pattern 4' has a maximum of one in every image/frame of the camera. Thus, if it has found one, there is no need to complete searching all the other pixels of the image. Therefore, I have two questions:

 

  1. Therefore, is it possible to instruct of configure the application is such way that analyzing the image can stop after it has found a match (the match)? This should speed up a lot.
  2. Which search algorithm (Low Discrepancy Sampling, Grayscale Value Pyramid, Gradients Pyramid) is best for such a marker?

 

I hope someone can help me with this or point me in the right direction.

 

Btw, I am also using a Region Of Interest already to reduce search area, but this are still a lot of pixels (around 500 x 700).

 

 

 

0 Kudos
Message 1 of 8
(5,261 Views)
-You can Limit the number of matches required by giving the input Settings->Number of Matches Requested to 1.
-The type of algorithm to choose might be difficult to provide without looking at the images and actual setup.
-You can follow this link to understand the pattern matching algorothms and how they detect the pattern and chose the best algorithm: http://zone.ni.com/reference/en-XX/help/370281AE-01/nivisionconcepts/pattern_matching_techniques/
Thanks
uday
0 Kudos
Message 2 of 8
(5,209 Views)

Hi Uday,

 

Thank you for your valuable contribution. I will read about the different algorithms in a minute.

Further, this parameter (Number of Matches Requested) is exactly what I am looking for. However, at first I could not find it anywhere. Then I finally found it with the 'IMAQ Match Geometric Pattern 2' instead of with 'IMAQ Match Pattern 4'.

Then my question arises, what is the exact difference between them as from the examples you can accomplish the apparant same task with both functions? And why is the input node 'Number of Matches Requested' not with Match Pattern 4?

Anyway, do you know what is the best option in terms of speed?

 

PS Searching in the forum I saw that Match Pattern 3 (older version?) DOES have an input node 'Number of Matches Requested'...I am confused.

Also, as I now see that there is both a 'IMAQ Match Pattern 4' and a 'IMAQ Find Pattern 4'..(they look a like the same)??

 

Dirk

 

 

0 Kudos
Message 3 of 8
(5,195 Views)
IMAQ Match Pattern4 also has input under Parameters input. Use Context help always to read about inputs and outputs.
http://zone.ni.com/reference/en-XX/help/370281AE-01/imaqvision/imaq_match_pattern_4/
Thanks
uday
0 Kudos
Message 4 of 8
(5,189 Views)

Ah great! So does IMAQ Find Pattern 4. I overlooked it, thanks.

 

Leaves me with only the question what is the difference between:

  1. IMAQ Match Pattern 4
  2. IMAQ Find Pattern 4
  3. IMAQ Match Geometric Pattern 2

Very confusing. Can you or anyone point me to the right documentation, as I can not find it anywhere (context help does not provide much help).

Any help would be appreciated!

0 Kudos
Message 5 of 8
(5,187 Views)
Solution
Accepted by topic author DvdM
-Geometric is used when there is change in template scale or oclusion.Geometric matching helps you quickly locate objects with good geometric information in an inspection image.
-pattern matching works well on images where the template is primarily characterized by grayscale information.
-In Find Pattern(Extension to Pattern Match), if template has not been learned, it first go through learning process whereas for Match Pattern template must be learned before.
-Please go thrugh the Vision Concepts for indepth :
http://zone.ni.com/reference/en-XX/help/370281AE-01/TOC17.htm
Thanks
uday
0 Kudos
Message 6 of 8
(5,181 Views)

Great! That is what I was looking for.

Then I guess Geometric Matching could be quite helpful in my case. However, first I am going to read some more indepth.

 

The only thing what I am wondering now is:

Is 'Find Pattern' exact equal to 'Learn Template and Match Pattern'? Is the latter option only the lower level variant where you can tune the learning process? Thus, leaving everything on default at 'Learn Template' should more or less (of course depending on the kind of appplication and circumstances) on average yield the same results as with 'Find Pattern'?

0 Kudos
Message 7 of 8
(5,171 Views)
Yes, both are similar and yield similar results.
-Sometimes you may use learn template in run time and sometimes required. Learn template might be bit time taking during runtime.
Thanks
uday
0 Kudos
Message 8 of 8
(5,156 Views)