To make sense of what’s been scanned, says Adil Shafi, president of Brighton, Mich.-based Shafi Inc. (www.shafiinc.com), a software-solutions value-added supplier to Daimler Chrysler, Ford Motor Co. and Tier One automotive suppliers. To find objects within an image, adds George Blackwell, director of product marketing at Natick, Mass.-based Cognex Corp. (www.cognex.com), a machine vision systems supplier.
Inspection, gaging, guidance and model-based recognition are the four application areas in which pattern matching finds use, says Shafi. This matching typically means recognizing pixels (picture elements, or the tiny dots on a display screen). These are associated with either binary matching systems or what is known as normalized cross correlation (NCC) or normalized gray-scale correlation.
In a typical image, there are several hundred pixels from left to right and from top to bottom. Historically, these have been used to determine where a line, edge or arc is, says Shafi. Technology application was simple. “You looked at the pixel. Then you looked at its neighbors to see if there was a contrast between it and the others,” he explains.
Geometric matching
But for years, the method of choice for finding objects has been NCC, because it’s simple to understand and implement, says Ali Zadeh, senior software engineer at Duluth, Ga.-headquartered DVT Corp. (www.dvtsensors.com). “It is also insensitive to changes in lighting conditions, which is a common occurrence in real-world situations,” notes Zadeh, who developed the geometric pattern-matching (GPM) algorithm for his company’s Intellect software.
But gray-scale NCC has weaknesses. It does not tolerate changes in angle or scale of the object, he says. Methods that overcame those shortcomings reduced reliability and increased execution time. That happened, says Zadeh, because there were “simply too many pixels to examine in many angle and/or scale positions.” Shafi adds that gray-scale correlation may generate false rejects and acceptances, stopping good product and letting bad product go by.
One of GPM’s appeals is it that it can overcome these weaknesses through partial object matching. All pixels aren’t examined, says Zadeh, because pixels having no significant value are ignored. That reduces the complexity. “It is also based on extracted features and not the pixel values themselves.” Thus, if the manufacturer chooses those features correctly, “then it can be independent on translation, rotation and scale,” Zadeh explains.
An automotive-parts manufacturer uses Cognex’s GPM to find alternator brackets on a conveyor belt and then guide a robot to pick them up, says Blackwell. The challenge of this application was recognizing any part within 10 different styles of cast-metal parts. Because of the casting process, the surfaces were either shiny or dull, and the appearance changed from part to part. The manufacturer wanted to go to a more flexible type of automation and remove the requirement for hard fixtures, because the company was adding styles of brackets, Blackwell states.
Geometric pattern matching has been discussed for many decades in publications, Zadeh says. But as computers get smaller and less expensive, more GPM algorithms find their way into industry. How does that improve manufacturing? “Let’s say you turn on the machine and start production and have cans of soup on a conveyor, and you’re taking picture after picture,” says Shafi. Because of the geometric representation, the cans can still be recognized, under shiny or dull light, or even when slightly out of focus or when the cans have blemishes, says Zadeh.
The ability to find the object and do a good job has gone up one level using GPM above gray-scale tools, says Shafi. “You can throw more curveballs at the system.”
Kenna Amos, [email protected], is an Automation World contributing editor.