solvePnP
solvePnP is a function in OpenCV that solves the Perspective-n-Point (PnP) problem to estimate the pose of a calibrated camera from a set of 3D–2D correspondences. Given a set of 3D object points in the object coordinate system and their corresponding 2D image points, the function computes the rotation and translation that align the 3D points with their image projections under the given camera intrinsics.
Inputs include objectPoints (3D points), imagePoints (2D points in pixels), cameraMatrix (intrinsic matrix), and distCoeffs (distortion
In addition to solvePnP, OpenCV provides solvePnPRansac for robust pose estimation in the presence of outliers,
Common applications include augmented reality, robotic navigation, and pose estimation of known objects in a scene.