Machine vision for quality control

Machine vision for quality control

Machine vision is behind many of the great advances in the automation of the industry since it allows the control of quality of 100% of the production in processes with high cadences.

A non-automated process can be inspected by the operators themselves in the production process. However, in a highly automated process, inspecting the total production manually is a really costly process. Sampling inspection, i.e. determining the quality of a lot by analyzing a small portion of the production, has been used as a compromise solution, but due to the increasingly demanding quality demands of the final product, sampling inspection is not the solution.

It is in this context that the need to incorporate automatic systems for quality control arises, among which stands out the visual inspection through machine vision. The human ability to interpret images is very high, adapting easily to new situations. However, repetitive and monotonous tasks cause fatigue and therefore the performance and reliability of the operator’s inspection decline rapidly. One must also consider the inherent human subjectivity that makes two different people provide different results in the same situation. It is precisely these problems that can best address a machine, because it never tires, is fast and results are constant over time.

It is logical to think that the aim of a machine vision system is to emulate the virtues of people’s vision. For this, the first thing we must ask ourselves is, “what do we see with?” A simple question that common mortals would answer without hesitation “with the eyes”. However, the people who dedicate ourselves to machine vision would answer in a quite different way and say “with the brain”. Similarly, it can be thought that cameras are in charge of “seeing” in a machine vision system, when really that process is carried out by the image processing algorithms.

Obviously, in both cases it is a simplification of the problem, since the process of vision, natural or artificial, cannot be carried out without involving both eyes / cameras and brain / processing, without forgetting another key factor, illumination.

Many efforts have been made to try to emulate the human capacity to process images. This is why in the 1950s the term Artificial Intelligence (AI) was used to refer to the ability of a machine to display human intelligence. Among those capacities is that of interpreting images. Unfortunately, our knowledge about the functioning of the brain is still very limited, so the possibility of imitating such functioning is too. The development of this idea in the field of machine vision has been carried out by means of what is called Machine Learning (ML) popularized in recent years with the techniques of Deep Learning (DL) applied to the understanding of scenes. However, these techniques do not really have intelligence behind them, but rather are based on feeding them with a huge amount of images previously labeled by people. The processing that allows to classify the images as expected is considered like a black box and really, in most cases, we do not know why it works or not.

When machine vision is applied to the industry for the quality control there is usually not enough data to apply these techniques and it is required that the behavior of the system is always very predictable, so these techniques have not yet been popularized in the industry. That is why, when developing applications of machine vision for the industry, the objective is to solve well-defined problems in which cameras and lighting are selected to enhance the characteristics that are desired to be inspected in the image and subsequently endowed the system with the capacity of interpreting the acquired images with really low error levels.

Finally, the inspection results are stored and used in the production process, both to discard the units that do not meet the quality requirements before adding them a new value or to improve the manufacturing process and therefore reduce the production of defective units. This information is also used to ensure that the product met the quality conditions when it was delivered to the customer.

Among the different applications in which these techniques can be use are geometric inspection, surface finish inspection, the detection of imperfections in manufacturing, product classification, packaging control, color and texture analysis… and so on.

At CARTIF we have carried out numerous installations of machine vision systems such as cracking and pore detection in large steel stamped pieces for bodyworks, detecting the presence, type and correct placement of car seat parts, the detection and classification of surface defects in rolled steel, inspection of brake disks, detection of the position of elements for their depalletising, quality control of plastic parts or the inspection of the heat sealing of food packaging.

Automatic visual inspection of linear infrastructure

Automatic visual inspection of linear infrastructure

Have you ever wondered how it is decided when a road or a tunnel should be repaired? The most common is that an operator notes damages down in his notebook while he goes walking, and then, these annotations are used to determine the state of the infrastructure. Operators often walk on the hard shoulder, while traffic circulates normally around them, with the corresponding threat to themselves and to users of the road. This task is really monotonous and repetitive, resulting in eyestrain that difficult to obtain an acceptable degree of reliability in the inspection. Furthermore, although the visual inspection adapts well to new situations when it is performed by human operators, it has a high degree of subjectivity, which causes that two different operators, or the same operator on different times, could provide different results.

The implementation of new technologies to perform these inspections can reduce the risks described, get objective results, increase the speed of inspection and make these data digitally available. In brief, working conditions of operators and the quality of the results are improved.

Among the different variables that are required to be measured in road infrastructure it can be found surface deterioration. To measure this deterioration is necessary to analyse the visual appearance of the surface. The technology that allows us to obtain this information, as you can imagine, are the cameras. But we must keep in mind that these surfaces have some quirks that do not allow us to obtain the desired results using conventional cameras.

Such surfaces are defined by having a limited width and indeterminate length but much greater than its width, so they could be considered continuous surfaces. The images of these surfaces should be taken in motion and as fast as possible in order to make the acquisition efficiently. To do this, although it would be possible to use area-scan cameras, it is much better to use linear camera. A linear camera builds the images capturing them line by line, and therefore a continuous image in the forward direction is constructed. The camera consists of a linear sensor, which is usually between 512 and 12,000 pixels. For capturing the object, it has to move relative to the camera, or the camera must move relative to the object.

The main advantage of using linear cameras is that it is only necessary to illuminate a thin line of the object to be inspected. As a result, the amount of energy required is reduced drastically and it is easier to illuminate homogeneously the area to be inspected. The lighting of a line is done primarily through LED light sources that focus light through optical in a desired line width. To achieve this, the lighting system must be at the proper distance from the object to be inspected and must be aligned with the camera sensor accurately. Laser illumination sources are also very effective, with the advantage that concentrate the light at any distance. Finally, incremental encoders are used to synchronize the acquisition of each image with the displacement of the surface to be inspected relative to the camera. Incremental encoders generate a pulse each time the inspection vehicle moves forward a certain distance, indicating the camera the exact moment for acquiring the line image.

Having the images of the surface to be inspected available is itself extremely useful for the infrastructure manager. However, what really gives added value to the inspection system is the automatic interpretation of images. You must remember that the ultimate goal is to detect damages on the surface and classify them by its type. Often, it is difficult to automatically differentiate defects from areas without deterioration and, moreover, defects of the same type have a very uneven visual appearance.

In order to process the images successfully, complex image processing techniques have been developed characterizing anomalies in the space-frequency domain.

CARTIF has collaborated with companies from the construction industry to address the inspection of this type of surfaces in several research projects. In one of them, it has been developed an inspection vehicle for detecting road surface deterioration. Furthermore, it has also been developed a platform for inspecting the surface of tunnels. Similar techniques also have been applied to the inspection of industrial products that fall within the definition of continuous surfaces, such as coils of cold rolled steel.

In all cases, the results of the inspection are displayed to the end user, so that appropriate decisions can be taken and, most importantly, it can be determined when the infrastructure has to be repaired.