disparity_image_to_xyzπ
Short descriptionπ
disparity_image_to_xyz β Transform a disparity image into 3D points in a rectified stereo
system.
Signatureπ
disparity_image_to_xyz( image Disparity, out image X, out image Y, out image Z, campar CamParamRect1, campar CamParamRect2, pose RelPoseRect )
Descriptionπ
Given the disparity image Disparity of a rectified
binocular stereo system, disparity_image_to_xyz computes the
corresponding 3D points. Their coordinates relative to the rectified
camera 1 are stored as gray values in the images X,
Y, and Z, i.e., the pixels at the position
(Row,Column) in X, Y, and Z contain the
x, y, and z coordinate, respectively, of the pixel (Row,Column) in
the disparity image.
The rectified binocular camera system is specified by its internal
camera parameters CamParamRect1 of the rectified camera 1
and CamParamRect2 of the rectified camera 2, and the
external parameters RelPoseRect. The latter one is a pose in the
form \(\mvPoseVar{{ccsR1}}{{ccsR2}}\), thus it defines the
relative pose of the rectified camera coordinate system 2 (ccsR2)
relative to the rectified camera coordinate system 1 (ccsR1)
(see
[``Solving machine vision tasks > Machine vision basics
Transformations > 3D Transformationsββ](https://docs.mvtec.com/hdevelopevo/26.11/content/mvtasks/machine_vision_basics/transformations/3d/poses/index.html). These camera parameters can be obtained from the operators
calibrate_camerasandgen_binocular_rectification_map.
Attentionπ
Stereo setups that contain cameras with and without hypercentric lenses at the same time are not supported.
Execution informationπ
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Automatically parallelized on tuple level.
-
Automatically parallelized on domain level.
Parametersπ
Disparity (input_object) singlechannelimage(-array) β object (real)
Disparity image.
X (output_object) singlechannelimage(-array) β object (real)
X coordinates of the points in the rectified camera system 1.
Y (output_object) singlechannelimage(-array) β object (real)
Y coordinates of the points in the rectified camera system 1.
Z (output_object) singlechannelimage(-array) β object (real)
Z coordinates of the points in the rectified camera system 1.
CamParamRect1 (input_control) campar β (real / integer / string)
Internal camera parameters of the rectified camera 1.
CamParamRect2 (input_control) campar β (real / integer / string)
Internal camera parameters of the rectified camera 2.
RelPoseRect (input_control) pose β (real / integer)
Pose of the rectified camera 2 in relation to the rectified camera 1.
Number of elements: 7
Exampleπ
(HDevelop)
disparity_image_to_xyz (ImageDisparity, ImgX, ImgY, ImgZ, RectCamParL, \
RectCamParR, RectLPosRectR)
get_region_points (ImageDisparity, Rows, Columns)
get_grayval (ImgX, Rows, Columns, XValues)
get_grayval (ImgY, Rows, Columns, YValues)
get_grayval (ImgZ, Rows, Columns, ZValues)
Resultπ
The operator disparity_image_to_xyz returns the value 2 (H_MSG_TRUE)
if the input is not empty. The behavior in case of empty input (no
input image available) is set via the operator
set_system('no_object_result',<Result>). The behavior in
case of empty region (the region is the empty set) is set via
set_system('empty_region_result',<Result>). If necessary an
exception is raised.
Combinations with other operatorsπ
Combinations
Possible predecessors
Possible successors
Alternatives
disparity_to_point_3d, binocular_distance
See also
binocular_calibration, gen_binocular_rectification_map, intersect_lines_of_sight
Moduleπ
3D Metrology