An Alternate to Pattern Match : Hough Transforms
One of the most used algorithms in Machine Vision is the Pattern Match. It finds its use in many different industries including Automotive, FMCG, Print etc. The technology involves a pixel by pixel comparison of a specified “master” pattern to determine defects or to check for the presence/absence of a feature.
The chief trouble with using this approach, as many users may have seen, is the difficulty in detection when the lighting or image features are not consistent or uniform. The feature or pattern that was trained for a given image will thus not be detected when the same defect is seen at region of Y illumination. Moreover, this pixel by pixel comparison consumes intense processing time, thereby reducing the cycle time of product inspection.
So what is the alternate? Image Filters! One such filter or algorithm is the Hough Transform. This algorithm can be used to detect and locate straight line edges, circles, ellipses in the image. The output would be in the form of number of lines/circles and their corresponding parameters. For a line, that would be the slope and intercept, for a circle it would be the radius and center etc. One can control the search range of the parameters to pick out the desired features. The advantage over Pattern Match is the ability to pick out patterns from very noisy backgrounds, apart from being an inherently faster running algorithm.
Traditionally, the Hough Transform has been only applicable in shapes that are defined by a fixed equation (a line/ circle). This is no longer true. Now we use a combination of the Hough Transform and Pattern Match (termed the Generalized Hough Transform) by which we can detect arbitrary shapes too, not limited by defined equation sets. To read the entire article that proposed this great solution, please visit this linked publication.
All of the standard image processing softwares (like Teledyne Dalsa’s Sherlock) offer these algorithms. We strongly advocate alternates to Pattern Match when you run into repeatability issues.