A Photometric stereo application for industry vision – produced by MTS

In this article we would like to introduce you to our solution for digital visual inspection. We felt the need to develop this program due to the increasing requirements for accuracy and quality; inherent in the product inspection of automatic production lines. 

This application, which is based on a machine vision method called ‘photometric stereo’, has already helped us to solve several complex projects. Primarily, they were: surface defects, blemishes on dirty parts, shape accuracy, component placement accuracy, contact errors on printed circuit boards, intricate types of identification, and also for determining the rotation of parts where the dissimilarities were profoundly miniscule.

A photometric stereo technique uses several images from one camera, and each shot is taken with the scene illuminated from a different angle. Based on these images, the algorithm can determine the tilt of the surface at each point of the snapshot. The output of the algorithm is a map that has the same resolution as the resolution of the camera, and at each of its points; the perpendicular of the surface at the given point is coded — in other words, it is a normal vector map. 

In order to be able to switch the lighting of the scene as quickly as possible, we have developed (in cooperation with an external company) an addressable light — the switching of which is controlled by a so-called dummy industrial camera. The light has 194 individually controllable LEDs; the lighting of which can be adaptively arranged in accordance with the necessary shooting sequence.  

The abovementioned images are transferred to a computer using Cognex VisionPro and Cognex Designer software. After collecting a predefined number of images; they are processed into typical map format using an algorithm that we developed as a plugin for Cognex Designer. This plugin is specially adapted and optimised so that it can use the power of the graphics card for the fastest possible processing. 

We can also process these maps as RGB-coloured images, and/or with the help of the filters we have created; we can directly emphasise the relevant details — thus, converting the images into shades of grey, and evaluating them with the classic VisionPro tools. We also frequently juxtaposition the vectors from the previously photographed object with the current product. This provides us with the ability to directly compartmentalise and extract the individual errors exclusively. 

The development of this system was possible thanks to God, thanks to our fantastic work environment, and thanks to the exceptional team of experts we have at MTS. Please also see the attached video where our application is shown in practice.