Calibration
The calibration is used to apply the transformation between a depth map and a point cloud or a mesh.
There are 3 ways to setup this conversion:
□ | Apply a simple scale on the pixel coordinates of the depth map (EScaleCalibrationModel class) |
□ | Use the explicit geometric model (EExplicitGeometricCalibrationModel class) |
□ | Use the object-based calibration approach (EObjectBasedCalibrationModel class) |
These models share the same base class ECalibrationModel and exposes the method Apply(), which is used to apply the conversion between a depth map pixel and a 3D point. It takes as input the coordinates of one point in a depth map and it returns the coordinates of the corresponding point in the 3D space.
The method Apply is not aware of the possible mirroring of the corresponding depth map and cannot make use of EDepthMap::EAxisSystemType (see below). If necessary (when the corresponding depth map is vertically mirrored) the y coordinates should be flipped before calling the Apply method.
□ | The class EDepthMapToPointCloudConverter generates a point cloud from a depth map, using one of the calibration models. |
□ | The class EDepthMapToMeshConverter generates a mesh from a depth map, using one of the calibration models. |
By convention:
□ | The origin of the referential is the lower-left corner of the depth map. |
□ | The center of the first pixel at the lower-left corner is at x = 0.5 and y = 0.5. |
□ | The center of the pixel at the upper-right corner is at x = width - 0.5 and y = height - 0.5 where width is the width of the depth map and height is its height. |

By default, Easy3D considers that the origin of the 3D axis of the depth map is the bottom left of the internal image buffer, and the Y axis is pointing up. This means that the depth map image is not seen as vertically mirrored compared to the real world image of the scanned object.
Nevertheless, depending on your acquisition setup this mirroring can happen (for example if the direction of the scan is inverted).
If this is your case, you can set the EDepthMap::EAxisSystemType to EAxisSystem_UpperLeftCorned, meaning that the origin of the 3D axis is on the upper left corner and the Y axis is pointing down.
This value changes the behavior of the methods :
□ | EObjectBasedCalibrationGenerator.Compute |
□ | EDepthMapToPointCloudConverter.Convert |
□ | EDepthMapToMeshConverter.Convert |

The scale model (EScaleCalibrationModel) only applies a simple factor on the X, Y and Z axis. These factors are the only parameters of EScaleCalibrationModel.
For depth maps coming from laser triangulation setup, this transformation does not produce corrected, metric points. It’s main use is to display depth maps as 3D data with the E3DViewer class.

The explicit geometric model (EExplicitGeometricCalibrationModel) defines a simple and ideal laser triangulation setup. The explicit calibration makes some strong assumptions on the setup geometry and can only be used when a minimum set of parameters are known:
□ | The angles of the camera and the laser plane, in the counter clockwise direction. The camera angle must be positive. |
□ | The height of the camera above the scanned object. |
□ | The field of view of the camera defined by the sensor size (mm) and the optical focal length (mm). |
□ | The physical distance between two line scans of the depth map (depends on acquisition rate and motion speed). |
□ | The size of the image and the ROI origin used in laser line extraction (between the top (0) and the bottom (height) of the image). |
Use the "Easy3D_Setup_Configuration.xlsx" spreadsheet to compute and check your setup configuration and parameters.
Explicit calibration setup with camera angle, laser angle and camera height
The setup of an explicit geometric calibration uses the constructor of the EExplicitGeometricCalibration class.

Object-based calibration gives real world, metric, coordinates from an arbitrary laser triangulation setup. From the scan of a reference object, the calibration process tries to calculate all the parameters required for the transformation to the world space (position and attributes of the camera, position of the laser plane, relative motion of the object, optical distortion…).
In the current version of Open eVision, 2 types of reference objects are supported, the double pyramid and the truncated pyramids. The calibration process operates only from acquisitions of such objects only.
Depending on the target object size, a calibration object must be manufactured as a scaled version of one of the reference objects described below.
CAD files in various standard formats are available on request.
First reference object: the double pyramid
Second reference object: the truncated pyramids
● | The class EObjectBasedCalibrationModel is the container for the object based calibration model. |
● | The class EObjectBasedCalibrationGenerator performs the computation of such a model. |
□ | Its Compute() method takes a depth map as input and returns a calibration model. |
□ | The computation of the calibration model may take some time. |
□ | Use the Save() method to store the calibration model for later use. |
● | The real size of the calibration object is set relatively to the dimensions of the figure above, by the SetCalibrationObjectScale() method. |
□ | The dimensions of the figures above are expressed in millimeters. |
□ | For example, if the double pyramid calibration object has a physical width of 100 mm, the method should be called with a factor of 10 (10 x 10 = 100 mm). |
● | The calibration object model must be set with the method SetCalibrationObjectType(). The possible values are DoublePyramid and TruncatedDoublePyramid. |
If possible, prefer the truncated pyramids model as it does not show symmetry and thus prevents possible orientation confusion.
A manufactured double pyramid under the laser triangulation device
and the corresponding captured depth map
Truncated pyramids of different sizes
Recommendations for the acquisition of the calibration object
To ensure a reliable and precise calibration, the following conditions must be satisfied during the acquisition of the calibration object:
□ | All the calibration object faces must be visible on the depth map (that is a constraint on the camera and laser orientation) |
□ | The calibration object must be horizontal (relative to the motion axis) |
□ | There must be no other object higher than the calibration object in the depth map |
□ | The depth map must have at least 200 x 200 pixels resolution |
□ | The calibration object must cover at least 50% of the defined pixel of the depth map |