get_line_of_sight T_get_line_of_sight GetLineOfSight GetLineOfSight get_line_of_sight (算子)
名称
get_line_of_sight T_get_line_of_sight GetLineOfSight GetLineOfSight get_line_of_sight — 计算图像中点对应的视线。
签名
Herror T_get_line_of_sight (const Htuple Row , const Htuple Column , const Htuple CameraParam , Htuple* PX , Htuple* PY , Htuple* PZ , Htuple* QX , Htuple* QY , Htuple* QZ )
void GetLineOfSight (const HTuple& Row , const HTuple& Column , const HTuple& CameraParam , HTuple* PX , HTuple* PY , HTuple* PZ , HTuple* QX , HTuple* QY , HTuple* QZ )
void HCamPar ::GetLineOfSight (const HTuple& Row , const HTuple& Column , HTuple* PX , HTuple* PY , HTuple* PZ , HTuple* QX , HTuple* QY , HTuple* QZ ) const
static void HOperatorSet .GetLineOfSight (HTuple row , HTuple column , HTuple cameraParam , out HTuple PX , out HTuple PY , out HTuple PZ , out HTuple QX , out HTuple QY , out HTuple QZ )
void HCamPar .GetLineOfSight (HTuple row , HTuple column , out HTuple PX , out HTuple PY , out HTuple PZ , out HTuple QX , out HTuple QY , out HTuple QZ )
def get_line_of_sight (row : Sequence[float], column : Sequence[float], camera_param : Sequence[Union[int, float, str]]) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]
描述
get_line_of_sight get_line_of_sight GetLineOfSight GetLineOfSight GetLineOfSight get_line_of_sight computes the line of sight corresponding
to a pixel (Row Row Row Row row row , Column Column Column Column column column ) in the image. The line
of sight is a (straight) line in the camera coordinate system, which
is described by two points (PX PX PX PX PX px ,PY PY PY PY PY py ,PZ PZ PZ PZ PZ pz ) and
(QX QX QX QX QX qx ,QY QY QY QY QY qy ,QZ QZ QZ QZ QZ qz ) on the line. The camera is
described by the internal camera parameters CameraParam CameraParam CameraParam CameraParam cameraParam camera_param
(see 标定 for details). If a pinhole camera is
used, the second point lies on the focal plane, i.e., for frame cameras, the
output parameter QZ QZ QZ QZ QZ qz is equivalent to the focal length of
the camera, whereas for linescan cameras, QZ QZ QZ QZ QZ qz also depends
on the motion of the camera with respect to the object. The
equation of the line of sight is given by
The advantage of representing the line of sight as two points is
that it is easier to transform the line in 3D. To do so, all that
is necessary is to apply the operator affine_trans_point_3d affine_trans_point_3d AffineTransPoint3d AffineTransPoint3d AffineTransPoint3d affine_trans_point_3d
to the two points.
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在内部数据级别上自动并行化。
参数
Row Row Row Row row row (输入控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Row coordinate of the pixel.
Column Column Column Column column column (输入控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Column coordinate of the pixel.
CameraParam CameraParam CameraParam CameraParam cameraParam camera_param (输入控制) campar → HCamPar , HTuple Sequence[Union[int, float, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
内部相机参数。
PX PX PX PX PX px (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
X coordinate of the first point on the line of sight
in the camera coordinate system
PY PY PY PY PY py (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Y coordinate of the first point on the line of sight
in the camera coordinate system
PZ PZ PZ PZ PZ pz (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Z coordinate of the first point on the line of sight
in the camera coordinate system
QX QX QX QX QX qx (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
X coordinate of the second point on the line of sight
in the camera coordinate system
QY QY QY QY QY qy (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Y coordinate of the second point on the line of sight
in the camera coordinate system
QZ QZ QZ QZ QZ qz (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Z coordinate of the second point on the line of sight
in the camera coordinate system
示例(HDevelop)
* Set internal camera parameters.
* Note the, typically, these values are the result of a prior
* calibration.
gen_cam_par_area_scan_division (0.01, 30, 4.65e-006, 4.65e-006, \
640, 480, 1280, 960, CameraParam)
* Inverse projection.
get_line_of_sight([50, 100], [100, 200], CameraParam, PX, PY, PZ, QX, QY, QZ)
示例(HDevelop)
* Set internal camera parameters.
* Note the, typically, these values are the result of a prior
* calibration.
gen_cam_par_area_scan_division (0.01, 30, 4.65e-006, 4.65e-006, \
640, 480, 1280, 960, CameraParam)
* Inverse projection.
get_line_of_sight([50, 100], [100, 200], CameraParam, PX, PY, PZ, QX, QY, QZ)
示例(HDevelop)
* Set internal camera parameters.
* Note the, typically, these values are the result of a prior
* calibration.
gen_cam_par_area_scan_division (0.01, 30, 4.65e-006, 4.65e-006, \
640, 480, 1280, 960, CameraParam)
* Inverse projection.
get_line_of_sight([50, 100], [100, 200], CameraParam, PX, PY, PZ, QX, QY, QZ)
示例(HDevelop)
* Set internal camera parameters.
* Note the, typically, these values are the result of a prior
* calibration.
gen_cam_par_area_scan_division (0.01, 30, 4.65e-006, 4.65e-006, \
640, 480, 1280, 960, CameraParam)
* Inverse projection.
get_line_of_sight([50, 100], [100, 200], CameraParam, PX, PY, PZ, QX, QY, QZ)
示例(HDevelop)
* Set internal camera parameters.
* Note the, typically, these values are the result of a prior
* calibration.
gen_cam_par_area_scan_division (0.01, 30, 4.65e-006, 4.65e-006, \
640, 480, 1280, 960, CameraParam)
* Inverse projection.
get_line_of_sight([50, 100], [100, 200], CameraParam, PX, PY, PZ, QX, QY, QZ)
结果
get_line_of_sight get_line_of_sight GetLineOfSight GetLineOfSight GetLineOfSight get_line_of_sight 在所有参数值正确时返回 2 (H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
read_cam_par read_cam_par ReadCamPar ReadCamPar ReadCamPar read_cam_par ,
camera_calibration camera_calibration CameraCalibration CameraCalibration CameraCalibration camera_calibration
可能的后继
affine_trans_point_3d affine_trans_point_3d AffineTransPoint3d AffineTransPoint3d AffineTransPoint3d affine_trans_point_3d
另见
camera_calibration camera_calibration CameraCalibration CameraCalibration CameraCalibration camera_calibration ,
disp_caltab disp_caltab DispCaltab DispCaltab DispCaltab disp_caltab ,
read_cam_par read_cam_par ReadCamPar ReadCamPar ReadCamPar read_cam_par ,
project_3d_point project_3d_point Project3dPoint Project3dPoint Project3dPoint project_3d_point ,
affine_trans_point_3d affine_trans_point_3d AffineTransPoint3d AffineTransPoint3d AffineTransPoint3d affine_trans_point_3d
模块
标定