extr2pose
Description
returns the camera pose, cameraPose
= extr2pose(camExtrinsics
)cameraPose
, in world coordinates, given the
camera extrinsics.
Examples
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 Translation: [0 0 10] R: [3x3 double] A: [1 0 0 0 0 1 0 0 0 0 1 10 0 0 0 1]
Input Arguments
camExtrinsics
— Camera extrinsics
rigidtform3d
object
Camera extrinsics, specified as a rigidtform3d
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
coordinate system.
Output Arguments
cameraPose
— Camera pose
rigidtform3d
object
Camera pose in world coordinates, returned as a rigidtform3d
object. cameraPose
is the inverse of
camExtrinsics
as calculated using the invert
function.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2022bR2022b: Recommended over extrinsicsToCameraPose
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 extr2pose
function, which supports the premultiply convention. For more information, see
Migrate Geometric Transformations to Premultiply Convention.
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)