Nodes/comfyui_cv/cv2.solvePnPRefineVVS
ComfyUI Node

cv2.solvePnPRefineVVS

Raw wrapper of cv2.solvePnPRefineVVS(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, criteria?, VVSlambda?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
cv2.solvePnPRefineVVS
  • objectPoints
  • imagePoints
  • cameraMatrix
  • distCoeffs
  • rvec
  • tvec
  • rvec
  • tvec
criteria_typemax count or epsilon (whichever first)
criteria_max_count30
criteria_epsilon0.00
VVSlambda1.0000
Categoryimage/CV/low-level/cv2 S

Inputs (10)

NameTypeDefaultDescription
objectPointsNPARRAYArray of object points in the object coordinate space, Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. vector\ can also be passed here. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
imagePointsNPARRAYArray of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. vector\ can also be passed here. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
cameraMatrixNPARRAYInput camera intrinsic matrix $\cameramatrix{A}$ . A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
distCoeffsNPARRAYInput vector of distortion coefficients $\distcoeffs$. If the vector is NULL/empty, the zero distortion coefficients are assumed. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
rvecNPARRAYInput/Output rotation vector (see ) that, together with tvec, brings points from the model coordinate system to the camera coordinate system. Input values are used as an initial solution. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
tvecNPARRAYInput/Output translation vector. Input values are used as an initial solution. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here.
criteria_typeoptCOMBOmax count or epsilon (whichever first)When to stop iterating: after max_count iterations, when the change drops below epsilon, or whichever comes first.
criteria_max_countoptINT301–2147483647Maximum iterations (ignored when 'epsilon only').
criteria_epsilonoptFLOAT0.000–1e+38Target accuracy / smallest change worth continuing for (ignored when 'max count only').
VVSlambdaoptFLOAT1.0000-1e+38–1e+38Gain 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) scheme. Preset to the OpenCV default (1.0).

Outputs (2)

NameTypeDescription
rvecNPARRAY
tvecNPARRAY