distance_to_disparity ( : : CamParamRect1, CamParamRect2, RelPoseRect, Distance : Disparity )

Transfrom a distance value into a disparity in a rectified stereo system.

distance_to_disparity transforms a distance of a 3D point to the binocular stereo system into a disparity value. The cameras of this system must be rectified and are defined by the rectified internal parameters CamParamRect1 of camera 1 and CamParamRect2 of camera 2 and the external parameters RelPoseRect. latter specifies the relative pose of both camera systems to each other by defining a point transformation from the rectified camera system 2 to the rectified camera system 1. These parameters can be obtained from the operator binocular_calibration and gen_binocular_rectification_map. The distance value is passed in Distance and the resulting disparity value Disparity is defined by the column difference of the image coordinates of two corresponding features on an epipolar line according to the equation d = c2 - c1 .


Parameters

CamParamRect1 (input_control)
number-array -> real / integer
rectified internal camera parameters of camera 1.
Number of elements: 8

CamParamRect2 (input_control)
number-array -> real / integer
rectified internal camera parameters of camera 2.
Number of elements: 8

RelPoseRect (input_control)
pose-array -> real / integer
Point transformation from rectified camera 2 to rectified camera 1.
Number of elements: 7

Distance (input_control)
real(-array) -> real
Distance of a world point to camera 1.
Restriction: 0 < Distance

Disparity (output_control)
number(-array) -> real / integer
Disparity between the images of the point.


Result

distance_to_disparity returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception handling is raised.


Parallelization Information

distance_to_disparity is reentrant and processed without parallelization.


Possible Predecessors

binocular_calibration, gen_binocular_rectification_map


Possible Successors

binocular_disparity


Module

3D Metrology



Copyright © 1996-2008 MVTec Software GmbH