Guest Column | March 22, 2000

Hanks on Machine Vision: Understand Your Application

National Instruments Corporatione machine vision effectively, you must identify your application class and determine your goals, then develop a vision system to meet them.

By: John Hanks, <%=company%>

Contents
Define your application
Identify your goals
Estimate the inspection time
Improve your time

Tireless PC-based vision systems are inspecting and guiding an ever-widening range of applications. These applications range from saving lives by detecting that the correct drug capsule is placed in the packaging before shipment to the pharmacy, to inspecting antilock brake sensors before they are assembled on your car. These applications are classified as inspection applications.

The Automated Imaging Association (AIA) Machine Vision Market Survey 1997 to 2002 classifies the majority of the general-purpose machine vision applications, such as part present/not present, mechanical assembly verification, electronic connector, and container inspection, into this general inspection category. Many of these types of applications require minimal mechanical fixturing, material handling, lighting equipment, and vision software knowledge, frequently making application development straightforward. So, if you are a measurement or automation professional new to vision, this is the type of application with which you probably want to begin.

top

Define your application
You can classify machine vision applications into four categories: gauging, inspection, identification, and alignment.

Gauging refers to measuring critical distances on manufactured part. You can inspect and gauge components, such as electronic connector and leads, with vision software. Vision software can quickly and consistently measure certain features on a component and determine whether the part meets tolerance specifications. Gauging applications use vision techniques such as "edge detection" and "caliper tools" to measure distances.

Inspection means looking to see if a mechanical part has been assembled properly. For example, inspecting the pins in an electronic connector to check for missing pins or bent pins.


Figure 1. Machine vision software for LabVIEW inspects the mechanical assembly of this fastener (top) by using edge detection (bottom). The part is assembled correctly if two edges are counted under the line profile.

Alignment often involves using pattern-matching software to locate a reference object and then physically moving the object within some tolerance. For example, you align an unpopulated computer board properly before placing components on the board.

Identification refers to classifying manufactured items. In an automotive assembly plant, parts often need to be identified or sorted using vision. You can sort tires, for example, using features such as the tread pattern, inner and outer diameter, and the writing near the inner whole. This writing is for human reading, not machine reading, so you need other parameters to uniquely sort the tires.

The first three—gauging, inspection, and identification—tend to be simpler than alignment applications. Alignment involves more mechanical fixturing, lighting consistency, location analysis software, and speed.

Overall, according to the AIA survey, roughly 55% of vision applications fall into the category of gauging, inspection, and identification; the other 45% are alignment applications that typically use both vision and some motion control hardware.

Once you have determined your inspection needs, you are ready to start your vision application. Determining your inspection goals is one of the first steps towards building a vision application.

top

Identify your goals
In several studies, humans have proven only 80% accurate in inspection applications. Human inspectors' minds tend to drift off, thinking of things such as last week's football game or what they are going to do next weekend. Let's face it: if your job is inspecting manufactured parts, the task could get tedious quickly. Automated inspection provides a more accurate, reliable, and tireless solution for these inspection applications.

The first task is to determine a budget and what it will cost not to have an inspection system—will the cost of the system pay for itself because it will improve the manufacturing process therefore improving yield, or will it reduce overhead such as support cost, returns, and so on. For example, a manufacturer of building materials estimated that 15-20% of their product was scrapped because of process flaws and defects. In one plant, they manufactured more than 100 million lb of material annually. They estimated that if a vision system could reduce their scrap by 50% and their material cost a minimum of $0.34 per lb, then the resulting savings could be as much as $1.7 million for one plant. The company has more than 50 plants. Because of the potential savings, this company quickly adopted machine vision as a core manufacturing technology.

In addition to determining whether or not machine vision is an economically effective solution, cost also guides whether you choose to build or buy a system. For the web inspection application just discussed, the concept of percent inspected proved important ('web' refers to materials that are made in sheets, such as textiles, insulation materials, and plastics). In this case, 100% inspection of the material was not necessary—the company simply needed to inspect the material every 12 in. If 100% inspection had been required, the computational power and overall system cost would have been much higher, possibly deterring the company from using vision.

Another consideration is system variations. In this inspection application, system variations were important because it is a dusty manufacturing environment, so a ruggedized PC and an enclosed inspection area were required. Finally, as one of your goals, you must consider the operator profile. Operators for this inspection system were not technology-savvy, so the system had to be easy to configure with a simple user interface and minimum calibration and maintenance.

top

Estimate the inspection time
The next step after cost assessment is to calculation the inspection time. Calculating the inspection time should include:
  • Material handling time
  • Image acquisition time
  • Processing time

Wow, you might be thinking, it's early in the process to be getting this technical. If you make this calculation and the time required for inspection is a factor of ten greater than the time allowed by the manufacturing process, then you should consider not spending any more time with the current solution and start looking at other alternatives. Often, the requirements are that the vision system cannot slow the production process.

For the processing time, you should take into consideration the type of processing. If your application is gauging, then typically you use edge detection along line profiles to test for part alignment and orientation. You can use the line profiles and edge detection along these line profiles to "gauge" a critical measurement. Edge detection along line profiles is a relatively fast calculation.

Overall, if you cannot meet the minimum inspection time, consider changing your frame grabber or vision software strategy, or consulting with your systems integrator. Many software tools such as IMAQ Vision Builder (National Instruments; Austin, TX) help you to determine if your software strategy meets your speed requirements. With this tool you can interactively configure a vision inspection task and then benchmark the speed of the application on the PC to determine the inspection rate. You can then try several inspection methods to verify the fastest technique.

top

Improve your time
Using the following enhancements, you can improve your visual inspection time:

•Use a digital camera, with faster image acquisition rates (up to thousands of frames/s) rather than an analog camera (30 frames/s).

•Use vision software that has been MMX enabled. MMX enabled software for some functions is up to 400% faster.

•Use image acquisition hardware that works with onboard partial image scanning, programmable region of interest, or onboard pixel decimation. The strategy here is that reducing the number of pixels to process can greatly reduce the amount of time needed to process the image.

•Use onboard image processing. The rate at which PC computing power is improving makes the expense of extra processing power on a plug-in board hard to stomach. Sometimes, you can wait a few months and the PC will now meet your inspection time requirements—take, for example, the introduction of MMX technology.

Next month, read about "Clearly Identifying Features and Defects" in vision applications.

About the author…
John Hanks is the Vision and Motion Control Product Manager at National Instruments. In his ten years with National Instruments he has worked for National Instruments in application engineering, marketing, and product management. He has also worked for Siemens Medical Systems Magnetic Resonance Imaging Division as an imaging support engineer. Degrees include engineering B.S. from Texas A&M and an engineering M.S. degree from the University of Texas. As a researcher at the University of Texas he studied image-processing algorithms and develop a system for biomedical cell counting. John has more than fifty published articles on signal processing, machine vision, and measurement technologies. He can be reached at National Instruments, 11500 North Mopac Expressway, Bldg. B, Austin, TX 78759. Phone: (512) 794-0100; fax: (512) 683-5569; e-mail: John.hanks@ni.com.