Skip to content

proj_hom_mat2d_to_poseProjHomMat2dToPoseProjHomMat2dToPoseproj_hom_mat2d_to_poseT_proj_hom_mat2d_to_pose๐Ÿ”—

Short description๐Ÿ”—

proj_hom_mat2d_to_poseProjHomMat2dToPoseProjHomMat2dToPoseproj_hom_mat2d_to_poseT_proj_hom_mat2d_to_pose โ€” Compute a pose out of a homography describing the relation between world and image coordinates.

Signature๐Ÿ”—

proj_hom_mat2d_to_pose( hom_mat2d Homography, hom_mat2d CameraMatrix, string Method, out pose Pose )void ProjHomMat2dToPose( const HTuple& Homography, const HTuple& CameraMatrix, const HTuple& Method, HTuple* Pose )static void HOperatorSet.ProjHomMat2dToPose( HTuple homography, HTuple cameraMatrix, HTuple method, out HTuple pose )def proj_hom_mat2d_to_pose( homography: Sequence[float], camera_matrix: Sequence[float], method: str ) -> Sequence[Union[float, int]]

Herror T_proj_hom_mat2d_to_pose( const Htuple Homography, const Htuple CameraMatrix, const Htuple Method, Htuple* Pose )

static HPose HImage::ProjHomMat2dToPose( const HHomMat2D& Homography, const HHomMat2D& CameraMatrix, const HString& Method )

static HPose HImage::ProjHomMat2dToPose( const HHomMat2D& Homography, const HHomMat2D& CameraMatrix, const char* Method )

static HPose HImage::ProjHomMat2dToPose( const HHomMat2D& Homography, const HHomMat2D& CameraMatrix, const wchar_t* Method ) (Windows only)

static HPose HImage.ProjHomMat2dToPose( HHomMat2D homography, HHomMat2D cameraMatrix, string method )

Description๐Ÿ”—

proj_hom_mat2d_to_poseProjHomMat2dToPose computes a pose out of a homography Homographyhomographyhomography that describes the relation between 2D world- (unit meters) and 2D image coordinates. The homography can be obtained by the use of vector_to_proj_hom_mat2dVectorToProjHomMat2d. To compute a pose, a camera matrix (obtained by cam_par_to_cam_matCamParToCamMat, for example) has to be passed in CameraMatrixcameraMatrixcamera_matrix. By setting the Parameter Methodmethodmethod, it is possible to choose which computation algorithm is used. Currently a direct decomposition (Methodmethodmethod = โ€˜decompositionโ€™) and a singular value decomposition based method (Methodmethodmethod = โ€˜decomposition_svdโ€™) are supported. In general due to numeric reasons, the direct decomposition method returns more stable results.

The subsequent calls of vector_to_proj_hom_mat2dVectorToProjHomMat2d and proj_hom_mat2d_to_poseProjHomMat2dToPose are similar to vector_to_poseVectorToPose for 2D objects, whereas no refinement due to redundancy is possible.

Execution information๐Ÿ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters๐Ÿ”—

Homographyhomographyhomography (input_control) hom_mat2d โ†’ (real)HTuple (double)HHomMat2D, HTuple (double)Sequence[float]Htuple (double)

The homography from world- to image coordinates.

CameraMatrixcameraMatrixcamera_matrix (input_control) hom_mat2d โ†’ (real)HTuple (double)HHomMat2D, HTuple (double)Sequence[float]Htuple (double)

The camera calibration matrix K.

Methodmethodmethod (input_control) string โ†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Type of pose computation.

Default: 'decomposition'"decomposition"
List of values: 'decomposition', 'decomposition_svd'"decomposition", "decomposition_svd"

Poseposepose (output_control) pose โ†’ (real / integer)HTuple (double / Hlong)HPose, HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Pose of the 2D object.

Result๐Ÿ”—

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

Combinations with other operators๐Ÿ”—

Combinations

Possible predecessors

image_points_to_world_planeImagePointsToWorldPlane, vector_to_proj_hom_mat2dVectorToProjHomMat2d

See also

vector_to_proj_hom_mat2dVectorToProjHomMat2d, image_points_to_world_planeImagePointsToWorldPlane, vector_to_poseVectorToPose, camera_calibrationCameraCalibration

Module๐Ÿ”—

Calibration