Skip to content

solvePnPRefineVVS

geometryfunctionOpenCV 5.0.0
import { solvePnPRefineVVS } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSobjectPoints, imagePoints, cameraMatrix, distCoeffs
FUNCTIONsolvePnPRefineVVS
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution.

See: calib3d_solvePnP

solvePnPRefineVVS(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, criteria: TermCriteria, VVSlambda: number): void;
3 available overloads
solvePnPRefineVVS(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat): void;
solvePnPRefineVVS(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, criteria: TermCriteria): void;
solvePnPRefineVVS(objectPoints: Mat, imagePoints: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, criteria: TermCriteria, VVSlambda: number): void;
objectPoints

Array of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. vector<Point3d> can also be passed here.

imagePoints

Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. vector<Point2d> can also be passed here.

cameraMatrix

Input camera intrinsic matrix \cameramatrix{A} .

distCoeffs

Input vector of distortion coefficients \distcoeffs. If the vector is NULL/empty, the zero distortion coefficients are assumed.

rvec

Input/output value, modified by the native operation. Input/Output rotation vector (see Rodrigues ) that, together with tvec, brings points from the model coordinate system to the camera coordinate system. Input values are used as an initial solution.

tvec

Input/output value, modified by the native operation. Input/Output translation vector. Input values are used as an initial solution.

criteria

Criteria when to stop the Levenberg-Marquard iterative algorithm.

VVSlambda

Gain for the virtual visual servoing control law, equivalent to the \alpha gain in the Damped Gauss-Newton formulation.

The function refines the object pose given at least 3 object points, their corresponding image projections, an initial solution for the rotation and translation vector, as well as the camera intrinsic matrix and the distortion coefficients. The function minimizes the projection error with respect to the rotation and the translation vectors, using a virtual visual servoing (VVS) [Chaumette06] [Marchand16] scheme.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.