intersect_lines_of_sightT_intersect_lines_of_sightIntersectLinesOfSightIntersectLinesOfSightintersect_lines_of_sight(算子)
名称
intersect_lines_of_sightT_intersect_lines_of_sightIntersectLinesOfSightIntersectLinesOfSightintersect_lines_of_sight — 从双目相机系统内两条视线的交点获取三维点。
签名
Herror T_intersect_lines_of_sight(const Htuple CamParam1, const Htuple CamParam2, const Htuple RelPose, const Htuple Row1, const Htuple Col1, const Htuple Row2, const Htuple Col2, Htuple* X, Htuple* Y, Htuple* Z, Htuple* Dist)
void IntersectLinesOfSight(const HTuple& CamParam1, const HTuple& CamParam2, const HTuple& RelPose, const HTuple& Row1, const HTuple& Col1, const HTuple& Row2, const HTuple& Col2, HTuple* X, HTuple* Y, HTuple* Z, HTuple* Dist)
void HCamPar::IntersectLinesOfSight(const HCamPar& CamParam2, const HPose& RelPose, const HTuple& Row1, const HTuple& Col1, const HTuple& Row2, const HTuple& Col2, HTuple* X, HTuple* Y, HTuple* Z, HTuple* Dist) const
void HCamPar::IntersectLinesOfSight(const HCamPar& CamParam2, const HPose& RelPose, double Row1, double Col1, double Row2, double Col2, double* X, double* Y, double* Z, double* Dist) const
void HPose::IntersectLinesOfSight(const HCamPar& CamParam1, const HCamPar& CamParam2, const HTuple& Row1, const HTuple& Col1, const HTuple& Row2, const HTuple& Col2, HTuple* X, HTuple* Y, HTuple* Z, HTuple* Dist) const
void HPose::IntersectLinesOfSight(const HCamPar& CamParam1, const HCamPar& CamParam2, double Row1, double Col1, double Row2, double Col2, double* X, double* Y, double* Z, double* Dist) const
static void HOperatorSet.IntersectLinesOfSight(HTuple camParam1, HTuple camParam2, HTuple relPose, HTuple row1, HTuple col1, HTuple row2, HTuple col2, out HTuple x, out HTuple y, out HTuple z, out HTuple dist)
void HCamPar.IntersectLinesOfSight(HCamPar camParam2, HPose relPose, HTuple row1, HTuple col1, HTuple row2, HTuple col2, out HTuple x, out HTuple y, out HTuple z, out HTuple dist)
void HCamPar.IntersectLinesOfSight(HCamPar camParam2, HPose relPose, double row1, double col1, double row2, double col2, out double x, out double y, out double z, out double dist)
void HPose.IntersectLinesOfSight(HCamPar camParam1, HCamPar camParam2, HTuple row1, HTuple col1, HTuple row2, HTuple col2, out HTuple x, out HTuple y, out HTuple z, out HTuple dist)
void HPose.IntersectLinesOfSight(HCamPar camParam1, HCamPar camParam2, double row1, double col1, double row2, double col2, out double x, out double y, out double z, out double dist)
def intersect_lines_of_sight(cam_param_1: Sequence[Union[int, float, str]], cam_param_2: Sequence[Union[int, float, str]], rel_pose: Sequence[Union[int, float]], row_1: MaybeSequence[Union[int, float]], col_1: MaybeSequence[Union[int, float]], row_2: MaybeSequence[Union[int, float]], col_2: MaybeSequence[Union[int, float]]) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float]]
def intersect_lines_of_sight_s(cam_param_1: Sequence[Union[int, float, str]], cam_param_2: Sequence[Union[int, float, str]], rel_pose: Sequence[Union[int, float]], row_1: MaybeSequence[Union[int, float]], col_1: MaybeSequence[Union[int, float]], row_2: MaybeSequence[Union[int, float]], col_2: MaybeSequence[Union[int, float]]) -> Tuple[float, float, float, float]
描述
Given two lines of sight from different cameras, specified by their
image points (Row1Row1Row1Row1row1row_1,Col1Col1Col1Col1col1col_1) of camera 1 and
(Row2Row2Row2Row2row2row_2,Col2Col2Col2Col2col2col_2) of camera 2,
intersect_lines_of_sightintersect_lines_of_sightIntersectLinesOfSightIntersectLinesOfSightIntersectLinesOfSightintersect_lines_of_sight computes the 3D
point of intersection of these lines. The binocular camera system is
specified by its internal camera parameters CamParam1CamParam1CamParam1CamParam1camParam1cam_param_1 of the
projective camera 1 and CamParam2CamParam2CamParam2CamParam2camParam2cam_param_2 of the projective camera 2, and
the external parameters RelPoseRelPoseRelPoseRelPoserelPoserel_pose.
Latter one is of the form
and characterizes the relative pose of both cameras to each other,
thus defining a point transformation
from camera coordinate system 2 (ccs2) into camera coordinate
system 1 (ccs1), see Transformations / Poses and
“Solution Guide III-C - 3D Vision”.
These camera parameters can be obtained, e.g., from
the operator calibrate_camerascalibrate_camerasCalibrateCamerasCalibrateCamerasCalibrateCamerascalibrate_cameras, if the coordinates of the image
points (Row1Row1Row1Row1row1row_1,Col1Col1Col1Col1col1col_1) and (Row2Row2Row2Row2row2row_2,Col2Col2Col2Col2col2col_2)
refer to the respective original image coordinate system. In case of
rectified image coordinates ( e.g., obtained from rectified images),
the rectified camera parameters must be passed, as they are returned
by the operator
gen_binocular_rectification_mapgen_binocular_rectification_mapGenBinocularRectificationMapGenBinocularRectificationMapGenBinocularRectificationMapgen_binocular_rectification_map。The 'point of
intersection' is defined by the point with the shortest distance to
both lines of sight. This point is returned in Cartesian coordinates
(XXXXxx,YYYYyy,ZZZZzz) of camera system 1 and its
distance to the lines of sight is passed in DistDistDistDistdistdist。
注意
Stereo setups that contain cameras with and without hypercentric
lenses at the same time are not supported.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
CamParam1CamParam1CamParam1CamParam1camParam1cam_param_1 (输入控制) campar → HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Internal parameters of the projective camera 1.
CamParam2CamParam2CamParam2CamParam2camParam2cam_param_2 (输入控制) campar → HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Internal parameters of the projective camera 2.
RelPoseRelPoseRelPoseRelPoserelPoserel_pose (输入控制) pose → HPose, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Point transformation from camera 2 to camera 1.
元素数量:
7
Row1Row1Row1Row1row1row_1 (输入控制) number(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of a point in image 1.
Col1Col1Col1Col1col1col_1 (输入控制) number(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of a point in image 1.
Row2Row2Row2Row2row2row_2 (输入控制) number(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the corresponding point in image 2.
Col2Col2Col2Col2col2col_2 (输入控制) number(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the corresponding point in image 2.
XXXXxx (输出控制) real(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
X coordinate of the 3D point.
YYYYyy (输出控制) real(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Y coordinate of the 3D point.
ZZZZzz (输出控制) real(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Z coordinate of the 3D point.
DistDistDistDistdistdist (输出控制) real(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Distance of the 3D point to the lines of sight.
结果
intersect_lines_of_sightintersect_lines_of_sightIntersectLinesOfSightIntersectLinesOfSightIntersectLinesOfSightintersect_lines_of_sight 在所有参数值正确时返回 2 (H_MSG_TRUE)。如有必要,则抛出异常。
可能的前趋
binocular_calibrationbinocular_calibrationBinocularCalibrationBinocularCalibrationBinocularCalibrationbinocular_calibration
另见
disparity_to_point_3ddisparity_to_point_3dDisparityToPoint3dDisparityToPoint3dDisparityToPoint3ddisparity_to_point_3d
模块
三维计量