5Pattern Matching
Pattern matching is a method for finding regions in a grayscale image that match a reference image pattern. If the initial image source is a color image, the image needs to be converted to grayscale first in order to use pattern matching. The pattern matching VI uses a reference or template image to find like images within a new image regardless of location, rotation, or scaling of the template.
Pattern matching is often used to locate the positions of a fiducial mark, or unique characteristic features, of an object in an image. You can use the positions to compute length, angles, and other measurements. As a result, pattern matching has been widely used in various applications such as alignment, gauging, and inspection. Pattern matching has an advantage over particle analysis or edge detection because the pattern search does not rely on distinct brightness of the imaged object compared with the image background.
Figure 5.1 shows an example VI provided in LabVIEW, which can be found in the following folder:
As seen in Figure 5.1, pattern matching requires several steps.
Run the example VI above to gain an understanding of LabVIEW pattern matching concept:
- Click on Image File Path to select and read in an image file (Figure 5.1 ...
Get Practical Guide to Machine Vision Software: An Introduction with LabVIEW now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.