Convert extrinsics to camera pose
Convert Camera Coordinates to World Coordinates
Create a 3-D rigid geometric transformation from a rotation matrix and a translation vector.
rotationMatrix = eye(3); translationVector = [0 0 -10]; tform = rigidtform3d(rotationMatrix,translationVector);
Compute the camera pose in world coordinates.
cameraPose = extr2pose(tform)
cameraPose = rigidtform3d with properties: Dimensionality: 3 R: [3×3 double] Translation: [0 0 10] A: [4×4 double]
camExtrinsics — Camera extrinsics
Camera extrinsics, specified as a
object. The extrinsics are a transformation from world coordinates to camera coordinates
that enables you to transform points from the world coordinate system to the camera
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version HistoryIntroduced in R2022b
R2022b: Recommended over
Starting in R2022b, most Computer Vision Toolbox™ functions create and perform geometric transformations using the premultiply
convention. However, the
extrinsicsToCameraPose function uses the
postmultiply convention. Although there are no plans to remove
extrinsicsToCameraPose at this time, you can streamline your
geometric transformation workflows by switching to the
function, which supports the premultiply convention.