Skip to content

project_point_hom_mat3dproject_point_hom_mat3dProjectPointHomMat3dProjectPointHomMat3dproject_point_hom_mat3dT_project_point_hom_mat3d🔗

Short description🔗

project_point_hom_mat3dproject_point_hom_mat3dProjectPointHomMat3dProjectPointHomMat3dproject_point_hom_mat3dT_project_point_hom_mat3d — Project a 3D point using a 3×4 projection matrix.

Signature🔗

project_point_hom_mat3d( hom_mat3d HomMat3D, number Px, number Py, number Pz, out real Qx, out real Qy )project_point_hom_mat3d( : : HomMat3D, Px, Py, Pz : Qx, Qy )void ProjectPointHomMat3d( const HTuple& HomMat3D, const HTuple& Px, const HTuple& Py, const HTuple& Pz, HTuple* Qx, HTuple* Qy )static void HOperatorSet.ProjectPointHomMat3d( HTuple homMat3D, HTuple px, HTuple py, HTuple pz, out HTuple qx, out HTuple qy )def project_point_hom_mat3d( hom_mat_3d: Sequence[float], px: MaybeSequence[Union[float, int]], py: MaybeSequence[Union[float, int]], pz: MaybeSequence[Union[float, int]] ) -> Tuple[Sequence[float], Sequence[float]]

def project_point_hom_mat3d_s( hom_mat_3d: Sequence[float], px: MaybeSequence[Union[float, int]], py: MaybeSequence[Union[float, int]], pz: MaybeSequence[Union[float, int]] ) -> Tuple[float, float]Herror T_project_point_hom_mat3d( const Htuple HomMat3D, const Htuple Px, const Htuple Py, const Htuple Pz, Htuple* Qx, Htuple* Qy )

HTuple HHomMat3D::ProjectPointHomMat3d( const HTuple& Px, const HTuple& Py, const HTuple& Pz, HTuple* Qy ) const

double HHomMat3D::ProjectPointHomMat3d( double Px, double Py, double Pz, double* Qy ) const

HTuple HHomMat3D.ProjectPointHomMat3d( HTuple px, HTuple py, HTuple pz, out HTuple qy )

double HHomMat3D.ProjectPointHomMat3d( double px, double py, double pz, out double qy )

Description🔗

project_point_hom_mat3dProjectPointHomMat3d applies the 3×4 projection matrix HomMat3DhomMat3Dhom_mat_3d to all input points (Pxpxpx,Pypypy,Pzpzpz) and returns an array of output points (Qxqxqx,Qyqyqy). The transformation is described by the 3×4 projection matrix given in HomMat3DhomMat3Dhom_mat_3d. This corresponds to the following equations (input and output points as homogeneous vectors):

\[\begin{eqnarray*} \left( \begin{array}{c} Tx \\ Ty \\ Tw \end{array} \right) = \textrm{HomMat3D} \cdot \left( \begin{array}{c} \textrm{Px} \\ \textrm{Py} \\ \textrm{Pz} \\ 1 \end{array} \right) \end{eqnarray*}\]

project_point_hom_mat3dProjectPointHomMat3d then transforms the homogeneous coordinates to Euclidean coordinates by dividing them by \(Tw\):

\[\begin{eqnarray*} \left( \begin{array}{c} \textrm{Qx} \\ \textrm{Qy} \end{array} \right) = \left( \begin{array}{c} \frac{Tx}{Tw} \\ \frac{Ty}{Tw} \end{array} \right) \end{eqnarray*}\]

If a point on the line at infinity (\(Tw = 0\)) is created by the transformation, an error is returned. If this is undesired, project_hom_point_hom_mat3dProjectHomPointHomMat3d can be used.

Note that, consistent with the conventions used by the projection in calibrate_camerasCalibrateCameras, Qxqxqx corresponds to the column coordinate of an image and Qyqyqy corresponds to the row coordinate.

Execution information🔗

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

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

  • Automatically parallelized on internal data level.

Parameters🔗

HomMat3DhomMat3Dhom_mat_3d (input_control) hom_mat3d → (real)(real)HTuple (double)HHomMat3D, HTuple (double)Sequence[float]Htuple (double)

3×4 projection matrix.

Pxpxpx (input_control) number(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Input point (x coordinate).

Pypypy (input_control) number(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Input point (y coordinate).

Pzpzpz (input_control) number(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Input point (z coordinate).

Qxqxqx (output_control) real(-array) → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Output point (x coordinate).

Qyqyqy (output_control) real(-array) → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Output point (y coordinate).

Combinations with other operators🔗

Combinations

Possible predecessors

cam_par_pose_to_hom_mat3dCamParPoseToHomMat3d

Alternatives

project_hom_point_hom_mat3dProjectHomPointHomMat3d, project_3d_pointProject3dPoint

Module🔗

Foundation