Choosing imaging boards and software
With faster processors and higher-bandwidth bus hardware, throughput can be maximized by acquisition hardware and software.
By Jason Mulliner
The right camera, lighting, and optics are critical for a successful machine-vision system, but acquisition hardware and analysis software tools actually provide the automated results of the system. This image acquisition and processing can take several forms, including the traditional frame-grabber-and-PC system design or new, compact, stand-alone machine-vision-system designs.
If the application requires high-speed acquisition of moving parts, then the frame grabber should support triggering. Triggered images with synchronized strobing will produce high-contrast images with no blurring. Other advanced frame-grabber features may include partial image acquisition, onboard decimation, look-up-table (LUT) processing, programmable gain, pulse-train generation, and a variable pixel clock for connecting to nonstandard analog cameras. By using onboard LUT routines, pixel values can be mapped onto a wide range of predefined LUTs to pull more contrast out of images (see table [below]).
Compact, stand-alone machine-vision systems provide the flexibility, integration, and ruggedness for most inspection, guidance, and identification applications. Typically the processor is lower performance than found in a desktop PC, but the smaller form factor, rugged design, and integrated image-acquisition functions make it good for many applications. These compact vision systems include a range of digital I/O options, allowing communication with many automation devices, including programmable logic controllers, relays, and robotic equipment.
Unlike desktop PCs, these systems have been designed with no moving parts or open vents so they can withstand extended operating temperatures, shock, and most rugged manufacturing environments. Since compact vision systems are involved in many inspection tasks and have limited processing capability, it is important to ensure that the image provides adequate contrast to eliminate any extraneous preprocessing and increase processing speed.
Processing tools
Image-processing libraries do the majority of the work in machine-vision systems. These libraries plug into popular application-development environments such as C, C++, Visual Basic, and LabVIEW. Users can access these libraries and develop fully customized inspection solutions that can perform a variety of inspections.
For the most part, the algorithms provided to solve an inspection task are similar across the industry. Some of the more common routines needed in machine-vision applications include pattern matching, optical character recognition (OCR), and gauging. These basic algorithms rely heavily on images with good contrast to perform at their highest performance.
Matching and gauging
Pattern matching provides information about the presence or absence, number, and location of the predefined templates within an image. For example, you can search an image containing a printed-circuit board for one or more alignment marks, or fiducials. The positions of the marks can be used to align the board for chip placement from a chip-mounting device. A template with good contrast along with an image with good contrast will result in higher-quality matches. An algorithm can be easily fine-tuned, since you do not need to account for false positives.
Gauging functions can automatically measure distances and angles between edges of an object. Edges must be clearly defined and detected by an underlying edge-detection routine. These routines look for contrast changes in a specified region of interest and classify the distance between these edges. Software provides the ability to determine the steepness and edge strength (see figure [below]).
Edge software routines can determine the steepness and edge strength to enhance image contrast. In a high-contrast image, the curve of change in pixel intensities at an edge shows a much higher slope resulting in a more accurate edge location.
In a high-contrast image, the curve has a much higher slope, resulting in a more accurate edge location. Gauging can also specify markers, calculate measurements between markers, measure critical distances, and find the position, angle, and sharpness of an edge. Gauging can later calculate edge distance measurements with subpixel accuracy.
Optical character recognition is essential for packaging and other identification applications. The system must correctly find the text, segment the individual characters, and then identify each of the characters. With good contrast images, the distance between individual characters is clearly defined, and the segmentation routines will be able to extract each individual character. Most OCR routines use a thresholding routine before identifying the characters. Good contrast results in clear characters that are easily recognizable from a predefined set of characters.
Other functions
Other routines found in image-processing libraries include functions to filter, manipulate, smooth, and quantify images. Arithmetic operations include add, subtract, multiply, and divide. In addition, there are local operations such as NOT, AND, OR, XOR, and compare. Filtering functions include threshold, autothreshold, low-pass filter (Gaussian), median filter, edge detection, and custom filters of any kernel size. Advanced color-analysis functions to identify, measure, compare, and match colors are ideal for accurately judging color quality in a variety of applications, including automotive, pharmaceutical, and printing.
Recently, stand-alone executable software tools using a rapid prototyping environment have entered the market. These tools are invaluable for testing different processing strategies. Other tools allow users to generate code or a builder file for use under application-development environments to complete an application. In addition, it is now possible to configure and benchmark a sequence of visual inspection steps, as well as deploy the visual inspection system in an automated environment.
Overall, the work done up front to specify the correct lighting, optics, and camera will save time in processing. A high-contrast image is ideal for software processing and analysis. With faster processors and higher-bandwidth bus hardware, doing the work up front to present the acquisition hardware and software with a high-contrast, noise-free image will maximize image throughput. ..
JASON MULLINER is product marketing manager of machine vision at National Instruments, Austin, TX, USA; www.ni.com.