Photometric Stereo for 3D Surface Inspection | Computer Vision | Euresys

Product / 11.2021


Though a large majority of machine vision applications are solved using two-dimensional imaging, machine vision applications using or requiring 3D measurement and inspection are growing significantly. Numerous techniques are used for extracting 3D information from scenes. Let’s mention structured light (including laser-scanning based triangulation), stereo or stereoscopic vision and time of flight sensors.
One, probably lesser known, of these techniques is Photometric Stereo. Euresys’ Photometric Stereo function estimates the orientation and albedo of each point of a surface by acquiring several images of the same surface taken from a single viewpoint but under illumination from different directions. The different images are acquired in sequence, in synchronization with the lighting, thus requiring only one camera.
Photometric Stereo is suitable for the detection or inspection of details (be they defects or information) present on the surface of objects.
The Photometric Stereo algorithm is available in Euresys’ Open eVision Easy3D library. It can be used as a preprocessing phase before other operations such as code reading (with the EasyMatrixCode, EasyQRCode or EasyBarcode libraries), optical character recognition (EasyOCR), alignment (EasyMatch or EasyFind), measurement (EasyGauge) or defect detection (EasyObject or EasySegment).

How does it work?

For a given vision set-up (positions and angles of the object to be inspected, the lights (typically 3 or 4) and the camera), the software tool first requires the calibration on a reference object [(hemi-)sphere] or the manual introduction of the set-up precise geometric characteristics.
Figure 1. Inspected object with multiple lighting angles in front of the camera..


From then on, the image capture of inspected objects is performed in multiple steps corresponding to the various lighting angles.
At the user’s request, Photometric Stereo individually extracts a number of variables (normal to the surface, albedo, X & Y gradients, mean and Gaussian curvatures). These are used for the reconstruction/rendering of the 3D information in the 2D domain making it ready for further processing by other libraries.

Figure 2. Images of blister under various lighting conditions and inspection.
The above Figure 2 illustrate the entire process:
  • The object captured by the camera under four lighting conditions (images 1 to 4)
  • The reconstructed image based on the selected measurements (image A)
  • The isolated subset of data useful for the chosen inspection (image B) (here we have chosen to use the Gaussian curvature information)
  • The results of the inspection by deep learning, using the Open eVision EasySegment lbrary, supervised mode (image C) applied to the image in (B). The two puncture points can clearly be identified.


A few tests allow the identification by the user of the most appropriate variables to recover for his application. These steps will result in the optimization and potentially speeding up a time critical process.

e.g. Some detections will require specific linear detections or alternatively the detection of sharp edges. The specification of a specific Region of Interest (ROI) is also possible.  Tuning these parameters to the actual application results in significant speed improvement.
Considering the occasional less than perfect object position, observation conditions or lighting, the function also allows for the compensation of:
  • ambient lighting (dark image), and
  • non uniform lighting (flat reference image)


One can see how the useful information originally not detectable from the original image can be enhanced by Photometric Stereo to be effectively exploited by a standard eVision library (EasySegment in this instance).
The Photometric Stereo Imager functionality is available in Euresys’ Open eVision Easy3D Library.

An Imaging & Machine Vision Europe article