Starting in R2022b, most Computer Vision Toolbox™ functions create and perform geometric transformations using the
premultiply convention. However, the cameraPoseToExtrinsics
function uses the postmultiply convention. Although there are no plans to remove
cameraPoseToExtrinsics
at this time, you can streamline
your geometric transformation workflows by switching to the pose2extr
function, which supports the premultiply convention. For
more information, see Migrate Geometric Transformations to Premultiply Convention.
To update your code:
Change instances of the function name
cameraPoseToExtrinsics
to
pose2extr
.
Specify the camera pose as a rigidtform3d
object using the cameraPose
argument. pose2extr
does not support specifying the
camera pose using the orientation
and
translation
input arguments. Note that you create
the rigidtform3d
object using the transpose of
orientation
or the transpose of the transformation
matrix in the T
property of
tform
.
Discouraged Usage | Recommended Replacement |
---|
This example specifies the camera pose as a rotation
matrix orientation in the premultiply
convention and a translation vector
location , then converts the camera
pose to extrinsics using the
cameraPoseToExtrinsics function,
using the transpose of
orientation . | This example specifies the camera pose as a
rigidtform3d object, then converts the
camera pose to extrinsics using the
pose2extr
function. If
you need to obtain a rotation matrix and translation vector,
then you can query properties of
extrinsics . If
you want the rotation matrix in the postmultiply convention,
take the transpose of
extrinsics.R . |
This example specifies a camera pose as a
rigid3d object using the transpose of
the geometric transformation matrix A in
the premultiply convention, then converts the camera pose to
extrinsics using the
cameraPoseToExtrinsics
function. | This example specifies the camera pose as a
rigidtform3d object using the geometric
transformation matrix A , then converts
the camera pose to extrinsics using the
pose2extr function.
If
instead you start with an existing rigid3d
object cameraPoseOld , then you can get
the geometric transformation matrix in the postmultiply
convention by querying the property T of
cameraPoseOld . |