ClassesClasses | | Operators

vector_to_poseT_vector_to_poseVectorToPoseVectorToPose (Operator)

Name

vector_to_poseT_vector_to_poseVectorToPoseVectorToPose — Compute an absolute pose out of point correspondences between world and image coordinates.

Signature

vector_to_pose( : : WorldX, WorldY, WorldZ, ImageRow, ImageColumn, CameraParam, Method, QualityType : Pose, Quality)

Herror T_vector_to_pose(const Htuple WorldX, const Htuple WorldY, const Htuple WorldZ, const Htuple ImageRow, const Htuple ImageColumn, const Htuple CameraParam, const Htuple Method, const Htuple QualityType, Htuple* Pose, Htuple* Quality)

void VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HTuple& CameraParam, const HTuple& Method, const HTuple& QualityType, HTuple* Pose, HTuple* Quality)

static HPose HImage::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const HString& Method, const HTuple& QualityType, HTuple* Quality)

static HPose HImage::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const HString& Method, const HString& QualityType, double* Quality)

static HPose HImage::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const char* Method, const char* QualityType, double* Quality)

HPose HCamPar::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HString& Method, const HTuple& QualityType, HTuple* Quality) const

HPose HCamPar::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HString& Method, const HString& QualityType, double* Quality) const

HPose HCamPar::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const char* Method, const char* QualityType, double* Quality) const

HTuple HPose::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const HString& Method, const HTuple& QualityType)

double HPose::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const HString& Method, const HString& QualityType)

double HPose::VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const char* Method, const char* QualityType)

static void HOperatorSet.VectorToPose(HTuple worldX, HTuple worldY, HTuple worldZ, HTuple imageRow, HTuple imageColumn, HTuple cameraParam, HTuple method, HTuple qualityType, out HTuple pose, out HTuple quality)

static HPose HImage.VectorToPose(HTuple worldX, HTuple worldY, HTuple worldZ, HTuple imageRow, HTuple imageColumn, HCamPar cameraParam, string method, HTuple qualityType, out HTuple quality)

static HPose HImage.VectorToPose(HTuple worldX, HTuple worldY, HTuple worldZ, HTuple imageRow, HTuple imageColumn, HCamPar cameraParam, string method, string qualityType, out double quality)

HPose HCamPar.VectorToPose(HTuple worldX, HTuple worldY, HTuple worldZ, HTuple imageRow, HTuple imageColumn, string method, HTuple qualityType, out HTuple quality)

HPose HCamPar.VectorToPose(HTuple worldX, HTuple worldY, HTuple worldZ, HTuple imageRow, HTuple imageColumn, string method, string qualityType, out double quality)

HTuple HPose.VectorToPose(HTuple worldX, HTuple worldY, HTuple worldZ, HTuple imageRow, HTuple imageColumn, HCamPar cameraParam, string method, HTuple qualityType)

double HPose.VectorToPose(HTuple worldX, HTuple worldY, HTuple worldZ, HTuple imageRow, HTuple imageColumn, HCamPar cameraParam, string method, string qualityType)

Description

The operator vector_to_posevector_to_poseVectorToPoseVectorToPoseVectorToPose computes a pose out of at least three or four (depending on MethodMethodMethodMethodmethod) point correspondences of 3D world coordinates (WorldXWorldXWorldXWorldXworldX, WorldYWorldYWorldYWorldYworldY, WorldZWorldZWorldZWorldZworldZ), given in meters, and 2D image coordinates (ImageRowImageRowImageRowImageRowimageRow, ImageColumnImageColumnImageColumnImageColumnimageColumn), given in pixels.

Parameter Method

By setting the parameter MethodMethodMethodMethodmethod, it is possible to choose what kind of algorithm is used for the pose computation.

Methods supported for perspective cameras:

MethodMethodMethodMethodmethod When to use Minimum number of point correspondences
'analytic'"analytic""analytic""analytic""analytic" Default method for general cases 4
'iterative'"iterative""iterative""iterative""iterative" If only three or four point correspondences are used or if the world points are close to being planar 3
'planar_analytic'"planar_analytic""planar_analytic""planar_analytic""planar_analytic" If the world points lie in a horizontal plane ( ) 4

Methods supported for telecentric cameras:

