O'Reilly logo

Practical Guide to Machine Vision Software: An Introduction with LabVIEW by Steven Ready, Kye-Si Kwon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

img

Figure 5.1 Pattern matching example VI.

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:

  1. Click on Image File Path to select and read in an image file (Figure 5.1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required