estworldpose
Syntax
Description
returns the pose of a calibrated camera in a world coordinate system. The input
worldPose
= estworldpose(imagePoints
,worldPoints
,intrinsics
)worldPoints
must be defined in the world coordinate system.
This function solves the perspective-n-point (PnP) problem using the perspective-three-point (P3P) algorithm [1]. The function eliminates spurious outlier correspondences using the M-estimator sample consensus (MSAC) algorithm. The inliers are the correspondences between image points and world points that are used to compute the camera pose.
[
returns the indices of the inliers used to compute the camera pose, in addition to the
arguments from the previous syntax.worldPose
,inlierIdx
] =
estworldpose(imagePoints
,worldPoints
,intrinsics
)
[
additionally returns a status code to indicate whether there were enough points.worldPose
,inlierIdx
,status
] = estworldpose(imagePoints
,worldPoints
,intrinsics
)
[___] = estworldpose(___,
uses additional options specified by one or more name-value arguments, using any of the
preceding syntaxes.Name=Value
)
Examples
Input Arguments
Output Arguments
Tips
This function does not account for lens distortion. You can undistort the images using the
undistortImage
function before detecting the image points. You can undistort the image points themselves using theundistortPoints
function.
References
[1] Gao, X.-S., X.-R. Hou, J. Tang, and H.F. Cheng. "Complete Solution Classification for the Perspective-Three-Point Problem." IEEE Transactions on Pattern Analysis and Machine Intelligence. Volume 25,Issue 8, pp. 930–943, August 2003.
[2]