Vision systems basics
Machine Vision is the discipline that encompasses imaging technologies and methods to perform automatic inspection and analysis in various applications, such as verification, measurement, process control. A very common approach in machine vision is to provide turnkey vision solutions, i.e. complete systems that can be rapidly and easily configured for use in the field. A vision system is usually made up of every component needed to perform the intended task, such as optics, lighting, cameras and software. When designing and building a vision system, it is important to find the right balance between performance and cost to achieve the best result for the desired application.
Usually vision systems are designed to work in on-line applications, where they have an immediate impact on the manufacturing process (real-time systems). A classic example of this on-line concept is the possibility to instantly reject a product deemed non-compliant: the way this decision is made, as well as the object features being evaluated, defines different classes of vision systems.
Applications
Vision systems can do many different things: measurement, identification, sorting, code reading, character recognition, robot guidance etc. They can easily interact with other machinery through different communication standards. Here below are some of the main application categories for a vision system:
Measurement. One of the most important uses of vision technology is to measure, at various degrees of accuracy, the critical dimensions of an object within pre-determined tolerances.
Optics, lighting and cameras must be coupled to effective software tools, since only robust subpixeling algorithms will allow to reach the accuracy often required in measurement applications (e.g. even down to 1 um).
Defect detection. Here various types of product defects have to be detected for cosmetic and/or safety reasons. Examples of cosmetic flaws are stains, spots, color clumps, scratches, tone variations, etc. while other surface and/or structural defects, such as cracks, dents, but also print errors etc. can have more severe consequences.
Verification. The third major aim of a vision system is checking that a product has been correctly manufactured, in a more general sense that goes beyond what previously described; i.e. checking the presence/absence of pills in a blister pack, the correct placement of a seal or the integrity of a printed label.
Types of vision systems
Several types of vision systems are available on the market, each being characterized by a different level of flexibility, performance and cost. Vision systems can usually be divided into three classes: PC based, compact and smart camera based.
PC based. The classic machine vision system consists of an industrial computer that manages and communicates with all the peripheral devices, such as cameras and lighting, quickly analyzing the information via software. This solution provides high computing power and flexibility, but size and cost can be significant. PC based systems are recommended for very complex applications, where multiple inspection tasks must be carried out at a fast rate with high-performance hardware.
Compact. A “lighter” version of a PC based system is called a Compact vision system. Although it may require some tradeoff between performance and cost, it is often enough for less demanding applications. Compact vision systems usually include a graphics card that acquires and transfers the information to a separate peripheral (e.g. an industrial tablet or an external monitor). Sometimes, compact vision systems not only manage the first level input - lightning, camera and trigger inputs - but also have embedded first level inputs.
Smart Cameras based. The simplest and most affordable vision systems are based on smart or intelligent cameras, normally used in combination with standard optics (typically a fixed focal length lens) and lighting. Although typically recommended for simpler applications, they are very easy to set up and provide similar functionalities to classic vision systems in a very compact form factor.
Smart camera
Smart Camera
A smart camera is a basic vision system containing:
- a sensor
- an image digitization system
- an image processing system
A smart camera is slightly larger than a normal camera.
Through evolution smart cameras are no longer relegated to simple tasks (such as reading barcodes) and are a valid alternative to the classic setup consisting of a camera and a computer.
At the moment, the main differences between smart cameras are in the processing unit, which may be based on:
- a DSP, which is a processing unit optimized for specific tasks. It is less flexible than other solutions and often needs proprietary utilities to be configured
- ARM + FPGA. The ARM processor is often used for generic applications, while the FPGA is only used as a performance accelerator. It provides greater flexibility compared to the setup based on a DSP. The support is often limited to Linux, but with certain frameworks one can use code written by the user.
- ARM + GPU. The GPU is used as an accelerator, as in the previous setup.
- CPU + VPU. A Visual Processing Unit is often used as an accelerator together with a CPU (ARM or x86) with generic tasks. It differs from ARM + FPGA or ARM + GPU solutions, as the chips are not in the same SOC. There are no substantial differences on the user’s side.
- X86 board. The setup is more similar to a PC. It allows for great flexibility, as it can support different operating systems and code written by the user.
Table with pros and cons of different solutions:
Platform |
Pros |
Cons |
DSP |
|
|
ARM + FPGA |
|
|
ARM + GPU |
|
|
CPU + VPU |
|
|
X86 board |
|
|
A smart camera may also feature a GPIO and a communication interface.
How a vision system works
The architecture of a vision system is strongly related to the application it is meant to solve. Some systems are “stand-alone” machines designed to solve specific problems (e.g. measurement/identification), while others are integrated into a more complex framework that can include e.g. mechanical actuators, sensors etc. Nevertheless, all vision systems operate are characterized by these fundamental operations:
Image acquisition. The first and most important task of a vision system is to acquire an image, usually by means of light-sensitive sensor. This image can be a traditional 2-D image, or a 3-D points set, or an image sequence. A number of parameters can be configured in this phase, such as image triggering, camera exposure time, lens aperture, lighting geometry, and so on.
Feature extraction. In this phase, specific characteristics can be extrapolated from the image: lines, edges, angles, regions of interest (ROIs), as well as more complex features, such as motion tracking, shapes and textures.
Detection/segmentation. at this point of the process, the system must decide which information previously collected will be passed on up the chain for further elaboration.
High-level processing. The input at this point usually consists of a narrow set of data. The purpose of this last step can be to:
- Classify objects or object’s feature in a particular class
- Verify that the input has the specifications required by the model or class
- Measure/estimate/calculate specifics parameters as position or dimensions of object or object’s features