Graphical-interface packages add functionality
Many software packages in machine vision use standard image-processing functions in end-user systems.
Andrew Wilson, Editor, firstname.lastname@example.org
Many software packages in machine vision use standard image-processing functions in end-user systems. In the development of these systems, engineers can call standard functions from a C-based library or graphical interface and link a series of them to perform a specific task. In the development of a system to inspect gasoline filters, for example, Ingenieurbüro (Mülheim, Germany; www.ibn-gmbh.de) used the Vision Components VC lib image-processing library to perform histogram thresholding, binarization, and blob analysis to determine the integrity of each part (see Vision Systems Design, Feb. 2006, p. 13). The success of vendors developing such software packages depends to a large extent on the number of easy-to-use standard functions that are made available to the developer.
Realizing this, developers of C-callable and GUI-based packages are continually adding extra functions to their software. At The Vision Show East (Boston, MA, USA; May 9-11, 2006), National Instruments (NI; Austin, TX, USA; www.ni.com) plans to demonstrate three of the latest additions to NI Vision Assistant, the company’s vision application prototyping environment that automatically generates ready-to-run LabView diagrams, C++, or Visual Basic code. These include a new adaptive thresholding tool, a watershed algorithm, and a golden template-matching function. All three will be offered as Virtual Instruments from within the NI Vision Assistant.
“In conventional global thresholding methods,” says Kyle Voosen machine-vision product manager, “a global threshold segments an image by setting pixels with an intensity value above a specific threshold to a foreground value and those lower to a background value.” While this method is useful, it is not particularly effective for thresholding images with strong lighting gradients or shadow. “A better approach is adaptive thresholding, where the histogram of smaller regions within the image are computed and a threshold is computed based on those values. “Because smaller regions within the image are less likely to exhibit nonuniform illumination, image binarization is more effective,” he says.
Further image segmentation can be performed by watershed algorithms that find the boundaries between regions. These regions are usually differentiated by their intensity and if the regions are dark the boundaries between them are brighter (see Vision Systems Design, June 1999, p. 23). Such operators are particularly useful in inspecting and/or counting images that may contain a number of similar objects such as pills, cells, or metal particles.
After performing binary thresholding, a distance field is computed using a Danielsson operator, originally conceived by Per-Erik Danielsson at Linköping University (Linköping, Sweden; www.isy.liu.se/~ped). The operator is closely related to Voronoi diagrams, which partition the space into regions where each region consists of points that are closer to one object than any other (see mathworld.wolfram.com/voronoidiagram.html). After performing the watershed operator on this space, the output is a binary mask that represents only the basin of each watershed (see figure). The effect is to produce image regions that a system developer could use, for example, to count the number of objects in the image.
“In many applications, there is a need to compare one image with a known good image,” says Voosen. To do this, NI has introduced its golden-template-matching tool. To use this tool, the system must perform a pattern match between the captured image and the golden template. Then, a comparison can be performed and a particle analysis used to check for any discrepancies.