| HALCON/C Reference Manual / Tools / Stereo | Operators |
T_disparity_to_distance — Transform a disparity value into a distance value in a rectified binocular stereo system.
Herror T_disparity_to_distance(const Htuple CamParamRect1, const Htuple CamParamRect2, const Htuple RelPoseRect, const Htuple Disparity, Htuple* Distance)
disparity_to_distance transforms a disparity value into a distance of an object point to the binocular stereo system. The cameras of this system must be rectified and are defined by the rectified internal parameters CamParamRect1 of the projective camera 1 and CamParamRect2 of the projective camera 2, and the external parameters RelPoseRect. Latter specifies the relative pose of both cameras to each other by defining a point transformation from rectified camera system 2 to rectified camera system 1. These parameters can be obtained from the operator binocular_calibration and gen_binocular_rectification_map. The disparity value Disparity is defined by the column difference of the image coordinates of two corresponding points on an epipolar line according to the equation d = c2 - c1(see also binocular_disparity). This value characterises a set of 3D object points of an equal distance to a plane beeing parallel to the rectified image plane of the stereo system. The distance to the subset plane z=0 which is parallel to the rectified image plane and contains the optical centers of both cameras is returned in Distance.
| CamParamRect1 (input_control) | number-array → Htuple (double / Hlong) |
| Rectified internal camera parameters of the projective camera 1. | |
| Number of elements: (CamParamRect1 == 8) || (CamParamRect1 == 12) | |
| CamParamRect2 (input_control) | number-array → Htuple (double / Hlong) |
| Rectified internal camera parameters of the projective camera 2. | |
| Number of elements: (CamParamRect2 == 8) || (CamParamRect2 == 12) | |
| RelPoseRect (input_control) | pose-array → Htuple (double / Hlong) |
| Point transformation from rectified camera 2 to rectified camera 1. | |
| Number of elements: 7 | |
| Disparity (input_control) | number(-array) → Htuple (double / Hlong) |
| Disparity between the images of the world point. | |
| Distance (output_control) | real(-array) → Htuple (double) |
| Distance of a world point to the rectified camera system. | |
disparity_to_distance returns H_MSG_TRUE if all parameter values are correct. If necessary, an exception is raised.
disparity_to_distance is reentrant and processed without parallelization.
binocular_calibration, gen_binocular_rectification_map, map_image, binocular_disparity
distance_to_disparity, disparity_to_point_3d
3D Metrology
| HALCON/C Reference Manual / Tools / Stereo | Operators |
| Version 9.0.2 | Copyright © 1996-2010 MVTec Software GmbH |