Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

cameraPoseToExtrinsics

Convert camera pose to extrinsics

Syntax

[rotationMatrix,translationVector] = cameraPoseToExtrinsics(orientation,location)

Description

example

[rotationMatrix,translationVector] = cameraPoseToExtrinsics(orientation,location) returns the camera extrinsics, rotationMatrix and translationVector, which represent the coordinate system transformation from world coordinates to camera coordinates. The inputs, orientation and location, represent the 3-D camera pose in the world coordinates.

Examples

collapse all

orientation = eye(3);
location = [0 0 10];
[R,t] = cameraPoseToExtrinsics(orientation,location)
R = 

     1     0     0
     0     1     0
     0     0     1

t = 

     0     0   -10

Input Arguments

collapse all

3-D orientation of the camera in world coordinates, specified as a 3-by-3 matrix. The orientation and location inputs must be the same data type.

Data Types: double | single

3-D location of the camera in world coordinates, specified as a three-element vector. The orientation and location inputs must be the same data type.

Data Types: double | single

Output Arguments

collapse all

3-D rotation , returned as a 3-by-3 matrix. The rotation matrix, together with the translation vector allows you to transform points from the world coordinate system to the camera coordinate system.

The relationship between the rotation matrix and the input orientation matrix is:

rotationMatrix = orientation'

3-D translation, returned as a 1-by-3 vector. The translation vector together with the rotation matrix, enables you to transform points from the world coordinate system to the camera coordinate system.

The relationship between the translation vector and the input orientation matrix is :

translationVector = –location*orientation'

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2016b