disparity_image_to_xyzT_disparity_image_to_xyzDisparityImageToXyzDisparityImageToXyzdisparity_image_to_xyz (算子)

名称

disparity_image_to_xyzT_disparity_image_to_xyzDisparityImageToXyzDisparityImageToXyzdisparity_image_to_xyz — 在校正的立体系统中将视差图像变换为三维点。

签名

disparity_image_to_xyz(Disparity : X, Y, Z : CamParamRect1, CamParamRect2, RelPoseRect : )

Herror T_disparity_image_to_xyz(const Hobject Disparity, Hobject* X, Hobject* Y, Hobject* Z, const Htuple CamParamRect1, const Htuple CamParamRect2, const Htuple RelPoseRect)

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]

描述

Given the disparity image DisparityDisparityDisparityDisparitydisparitydisparity of a rectified binocular stereo system, disparity_image_to_xyzdisparity_image_to_xyzDisparityImageToXyzDisparityImageToXyzDisparityImageToXyzdisparity_image_to_xyz computes the corresponding 3D points. Their coordinates relative to the rectified camera 1 are stored as gray values in the images XXXXxx, YYYYyy, and ZZZZzz, i.e., the pixels at the position (Row,Column) in XXXXxx, YYYYyy, and ZZZZzz 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 CamParamRect1CamParamRect1CamParamRect1CamParamRect1camParamRect1cam_param_rect_1 of the rectified camera 1 and CamParamRect2CamParamRect2CamParamRect2CamParamRect2camParamRect2cam_param_rect_2 of the rectified camera 2, and the external parameters RelPoseRectRelPoseRectRelPoseRectRelPoseRectrelPoseRectrel_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_camerascalibrate_camerasCalibrateCamerasCalibrateCamerasCalibrateCamerascalibrate_cameras and gen_binocular_rectification_mapgen_binocular_rectification_mapGenBinocularRectificationMapGenBinocularRectificationMapGenBinocularRectificationMapgen_binocular_rectification_map

注意

Stereo setups that contain cameras with and without hypercentric lenses at the same time are not supported.

执行信息

参数

DisparityDisparityDisparityDisparitydisparitydisparity (输入对象)  singlechannelimage(-array) objectHImageHObjectHImageHobject (real)

Disparity image.

XXXXxx (输出对象)  singlechannelimage(-array) objectHImageHObjectHImageHobject * (real)

X coordinates of the points in the rectified camera system 1.

YYYYyy (输出对象)  singlechannelimage(-array) objectHImageHObjectHImageHobject * (real)

Y coordinates of the points in the rectified camera system 1.

ZZZZzz (输出对象)  singlechannelimage(-array) objectHImageHObjectHImageHobject * (real)

Z coordinates of the points in the rectified camera system 1.

CamParamRect1CamParamRect1CamParamRect1CamParamRect1camParamRect1cam_param_rect_1 (输入控制)  campar HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Internal camera parameters of the rectified camera 1.

CamParamRect2CamParamRect2CamParamRect2CamParamRect2camParamRect2cam_param_rect_2 (输入控制)  campar HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Internal camera parameters of the rectified camera 2.

RelPoseRectRelPoseRectRelPoseRectRelPoseRectrelPoseRectrel_pose_rect (输入控制)  pose HPose, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Pose of the rectified camera 2 in relation to the rectified camera 1.

元素数量: 7

示例(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)

结果

算子 disparity_image_to_xyzdisparity_image_to_xyzDisparityImageToXyzDisparityImageToXyzDisparityImageToXyzdisparity_image_to_xyz 在输入不为空时返回值 2 ( H_MSG_TRUE )。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>)。空区域(区域是空集)的情况下的可设置行为通过 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>)。如有必要,则抛出异常。

可能的前趋

binocular_disparitybinocular_disparityBinocularDisparityBinocularDisparityBinocularDisparitybinocular_disparity

可能的后继

thresholdthresholdThresholdThresholdThresholdthreshold, write_imagewrite_imageWriteImageWriteImageWriteImagewrite_image

替代

disparity_to_point_3ddisparity_to_point_3dDisparityToPoint3dDisparityToPoint3dDisparityToPoint3ddisparity_to_point_3d, binocular_distancebinocular_distanceBinocularDistanceBinocularDistanceBinocularDistancebinocular_distance

另见

binocular_calibrationbinocular_calibrationBinocularCalibrationBinocularCalibrationBinocularCalibrationbinocular_calibration, gen_binocular_rectification_mapgen_binocular_rectification_mapGenBinocularRectificationMapGenBinocularRectificationMapGenBinocularRectificationMapgen_binocular_rectification_map, intersect_lines_of_sightintersect_lines_of_sightIntersectLinesOfSightIntersectLinesOfSightIntersectLinesOfSightintersect_lines_of_sight

模块

三维计量