If you’ve ever read about experiments that involve making computers recognize cats in photos, then you’ve been introduced to the concept of computer vision. This is a branch of computer science that advances the theoretical understanding of how computers can learn to “see” – or, in other words, recognize specific patterns and objects within
images. When these theoretical advances are applied to real-world challenges in manufacturing and built into actual devices, then you’re talking about a field within systems engineering called machine vision. Much more than mere image processing, machine vision takes visual data captured by highly advanced camera technology and uses specialized algorithms to extract useful information. This information is then used to guide the actions of industrial machinery and robotic equipment.
Many people are unaware of the extent to which the theoretical field of computer vision has produced tangible benefits for manufacturing. Embodied in compact smart cameras as well as powerful, PC-connected camera systems, the brilliant work of academicians is being used daily to make industrial operations safer, steadier and more productive.
Omron Microscan Systems, Inc.
An Integral Part of Today’s Industrial Automation Systems
The ability to automatically extract information from digital images opens many doors for manufacturers striving to cut costs, improve quality and streamline their processes overall. The primary uses of machine vision are inspection, gauging, and robot guidance. These tasks require repetitive activities to be performed as quickly as possible and with a high degree of accuracy, which is precisely what machine vision systems excel at. They have also become increasingly cost-effective and simpler to implement during the past couple of decades.
Figure 1: A smart camera inspects a line of printed circuit boards (PCBs).
Automated inspection is usually performed in-line, i.e. in tandem with items moving along the production line. Although the technology is complex, the basic sequence of using machine vision to perform automation tasks is simple: the vision system is triggered to capture an image when the part is in front of it, and then the system processes the image and extracts key features and data from it. Finally, it communicates the resulting data, which can be as simple as Pass/Fail, so that actions and decisions can be made. Such actions include triggering a reject mechanism or giving the locations of all parts for a robot to pick up.
Proper illumination on the production line is essential to ensure that the camera sees the key features it is trying to process. The lighting needs to be consistent so that changes perceived by the system reflect actual changes in the items being inspected rather than variations in the light source or ambient lighting. With advanced optics, superior illumination technology and state-of-the-art algorithms, machine vision systems can perform a wide array of industrial automation tasks, including product inspection, print inspection, surface defect detection, gauging, and robot guidance.
A Foundational Toolkit with Wide-Ranging Capabilities
Even with near-perfect lighting on the production line, there is still bound to be plenty of variation. How can machine vision deal with so much irregularity and still perform its tasks in a reliable manner? As it turns out, the extensive capabilities of machine vision boil down to just a few fundamental functions: location, measurement, counting and decoding. These four tasks depend on the common capabilities of recognizing pixel intensity values, finding edges contours, and matching shapes and patterns. These are complex tasks that involve comparing an image to a template pixel by pixel or comparing a set of perceived edges (generated by calculating the gradient of neighboring pixel intensities) to the edges of a template. There are many ways that pattern matching is performed and optimized, but for the purposes of this white paper we will focus on the resulting functionality that industrial professionals can make use of.
Let’s look at each foundational task in greater detail.
Figure 2: A set of basic machine vision tools offered with Omron Microscan’s AutoVISION 5.0, including location, counting, measurement, decoding, optical character recognition (OCR), optical character verification (OCV), color verification and more.
Basic Function: Location
In many cases, complex machine vision processing tasks begin with object location. The system is trained to recognize a specific pattern that it will then locate in various images featuring a variety of backgrounds. A common example of something a machine vision system would be expected to locate over and over is a two-dimensional barcode such as a Data Matrix. The system must find a barcode before it can decode it, and it must often do this extremely quickly as products bearing the codes fly by at high speeds. (In fact, high-performance smart cameras can inspect up to 4,000 parts per minute, or the equivalent of a conveyor belt moving at 300 inches per second!) Specific aspects of the codes indicate to the vision system that a barcode is present, as do other graphics that typically reside near barcodes, such as logos.
Matching specified patterns within the field of view also makes it possible to detect defects based upon how closely the located object corresponds to the pattern supplied for training. If the image of an item has a significant amount of deviation from the expected pattern – for instance, the presence of pixels not matching the expected color or edges in places that shouldn’t have edges – it will be flagged for rework or rejected from the production line.
Basic Function: Counting
Once a machine vision system can locate an object of interest, it can count the number of similar objects present in an image. It can also tell whether the object is NOT present in an image, so a presence/absence test also falls under the category of counting. In the automotive industry, for example, the counting function is used to determine whether a component has the proper number of machined holes. Components with the wrong number or size of holes will be removed from the production line instead of becoming part of a new car.
Figure 3: A part is inspected for the correct number and placement of holes.
Basic Function: Measurement
Machine vision can also calculate the distances between objects that it has located, a task known as gauging. It makes exceptionally precise measurements to verify that the distance between two components of a product – such as the bottom of a medication vial and the point to which the bottle is filled – meet expectations. Before the vision system can perform measurements, it must first be calibrated. Simple calibration involves telling the system that a unit of measure equals a certain number of pixels. More complex calibration involves showing the system a grid pattern wherein the grid spacing equals a known value. This ensures that measurements will be good even if the camera is tilted or rotated, or if there is distortion in the lens.
No physical manipulation of the objects on a production line is necessary to take measurements using vision, so there’s no associated risk of damaging parts as there is with contact gauging. For this reason, machine vision gauging has virtually replaced contact gauging now that machine vision systems cost less to set up and require less programming knowledge. They can perform thousands of measurements per second, including tricky calculations like circularity that contact gauging has a hard time with. (This is because contact gauging is limited to a few points of contact, whereas vision can quickly and easily utilize up to 360 points on a circle to get a much better answer.)
Figure 4: A part is inspected for circularity and the proper orientation of protrusions.
Basic Function: 1D and 2D Decoding
In many industries, especially consumer electronics and automotive, all parts are marked with machine readable codes. It is an essential function of the machine vision system that it can decode these symbologies so that the parts can be tracked throughout the production process, and documented as to which finished product they become part of. This is a concept known as Track and Trace. This information can be recorded as historical data in case questions arise at a later date, such as when trying to determine what limited set of products may need to be recalled because of a faulty component.
Figure 5: A direct part mark (DPM) on a metal surface.
By combining these basic functions – location, counting, measurement and decoding – in various ways, industrial automation systems can take care of nearly any inspection task put in front of them. The one thing they can’t do, however, is read the minds of humans. For this reason, industrial automation solution providers need to tell machine vision software what to look for by pre-programming it with specific patterns and logical proceedings.
An Applied Science with Concrete Benefits
Compared with human inspectors, machine vision offers vast improvements in speed and consistency. It also works tirelessly around the clock to consistently deliver quality products and reliably catch botched items. Downtime is minimized as machine vision systems take care of inspection-related tasks quickly, accurately and consistently, allowing corrective measures to be performed on the fly. Data gathered over time on the suitability of inspected items can also be analyzed to discover trends such as the wear and tear of cutting tools.
Real World Example: 1D and 2D Code Verification
One good example of the process control benefits of machine vision is Code Verification. Essential for the traceability of products and product parts, machine readable codes are printed, dot-peened or engraved onto components about to embark on the production journey. The quality of codes can be inconsistent and can degrade over time based on the performance of the marking system, so machine vision technology is used to verify the readability of these codes. Advanced code verification systems grade a variety of symbologies according to standards set by the International Organization for Standardization (ISO). They also keep track of grading trends and record information about barcode quality in order to keep an eye on printer functionality and provide a reference in case disputes arise over symbols that don’t scan.
Figure 6: A label verification system is installed on a production line to ensure consistent label codes and print quality at high speeds.
Machine vision can also recognize and verify human-readable symbols, tasks known as Optical Character Recognition (OCR) and Optical Character Verification (OCV). These are important functions because many items bear human-readable codes alongside the machine readable ones, and both types of marks needs to be read to verify that the data matches. OCR is used to do the actual reading, and its strength is in reading characters even when they are deformed. OCV, on the other hand, is used to look at the quality of the printing. It ensures that characters such as a 3, 8, 6 or B are sufficiently clear that they will not be confused when read by a human. Preforming OCV on printed expiration dates is the perfect example of the usefulness of this technology. You would not want anyone misreading an expiration date and ingesting expired food or medicine. The image below shows how OCV looks at the shape of characters on a pixel-by-pixel basis.
Figure 7: Screenshot showing OCV data.
Real World Example: Medicine
Patient safety depends on medications being exactly what their labels say they are. Since one person’s lifesaving medicine could be another person’s poison, there is absolutely zero tolerance for error. Machine vision systems can verify that the initial markings placed on vials at the beginning of the production line match the labels added later. They can also determine whether the color is correct, the cap is on properly, the label is free of damage and the fill line matches expectations.
Figure 8: A smart camera inspects a series of test tubes.
Real World Example: Automotive
Today’s automobiles are more complex and have more selectable options and features than ever before, making production errors increasingly likely. Machine vision helps manufacturers and suppliers prevent defects throughout the production process. It can guide robots to pick parts out of racks, verify that they are the correct part, inspect the part for quality, and then position the part for assembly.
The introduction of smart cameras has greatly improved the options for using machine vision in the automotive industry because it allows for a distributed system of independent inspection at multiple points along the production line. Smart cameras combine optics, lighting, vision software and communications in a single device, making it unnecessary to have a single processing center for all inspection points.
Figure 9: Automobile dashboard icons require inspection for correct placement and coloring.
Real World Example: Robot Guidance
Capitalizing upon its ability to locate patterns, machine vision technology excels at guiding robotic equipment to pick up necessary objects. Without machine vision, these objects would need to be placed in the exact same spot every time, and the slightest deviation from the expected location would discontinue processing for at least one product and possibly stop the production line altogether. It would also be extremely tricky to direct robots to grasp objects on a moving conveyor belt.
With machine vision, however, the location of objects – including moving targets – is relatively easy. The system triggers vision at a specific instant in time, and the software locates the desired objects in the image. The system calculates the position data for each part, adding what it knows about how far the objects would have traveled from the time it was triggered, and then sends the “pick” location of these parts to a robot. Basically, the computer version of skeet shooting – where you need to aim and fire the gripper towards a point where the object will be – is what allows a vision-controlled robot to pick up objects on the fly.
A Rapidly Evolving Technology
Machine vision is getting more advanced by the year. Once an expensive investment that required a significant amount of programming know-how, this technology is now simple to set up, simple to use, and much, much cheaper than before. The dramatic improvements in accuracy, speed and reliability have made machine vision – and particularly smart cameras – an extremely hot engineering topic. Given the wide variety of tasks that machine vision systems can already accomplish, it will be exciting to see what innovations the near future brings.
- Microscan®. (2017). Ensure 100% Traceability and Quality of Your Products Using Omron Microscan Automatic Identification and Machine Vision Systems. Retrieved January 15, 2018 from http://files.microscan.com/resources/Assembly_Presentation.pdf
- AIA Vision Online. (2014). Computer Vision vs. Machine Vision. Retrieved January 15, 2018 from https://www.visiononline.org/vision-resources-details.cfm/vision-resources/Computer-Vision-vs-Machine-Vision/content_id/4585
- Quality Magazine. (2004). Machine Vision Makes Gaging Easy. Retrieved January 15, 2018 from https://www.qualitymag.com/articles/84497-machine-vision-makes-gaging-easy
About Omron Microscan
Omron Microscan focuses on technologies of automatic identification (auto ID), machine vision, and illumination with application solutions ranging from basic barcode reading up to complex machine vision inspection, gauging, and measurement. Our solutions help manufacturers around the world drive down cost and waste, automate critical manufacturing processes, and increase yields. www.microscan.com
More Bar Code news of interest:
Get The Bar Code News once a month, once a week or once a day. Subscribe here.
Follow us on Twitter: https://twitter.com/TheBarCodeNews
Follow us on Facebook: https://facebook.com/TheBarCodeNews