Rodrigues
import { Rodrigues } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Converts a rotation matrix to a rotation vector or vice versa.
Note: More information about the computation of the derivative of a 3D rotation matrix with respect to its exponential coordinate can be found in: - A Compact Formula for the Derivative of a 3-D Rotation in Exponential Coordinates, Guillermo Gallego, Anthony J. Yezzi [Gallego2014ACF]
Note: Useful information on SE(3) and Lie Groups can be found in: - A tutorial on SE(3) transformation parameterizations and on-manifold optimization, Jose-Luis Blanco [blanco2010tutorial] - Lie Groups for 2D and 3D Transformation, Ethan Eade [Eade17] - A micro Lie theory for state estimation in robotics, Joan Solà, Jérémie Deray, Dinesh Atchuthan [Sol2018AML]
Rodrigues(src: Mat, dst: Mat, jacobian: Mat): void;2 available overloads
Rodrigues(src: Mat, dst: Mat): void;Rodrigues(src: Mat, dst: Mat, jacobian: Mat): void;srcInput rotation vector (3x1 or 1x3) or rotation matrix (3x3).
dstOutput destination, filled by the native operation. Output rotation matrix (3x3) or rotation vector (3x1 or 1x3), respectively.
jacobianOutput destination, filled by the native operation. Optional output Jacobian matrix, 3x9 or 9x3, which is a matrix of partial derivatives of the output array components with respect to the input array components.
\begin{array}{l} \theta \leftarrow norm(r) \\ r \leftarrow r/ \theta \\ R = \cos(\theta) I + (1- \cos{\theta} ) r r^T + \sin(\theta) \vecthreethree{0}{-r_z}{r_y}{r_z}{0}{-r_x}{-r_y}{r_x}{0} \end{array}Inverse transformation can be also done easily, since
\sin ( \theta ) \vecthreethree{0}{-r_z}{r_y}{r_z}{0}{-r_x}{-r_y}{r_x}{0} = \frac{R - R^T}{2}A rotation vector is a convenient and most compact representation of a rotation matrix (since any rotation matrix has just 3 degrees of freedom). The representation is used in the global 3D geometry optimization procedures like
calibrateCamera,stereoCalibrate, orsolvePnP.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.