Machine vision for object and anomaly identification
Una de las áreas de la Inteligencia Artificial que más se está desarrollando en los últimos tiempos es la visión artificial. Sus innumerables aplicaciones en multitud de ámbitos, está haciendo que su implantación en sectores como industria, deporte, sanidad, seguridad… se multiplique exponencialmente.
Let’s start with the very definition of machine vision which, as the name suggests, consists of giving machines the visual capabilities of human beings, or in other words, enabling computers to see. This is achieved through pattern recognition in fragments of the image being analyzed, but let’s take it step by step.
As we mentioned, machine or computer vision is undergoing a major transformation and expansion, driven by machine learning. Focusing on industrial activity, and taking anomaly detection as an example, more ‘traditional’ machine vision systems manage to identify, for instance, defects that have been predetermined for a specific product, helping to improve its quality. With the application of machine learning, and specifically deep learning, a new level of evolution is achieved, making it possible to identify previously undefined deficiencies.
The fundamental difference is that while in earlier developments machines are given a specific product defect which they subsequently identify, in the latter they recognize the ideal image and, based on their own experience, learn to identify all the elements that don’t form part of it, making it possible to detect new differential patterns.
How do machines see?
But… how do machines manage to ‘see’ and carry out the processes we’ve been discussing? We need advanced algorithms that examine images and identify patterns through which they can determine whether the product being analyzed has anomalies, defects, or alterations.
To reach this point, the system needs to be trained, teaching it which characteristics it needs to recognize in the images shown to it. To achieve this, each image must be labeled at the pixels or groups of pixels that correspond to the figure the machine is meant to learn, so that it can locate them in new captures and identify them with the previously learned object. And as with any training method, results are based on consistency and repetition: the more images shown to the model, the better the results obtained.

Let’s look at an example. If we’re developing a machine vision tool for a wine bottle production line, the system will be shown numerous images of bottles with the relevant pixels labeled. This way, the algorithms learn their characteristics (shapes, edges, colors, size, etc.) in order to later recognize them autonomously in images.
After the training stage, the system is ready for automatic element recognition, a process in which artificial intelligence comes into play, and more specifically, deep learning. This branch of machine learning works with convolutional neural networks, which mimic the behavioral dynamics of biological neural networks.
The advanced algorithms used scan the image based on small areas of it. This way, each small group of pixels passes through the various layers of the network, organized so that the first layers identify simple shapes (lines, curves, colors, etc.), recognizing increasingly complex elements at each step (figures, faces, etc.). The more layers the network or mesh has, the more accurate the results obtained will be.
Once all the pixels have been examined, machine vision systems determine which of the characteristics obtained match—going back to our earlier example—the bottle on our production line and its learned attributes. From here, if the tool detects anomalies in the ideal bottle image defined during training, it will trigger an alarm or remove the bottle from the conveyor belt, depending on the task assigned to the line.
Applications of machine vision in industry
The potential applications of machine vision are countless and, as we’ve already mentioned, applicable to all sectors of activity. In the industrial field, which we’ve focused on, it can be used not only for anomaly detection but also for object classification, removal of defective items, sorting by size or other material characteristics, and part measurement, among other applications.
With the use of machine vision, all these processes become faster and more precise, allowing us to identify faults early on and remove defective elements or items from the production chain, resulting in cost savings and increased efficiency and quality.