disparity_image_to_xyz T_disparity_image_to_xyz DisparityImageToXyz DisparityImageToXyz disparity_image_to_xyz (Operator)
Name
disparity_image_to_xyz T_disparity_image_to_xyz DisparityImageToXyz DisparityImageToXyz disparity_image_to_xyz
— Transform a disparity image into 3D points in a rectified stereo
system.
Signature
void DisparityImageToXyz (const HObject& Disparity , HObject* X , HObject* Y , HObject* Z , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HTuple& RelPoseRect )
HImage HImage ::DisparityImageToXyz (HImage* Y , HImage* Z , const HCamPar& CamParamRect1 , const HCamPar& CamParamRect2 , const HPose& RelPoseRect ) const
HImage HCamPar ::DisparityImageToXyz (const HImage& Disparity , HImage* Y , HImage* Z , const HCamPar& CamParamRect2 , const HPose& RelPoseRect ) const
HImage HPose ::DisparityImageToXyz (const HImage& Disparity , HImage* Y , HImage* Z , const HCamPar& CamParamRect1 , const HCamPar& CamParamRect2 ) const
static void HOperatorSet .DisparityImageToXyz (HObject disparity , out HObject x , out HObject y , out HObject z , HTuple camParamRect1 , HTuple camParamRect2 , HTuple relPoseRect )
HImage HImage .DisparityImageToXyz (out HImage y , out HImage z , HCamPar camParamRect1 , HCamPar camParamRect2 , HPose relPoseRect )
HImage HCamPar .DisparityImageToXyz (HImage disparity , out HImage y , out HImage z , HCamPar camParamRect2 , HPose relPoseRect )
HImage HPose .DisparityImageToXyz (HImage disparity , out HImage y , out HImage z , HCamPar camParamRect1 , HCamPar camParamRect2 )
def disparity_image_to_xyz (disparity : HObject, cam_param_rect_1 : Sequence[Union[int, float, str]], cam_param_rect_2 : Sequence[Union[int, float, str]], rel_pose_rect : Sequence[Union[int, float]]) -> Tuple[HObject, HObject, HObject]
Description
Given the disparity image Disparity Disparity Disparity Disparity disparity disparity
of a rectified
binocular stereo system, disparity_image_to_xyz disparity_image_to_xyz DisparityImageToXyz DisparityImageToXyz DisparityImageToXyz 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 X X X x x
,
Y Y Y Y y y
, and Z Z Z Z z z
, i.e., the pixels at the position
(Row,Column) in X X X X x x
, Y Y Y Y y y
, and Z Z Z Z z 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 CamParamRect1 CamParamRect1 CamParamRect1 camParamRect1 cam_param_rect_1
of the rectified camera 1
and CamParamRect2 CamParamRect2 CamParamRect2 CamParamRect2 camParamRect2 cam_param_rect_2
of the rectified camera 2, and the
external parameters RelPoseRect RelPoseRect RelPoseRect RelPoseRect relPoseRect rel_pose_rect
. The latter one is a pose in the
form
, thus it defines the
relative pose of the rectified camera coordinate system 2 (ccsR2 )
relative to the rectified camera coordinate system 1 (ccsR1 )
(see Transformations / Poses and
“Solution Guide III-C - 3D Vision”
).
These camera parameters can be obtained from the operators
calibrate_cameras calibrate_cameras CalibrateCameras CalibrateCameras CalibrateCameras calibrate_cameras
and gen_binocular_rectification_map gen_binocular_rectification_map GenBinocularRectificationMap GenBinocularRectificationMap GenBinocularRectificationMap gen_binocular_rectification_map
.
Attention
Stereo setups that contain cameras with and without hypercentric
lenses at the same time are not supported.
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 Disparity Disparity Disparity disparity disparity
(input_object) singlechannelimage(-array) →
object HImage HObject HImage Hobject (real)
Disparity image.
X X X X x x
(output_object) singlechannelimage(-array) →
object HImage HObject HImage Hobject * (real)
X coordinates of the points in the rectified camera
system 1.
Y Y Y Y y y
(output_object) singlechannelimage(-array) →
object HImage HObject HImage Hobject * (real)
Y coordinates of the points in the rectified camera
system 1.
Z Z Z Z z z
(output_object) singlechannelimage(-array) →
object HImage HObject HImage Hobject * (real)
Z coordinates of the points in the rectified camera
system 1.
CamParamRect1 CamParamRect1 CamParamRect1 CamParamRect1 camParamRect1 cam_param_rect_1
(input_control) campar →
HCamPar , HTuple Sequence[Union[int, float, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Internal camera parameters of the rectified camera 1.
CamParamRect2 CamParamRect2 CamParamRect2 CamParamRect2 camParamRect2 cam_param_rect_2
(input_control) campar →
HCamPar , HTuple Sequence[Union[int, float, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Internal camera parameters of the rectified camera 2.
RelPoseRect RelPoseRect RelPoseRect RelPoseRect relPoseRect rel_pose_rect
(input_control) pose →
HPose , HTuple Sequence[Union[int, float]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
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 disparity_image_to_xyz DisparityImageToXyz DisparityImageToXyz DisparityImageToXyz 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>) set_system("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) 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>) set_system("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) set_system("empty_region_result",<Result>)
. If necessary an
exception is raised.
Possible Predecessors
binocular_disparity binocular_disparity BinocularDisparity BinocularDisparity BinocularDisparity binocular_disparity
Possible Successors
threshold threshold Threshold Threshold Threshold threshold
,
write_image write_image WriteImage WriteImage WriteImage write_image
Alternatives
disparity_to_point_3d disparity_to_point_3d DisparityToPoint3d DisparityToPoint3d DisparityToPoint3d disparity_to_point_3d
,
binocular_distance binocular_distance BinocularDistance BinocularDistance BinocularDistance binocular_distance
See also
binocular_calibration binocular_calibration BinocularCalibration BinocularCalibration BinocularCalibration binocular_calibration
,
gen_binocular_rectification_map gen_binocular_rectification_map GenBinocularRectificationMap GenBinocularRectificationMap GenBinocularRectificationMap gen_binocular_rectification_map
,
intersect_lines_of_sight intersect_lines_of_sight IntersectLinesOfSight IntersectLinesOfSight IntersectLinesOfSight intersect_lines_of_sight
Module
3D Metrology