rel_pose_to_fundamental_matrixrel_pose_to_fundamental_matrixRelPoseToFundamentalMatrixRelPoseToFundamentalMatrixrel_pose_to_fundamental_matrixT_rel_pose_to_fundamental_matrix
Short description
rel_pose_to_fundamental_matrixrel_pose_to_fundamental_matrixRelPoseToFundamentalMatrixRelPoseToFundamentalMatrixrel_pose_to_fundamental_matrixT_rel_pose_to_fundamental_matrix — Compute the fundamental matrix from the relative orientation of two
cameras.
Signature
rel_pose_to_fundamental_matrix( pose RelPose, number CovRelPose, campar CamPar1, campar CamPar2, out hom_mat2d FMatrix, out real CovFMat )rel_pose_to_fundamental_matrix( : : RelPose, CovRelPose, CamPar1, CamPar2 : FMatrix, CovFMat )void RelPoseToFundamentalMatrix( const HTuple& RelPose, const HTuple& CovRelPose, const HTuple& CamPar1, const HTuple& CamPar2, HTuple* FMatrix, HTuple* CovFMat )static void HOperatorSet.RelPoseToFundamentalMatrix( HTuple relPose, HTuple covRelPose, HTuple camPar1, HTuple camPar2, out HTuple FMatrix, out HTuple covFMat )def rel_pose_to_fundamental_matrix( rel_pose: Sequence[Union[float, int]], cov_rel_pose: Sequence[Union[float, int]], cam_par_1: Sequence[Union[float, int, str]], cam_par_2: Sequence[Union[float, int, str]] ) -> Tuple[Sequence[float], Sequence[float]]
Herror T_rel_pose_to_fundamental_matrix( const Htuple RelPose, const Htuple CovRelPose, const Htuple CamPar1, const Htuple CamPar2, Htuple* FMatrix, Htuple* CovFMat )
HHomMat2D HCamPar::RelPoseToFundamentalMatrix( const HPose& RelPose, const HTuple& CovRelPose, const HCamPar& CamPar2, HTuple* CovFMat ) const
HHomMat2D HPose::RelPoseToFundamentalMatrix( const HTuple& CovRelPose, const HCamPar& CamPar1, const HCamPar& CamPar2, HTuple* CovFMat ) const
HTuple HHomMat2D::RelPoseToFundamentalMatrix( const HPose& RelPose, const HTuple& CovRelPose, const HCamPar& CamPar1, const HCamPar& CamPar2 )
HHomMat2D HCamPar.RelPoseToFundamentalMatrix( HPose relPose, HTuple covRelPose, HCamPar camPar2, out HTuple covFMat )
HHomMat2D HPose.RelPoseToFundamentalMatrix( HTuple covRelPose, HCamPar camPar1, HCamPar camPar2, out HTuple covFMat )
HTuple HHomMat2D.RelPoseToFundamentalMatrix( HPose relPose, HTuple covRelPose, HCamPar camPar1, HCamPar camPar2 )
Description
Cameras including lens distortions can be modeled by the following
set of parameters: the focal length f, two scaling factors
\(s_{x},s_{y}\), the coordinates of the principal point
\((c_{x},c_{y})\) and the distortion coefficient
\(\kappa\). For a more detailed description see the
chapter Calibration. Only cameras with a distortion
coefficient equal to zero project straight lines in the world onto
straight lines in the image. This is also true for telecentric
cameras and for cameras with tilt lenses.
rel_pose_to_fundamental_matrixRelPoseToFundamentalMatrix handles telecentric lenses
and tilt lenses correctly. However, for reasons of simplicity, these
lens types are ignored in the formulas below. If the distortion
coefficient is equal to zero, image projection is a linear mapping
and the camera, i.e., the set of internal parameters, can be
described by the camera matrix \(CamMat\):
\[\begin{eqnarray*} CamMat \quad = \quad
\left(\begin{array}{ccc}
f/s_{x} & 0 & c_{x} \\
0 & f/s_{y} & c_{y} \\
0 & 0 & 1
\end{array} \right) \quad .
\end{eqnarray*}\]
Going from a nonlinear model to a linear model is an approximation
of the real underlying camera. For a variety of camera lenses,
especially lenses with long focal length, the error induced by this
approximation can be neglected. Following the formula
\(E=([t]_{\times} R)^T\), the essential matrix
E is derived from the translation t and the
rotation R of the relative pose RelPoserelPoserel_pose (see also
operator vector_to_rel_poseVectorToRelPose). In the linearized framework
the fundamental matrix can be calculated from the relative pose and
the camera matrices according to the formula presented under
essential_to_fundamental_matrixEssentialToFundamentalMatrix:
\[\begin{eqnarray*}
\textrm{FMatrix} \quad = \quad CamMat2^{-T} \cdot
([t]_{\times} R)^T \cdot CamMat1^{-1}
\quad .
\end{eqnarray*}\]
The transformation from a relative pose to a fundamental matrix goes
along with the propagation of the covariance matrices
CovRelPosecovRelPosecov_rel_pose to CovFMatcovFMatcov_fmat. If CovRelPosecovRelPosecov_rel_pose is
empty CovFMatcovFMatcov_fmat will be empty too.
The conversion operator rel_pose_to_fundamental_matrixRelPoseToFundamentalMatrix is
used especially for a subsequent visualization of the epipolar line
structure via the fundamental matrix, which depicts the underlying
stereo geometry.
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
RelPoserelPoserel_pose (input_control) pose → (real / integer)(real / integer)HTuple (double / Hlong)HPose, HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)
Relative orientation of the cameras (3D pose).
CovRelPosecovRelPosecov_rel_pose (input_control) number-array → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)
6x6 covariance matrix of
relative pose.
Default: [][]
CamPar1camPar1cam_par_1 (input_control) campar → (real / integer / string)(real / integer / string)HTuple (double / Hlong / HString)HCamPar, HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)
Parameters of the 1. camera.
CamPar2camPar2cam_par_2 (input_control) campar → (real / integer / string)(real / integer / string)HTuple (double / Hlong / HString)HCamPar, HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)
Parameters of the 2. camera.
FMatrixFMatrixfmatrix (output_control) hom_mat2d → (real)(real)HTuple (double)HHomMat2D, HTuple (double)Sequence[float]Htuple (double)
Computed fundamental matrix.
CovFMatcovFMatcov_fmat (output_control) real-array → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
9x9 covariance matrix of the
fundamental matrix.
Combinations with other operators
Combinations
Possible predecessors
vector_to_rel_poseVectorToRelPose
Alternatives
essential_to_fundamental_matrixEssentialToFundamentalMatrix
See also
calibrate_camerasCalibrateCameras
Module
3D Metrology