MATLAB File Help: cv.solvePnP | Index |
Finds an object pose from 3D-2D point correspondences
[rvec, tvec, success] = cv.solvePnP(objectPoints, imagePoints, cameraMatrix)
[...] = cv.solvePnP(..., 'OptionName', optionValue, ...)
N
is the number of points, or cell
array of length N
of 3-element vectors can be also passed here
{[x,y,z], ...}
.N
is the number of points, or cell array of
length N
of 2-element vectors can be also passed here
{[x,y], ...}
.A = [fx 0 cx; 0 fy cy; 0 0 1]
.tvec
, brings points from the model coordinate system to the
camera coordinate system.[k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4,taux,tauy]
of 4, 5, 8, 12 or 14
elements. If the vector is empty, the zero distortion coefficients are
assumed. default empty.rvec
. Not set by default.tvec
. Not set by default.Method='Iterative'
. If true,
the function uses the provided rvec
and tvec
values as initial
approximations of the rotation and translation vectors, respectively,
and further optimizes them. default false.imagePoints
and the
projected (using cv.projectPoints) objectPoints
. This is the
default.fx
and
fy
assuming that both have the same value. Then the
cameraMatrix
is updated with the estimated focal length.The function estimates the object pose given a set of object points, their corresponding image projections, as well as the camera matrix and the distortion coefficients.
[gao2003complete]:
X.S. Gao, X.R. Hou, J. Tang, H.F. Chang; "Complete Solution Classification for the Perspective-Three-Point Problem", IEEE Trans. on PAMI, vol. 25, No. 8, p. 930-943, August 2003.
[morenoepnp]:
F. Moreno-Noguer, V. Lepetit and P. Fua; "EPnP: Efficient Perspective-n-Point Camera Pose Estimation".
[lepetit2009epnp]:
V. Lepetit, F. Moreno-Noguer, P. Fua; "EPnP: An accurate O(n) solution to the PnP problem". IJCV, vol. 81, No. 2, p. 155-166, 2009
[hesch2011direct]:
Joel A. Hesch and Stergios I. Roumeliotis. "A Direct Least-Squares (DLS) Method for PnP". IEEE International Conference on Computer Vision, p. 383-390, 2011.
[penate2013exhaustive]:
A. Penate-Sanchez, J. Andrade-Cetto, F. Moreno-Noguer; "Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation". IEEE Trans. on PAMI, vol. 35, No. 10, p. 2387-2400, 2013.