Nodes/comfyui_cv/cv2.solvePnPRefineLM
ComfyUI Node

cv2.solvePnPRefineLM

Raw wrapper of cv2.solvePnPRefineLM(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, criteria?). 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.solvePnPRefineLM
  • objectPoints
  • imagePoints
  • cameraMatrix
  • distCoeffs
  • rvec
  • tvec
  • rvec
  • tvec
criteria_typemax count or epsilon (whichever first)
criteria_max_count30
criteria_epsilon0.00
Categoryimage/CV/low-level/cv2 S

Inputs (9)

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').

Outputs (2)

NameTypeDescription
rvecNPARRAY
tvecNPARRAY