The resulting 4x4 matrix is Rodrigues vector. Combines all constructors above. Supports 4x4, 3x4, 3x3, 1x3, 3x1 sizes of data matrix.
\\[ \\begin{bmatrix} R & t\\\\ 0 & 1\\\\ \\end{bmatrix} \\]
The last row of the current matrix is set to [0,0,0,1].
The last row of the current matrix is set to [0,0,0,1] when data is not 4x4.
The resulting 4x4 matrix is Rodrigues vector. Combines all constructors above. Supports 4x4, 3x4, 3x3, 1x3, 3x1 sizes of data matrix.
\\[ \\begin{bmatrix} R & t\\\\ 0 & 1\\\\ \\end{bmatrix} \\]
The last row of the current matrix is set to [0,0,0,1].
The last row of the current matrix is set to [0,0,0,1] when data is not 4x4.
The resulting 4x4 matrix is
\\[ \\begin{bmatrix} R & t\\\\ 0 & 1\\\\ \\end{bmatrix} \\]
Rodrigues vector.
The last row of the current matrix is set to [0,0,0,1].
3x1 rotation vector. Its direction indicates the rotation axis and its length indicates the rotation angle in radian (using right hand rule).
3x1 translation vector.
Combines all constructors above. Supports 4x4, 3x4, 3x3, 1x3, 3x1 sizes of data matrix.
The last row of the current matrix is set to [0,0,0,1] when data is not 4x4.
1-channel matrix. when it is 4x4, it is copied to the current matrix and t is not used. When it is 3x4, it is copied to the upper part 3x4 of the current matrix and t is not used. When it is 3x3, it is copied to the upper left 3x3 part of the current matrix. When it is 3x1 or 1x3, it is treated as a rotation vector and the Rodrigues formula is used to compute a 3x3 rotation matrix.
3x1 translation vector.
The resulting 4x4 matrix is Rodrigues vector. Combines all constructors above. Supports 4x4, 3x4, 3x3, 1x3, 3x1 sizes of data matrix.
\\[ \\begin{bmatrix} R & t\\\\ 0 & 1\\\\ \\end{bmatrix} \\]
The last row of the current matrix is set to [0,0,0,1].
The last row of the current matrix is set to [0,0,0,1] when data is not 4x4.
Rotation matrix.
Copy the rotation matrix to the upper left 3x3 part of the current matrix. The remaining elements of the current matrix are not changed.
3x3 rotation matrix.
Rodrigues vector.
It sets the upper left 3x3 part of the matrix. The remaining part is unaffected.
3x1 rotation vector. The direction indicates the rotation axis and its length indicates the rotation angle in radian (using the right thumb convention).
Combines rotation methods above. Supports 3x3, 1x3, 3x1 sizes of data matrix.
It sets the upper left 3x3 part of the matrix. The remaining part is unaffected.
1-channel matrix. When it is a 3x3 matrix, it sets the upper left 3x3 part of the current matrix. When it is a 1x3 or 3x1 matrix, it is used as a rotation vector. The Rodrigues formula is used to compute the rotation matrix and sets the upper left 3x3 part of the current matrix.
the upper left 3x3 part
Rodrigues vector.
a vector representing the upper left 3x3 rotation matrix of the current matrix.
Since the mapping between rotation vectors and rotation matrices is many to one, this function
returns only one rotation vector that represents the current rotation matrix, which is not
necessarily the same one set by [rotation(const Vec3& rvec)]
.
Generated using TypeDoc
It represents a 4x4 homogeneous transformation matrix
$T$
\\[T = \\begin{bmatrix} R & t\\\\ 0 & 1\\\\ \\end{bmatrix} \\]
where
$R$
is a 3x3 rotation matrix and$t$
is a 3x1 translation vector.You can specify
$R$
either by a 3x3 rotation matrix or by a 3x1 rotation vector, which is converted to a 3x3 rotation matrix by the Rodrigues formula.To construct a matrix
$T$
representing first rotation around the axis$r$
with rotation angle$|r|$
in radian (right hand rule) and then translation by the vector$t$
, you can usecv::Vec3f r, t; cv::Affine3f T(r, t);
If you already have the rotation matrix
$R$
, then you can usecv::Matx33f R; cv::Affine3f T(R, t);
To extract the rotation matrix
$R$
from$T$
, useTo extract the translation vector
$t$
from$T$
, useTo extract the rotation vector
$r$
from$T$
, useNote that since the mapping from rotation vectors to rotation matrices is many to one. The returned rotation vector is not necessarily the one you used before to set the matrix.
If you have two transformations
$T = T_1 * T_2$
, useTo get the inverse transform of
$T$
, useSource: opencv2/core/affine.hpp.