Toggle Navigation
Digital Imaging: Imagine the Possibilities
Teledyne Logo

Bob’s Imaging Fundamentals: Pattern Matching

An Introduction

Pattern matching, template matching and pattern recognition all refer to the same basic task: finding a known ‘something’ in a larger set of new ‘stuff’. In even less technical terms, this can mean recognizing ‘strokes’ as handwritten or printed characters, sound waves as voice, or geometrical patterns as objects within an image.

Now, for once I’m pretty sure I don’t have to make a convoluted tie-in to the field of machine vision, as the link between pattern matching and machine vision must be pretty obvious to everyone. After all, the type of pattern recognition we, as humans are most familiar with, the act of visual recognition, typically occupies the greatest percentage of our sensory energy. Think about it, every second that we are awake, we engage in pattern recognition, whether it is to find your toothbrush among a group of objects on the bathroom counter or, recognizing your favorite coffee cup among the gaggle of cups in the kitchen cupboard. Where it becomes interesting (and sometimes difficult) for us in the field of machine vision, is in trying to reproduce our prodigious human abilities using computers.

Today, it is no secret to anyone that computer based Automated Optical Inspection (AOI) is a well-entrenched reality of industrial production. Alright, alright, maybe your grand-mother and some of your less technical-savvy relatives don’t about AOI, but everybody else knows, right?

With pattern matching algorithms, vision systems can differentiate single parts from one another even when they are jumbled together. (Image courtesy of Vision Systems Design)

Now, as computers become more powerful and optical sensors gain in resolution and sensitivity, we find ourselves able to inspect with greater and greater precision. In practical terms, this means we can inspect much smaller stuff. Obviously, being the annoying bunch of perfectionists that we are, this constantly improving technology compels us to inspect things that previously had been technically unachievable.

So what’s the problem? Simply put, the smaller your object, the harder it is to find (… all together now… D’uh!) When your object is physically large, it is relatively easy to put it in front of the camera in precisely the same spot every time you want to inspect it. As a result, the elements of the object that need to be inspected are easy to find because, from one image to the next, that which must be inspected is in exactly the same spot. But, once your object and the features that make it up start to get too small, then, precise physical and/or mechanical positioning of said object becomes much more difficult. The net result is that the things that have to be inspected can no longer be counted on to be in exactly the right place. So, you have to find them before you can inspect them!  And that is where the pattern matching comes into the picture (so to speak…).