Shape from shading

Notice

Further information including software examples can be found below under Related topics.

Surface quality inspection aims at identification of shape deviation of objects and structure irregularities. For quick inspections with maximum reliability, the object to be inspected is illuminated from various directions while an image is taken of the resulting shadows for later processing and evaluation. This approach is called "shape from shading" (SfS).

The Baumer CX.I cameras feature four individual power outputs with pulse width modulation and up to 120 W (max. 48 V / 2.5 A). Utilized in combination with the sequencer, these four outputs make allow for convenient quadrant illumination control in line with the shape from shading principle.

VT_Quadranten_Ringbeleuchtung_in_Seitenansicht_und_Draufsicht.png
4-quadrant ring light: side view (left) and top view (right)
Output configuration

Each quadrant of the ring light must be configured. To prevent errors, all four quadrants should use the same configuration.
 

Notice

Please observe the general information on commissioning, maximum load capacity, and output configuration in the camera user guide (Baumer_UsersGuide-VCX*_MNL.pdf).

The latest software and technical documentation are available at: www.baumer.com/c/42957/products

VT_Parametrierung_der_Outputs_für_Shape_from_Shading.png
Configuring the output parameters for shape from shading
Intended camera behavior

Shape from shading requires the camera to be in trigger mode. Four images will be acquired upon one incoming trigger signal. With each of the four images acquired, the respective quadrant is switched by the assigned camera output.

VT_Verhalten_der_Kamera_für_Sfs_2.png

Camera behavior for shape from shading

VT_Timing_Diagramm_für_Shape_from_Shading.png

Timing diagram for shape from shading

Sequence timeline

The Sequencer configuration for shape from shading is as in the example below, taking into account the basic sequencer principles.

o    first sequencer set to activate illumination upon start of exposure

o    second sequencer set to switch off  illumination at the end of exposure

VT_Zeitlicher_Ablauf.png
Time sequence

Implementation

As the sequence needs to be started by a trigger, a TriggerSource must be defined. In this example, this is Line0. The trigger signal enters via this source.

 

Outputs/Illumination control

 Camera mapping of the individual output status (Lines) is binary while parameter configuration is  in hexadecimal format.

 

 

Line 7

Line 6

Line 5

Line 4

Binary value

UserOutputValue

(hex value)

All Lines OFF

0

0

0

0

0000

0

Line4 ON, other Lines OFF

0

0

0

1

0001

1

Line5 ON, other Lines OFF

0

0

1

0

0010

2

Line6 ON, other Lines OFF

0

1

0

0

0100

4

Line7 ON, other Lines OFF

1

0

0

0

1000

8

All Lines ON

1

1

1

1

1111

F

Sequencer set 0
The first sequencer set is the idle set. At this point, the camera is waiting for the incoming trigger and the illumination is deactivated (UserOutput Value = 0). The rising edge of the trigger signal is used to start the first exposure and switch to the second sequencer set.

Sequencer set 1
In the second sequencer set, TriggerMode is deactivated. The rising edge of the ExposureActive signal relating to the first image is used to switch to the next sequencer set.

Sequencer set 2
This sequencer set has Line4 output activated meaning the illumination of quadrant A is active. (UserOutputValue is set to 1.) The falling edge of the ExposureActive signal relating to the first image is used to switch to the next sequencer set.

Sequencer set 3
This sequencer set will deactivate the quadrant A illumination at the end of the first exposure.

Sequencer set 4
In this sequencer set, the Line5 output is activated, which means that the illumination for quadrant B is also activated. (UserOutputValue is set to 2.) The falling edge of the ExposureActive signal relating to the second image is used to switch to the next sequencer set.

Sequencer set 5
In this sequencer set, the illumination for quadrant B is deactivated at the end of the second exposure.

Sequencer set 6
In this sequencer set, the Line6 output is activated, which means that the illumination for quadrant C is also activated. (UserOutputValue is set to 4.) The falling edge of the ExposureActive signal relating to the third image is used to switch to the next sequencer set.

Sequencer set 7
In this sequencer set, the illumination for quadrant C is deactivated at the end of the third exposure.

Sequencer set 8
In the last sequencer set, the Line7 output is activated, which means that the illumination for quadrant D is also activated. (UserOutputValue is set to 8.) The falling edge of the ExposureActive signal relating to the fourth image is used to switch to sequencer set 0.

VT_Implementierung_von_Shape_from_Shading.png
Implementation of shape from shading

Result

One after another, the four acquired images of the inspected object are transmitted to a computer where they are composed to form a single image. This image serves for surface quality inspection by showing any form or structure incompliance.

VT_Ergebnisse_der_unterschiedlichen_Beleuchtung_2.png
Results of the various illuminations and the composed image created

Related topics


Product portfolio


Support

Please contact our Technical & Application Support Center with any questions.

Phone: +49 3528 4386 845
E-mail: [email protected]

To the top