Start » Filter Reference » OpenCV » Camera Calibration And 3D Reconstruction » cvSolvePnP

cvSolvePnP


Module: OpenCV

Finds an object pose from 3D-2D point correspondences. This function returns the rotation and the translation vectors that transform a 3D point expressed in the object coordinate frame to the camera coordinate frame.

Name Type Description
Input value
inObjectPoints Point3DArray
Input value
inImagePoints Point2DArray
Input value
inCameraMatrix Matrix
Input value
inDistCoeffs Matrix Coefficients of distortion
Input value
inUseExtrinsicGuess Bool
Input value
inMethod CvSolvePnPMethod
Output value
outRVec Vector3D Rotation
Output value
outTVec Vector3D Translation

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Inconsistent number of points in inImagePoints and inObjectPoints in cvSolvePnP.
DomainError Missing inImagePoints or inObjectPoints in cvSolvePnP.
DomainError outRVecCv doesn't have 3 elements in cvSolvePnP
DomainError outTVecCv doesn't have 3 elements in cvSolvePnP

Complexity Level

This filter is available on Basic Complexity Level.