Why Does Geometric Pattern Matching Not Return Any Matches?

Updated Oct 18, 2022

Reported In

Software

  • Vision Assistant
  • LabVIEW Professional
  • Vision Development Module

Issue Details

When I create a geometric pattern matching algorithm in Vision Assistant and convert it to a LabVIEW VI, it works fine and finds matches in the main image. When I select a different template image from the VI, the code won't find matches to my new template in the image, even though I know there should be matches there. Why is it unable to find matches?

Solution

You must call an additional VI to create the template programmatically. The IMAQ Learn Geometric Pattern VI allows you to include the information of the curve in the template and the IMAQ Setup Learn Geometric Pattern VI allows you to set the parameter of the curve to identify in the template. The code snippet below shows where to place the function in order to create the template necessary for the geometric pattern matching in LabVIEW:

Additional Information

In geometric pattern matching, the template file needs to have learned the curve information in order to generate a match. In Vision Assistant, the curve information is automatically saved when creating a geometric matching template. In LabVIEW, however, when you select a new image to use as a template, this curve information will not be included, and your algorithm will fail to find matches.