get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightGetLineOfSight computes the line of sight corresponding
to a pixel (RowRowRowRowrow, ColumnColumnColumnColumncolumn) in the image. The line
of sight is a (straight) line in the camera coordinate system, which
is described by two points (PXPXPXPXPX,PYPYPYPYPY,PZPZPZPZPZ) and
(QXQXQXQXQX,QYQYQYQYQY,QZQZQZQZQZ) on the line. The camera is
described by the internal camera parameters CameraParamCameraParamCameraParamCameraParamcameraParam
(see Calibration / Multi-View for details). If a pinhole camera is
used, the second point lies on the focal plane, i.e., for frame cameras, the
output parameter QZQZQZQZQZ is equivalent to the focal length of
the camera, whereas for linescan cameras, QZQZQZQZQZ also depends
on the motion of the camera with respect to the object. The
equation of the line of sight is given by
Z coordinate of the second point on the line of sight
in the camera coordinate system
Example (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)
Example (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)
Example (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)
Example (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)
Example (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)
Result
get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightGetLineOfSight returns 2 (H_MSG_TRUE) if all parameter values are
correct. If necessary, an exception is raised.