MethodMethodMethodMethodmethod When to use Minimum number of point correspondences
'telecentric'"telecentric""telecentric""telecentric""telecentric" Default method for general cases 4
'telecentric_robust'"telecentric_robust""telecentric_robust""telecentric_robust""telecentric_robust" For very ill-posed point configurations where QualityQualityQualityQualityquality has an unlikely large value 4
'telecentric_planar'"telecentric_planar""telecentric_planar""telecentric_planar""telecentric_planar" If the world points lie in a horizontal plane ( ) 3
'telecentric_planar_robust'"telecentric_planar_robust""telecentric_planar_robust""telecentric_planar_robust""telecentric_planar_robust" For very ill-posed point configurations where the world points lie in a horizontal plane ( ) and QualityQualityQualityQualityquality has an unlikely large value 3

Parameters CameraParam and Quality

All methods need the inner camera parameters obtained from camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration to solve the pose estimation problem. They must be passed in CameraParamCameraParamCameraParamCameraParamcameraParam.

The user can specify in QualityTypeQualityTypeQualityTypeQualityTypequalityType one or more quality measures of the pose to be evaluated. The resulting quality evaluations are returned concatenated in QualityQualityQualityQualityquality. Currently, only 'error'"error""error""error""error" is supported. It corresponds to the root-mean-square error in pixels of the projected 3D world coordinates.

General Remarks

If a method for planar world points is chosen, all world points are assumed to lie in the plane . Therefore, the z-component of the world coordinates can be left empty (WorldZWorldZWorldZWorldZworldZ = []) since only 2D correspondences are used in this case.

For telecentric cameras, the translation in z obviously cannot be determined. It is set to 0 in PosePosePosePosepose.

For planar world points and telecentric cameras, there are always two possible equivalent poses. This ambiguity can only be resolved by some additional knowledge. vector_to_posevector_to_poseVectorToPoseVectorToPoseVectorToPose returns an arbitrary solution of the two possible solutions in this case. The other solution can be calculated easily by replacing the values of and in PosePosePosePosepose by and .

Attention

The method 'analytic'"analytic""analytic""analytic""analytic" only allows a maximum number of 32767 point correspondences.

Execution Information

Parameters

WorldXWorldXWorldXWorldXworldX (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

X-Component of world coordinates.

Number of elements: WorldX >= 4

WorldYWorldYWorldYWorldYworldY (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Y-Component of world coordinates.

Number of elements: WorldY == WorldX

WorldZWorldZWorldZWorldZworldZ (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Z-Component of world coordinates.

Number of elements: WorldZ == WorldX || WorldZ == 0

ImageRowImageRowImageRowImageRowimageRow (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row-Component of image coordinates.

Number of elements: ImageRow == WorldX

ImageColumnImageColumnImageColumnImageColumnimageColumn (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column-Component of image coordinates.

Number of elements: ImageColumn == WorldX

CameraParamCameraParamCameraParamCameraParamcameraParam (input_control)  campar HCamPar, HTupleHTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

The inner camera parameters from camera calibration.

MethodMethodMethodMethodmethod (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Kind of algorithm

Default value: 'iterative' "iterative" "iterative" "iterative" "iterative"

List of values: 'analytic'"analytic""analytic""analytic""analytic", 'iterative'"iterative""iterative""iterative""iterative", 'planar_analytic'"planar_analytic""planar_analytic""planar_analytic""planar_analytic", 'telecentric'"telecentric""telecentric""telecentric""telecentric", 'telecentric_planar'"telecentric_planar""telecentric_planar""telecentric_planar""telecentric_planar", 'telecentric_planar_robust'"telecentric_planar_robust""telecentric_planar_robust""telecentric_planar_robust""telecentric_planar_robust", 'telecentric_robust'"telecentric_robust""telecentric_robust""telecentric_robust""telecentric_robust"

QualityTypeQualityTypeQualityTypeQualityTypequalityType (input_control)  string(-array) HTupleHTupleHtuple (string) (string) (HString) (char*)

Type of pose quality to be returned in Quality.

Default value: 'error' "error" "error" "error" "error"

List of values: 'error'"error""error""error""error"

PosePosePosePosepose (output_control)  pose HPose, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Pose.

QualityQualityQualityQualityquality (output_control)  number(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Pose quality.

Result

vector_to_posevector_to_poseVectorToPoseVectorToPoseVectorToPose returns 2 (H_MSG_TRUE) if all parameter values are correct.

See also

proj_hom_mat2d_to_poseproj_hom_mat2d_to_poseProjHomMat2dToPoseProjHomMat2dToPoseProjHomMat2dToPose, vector_to_rel_posevector_to_rel_poseVectorToRelPoseVectorToRelPoseVectorToRelPose, camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration

Module

Calibration


ClassesClasses | | Operators