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.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| objectPoints | NPARRAY | 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\ can also be passed here. A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here. | |
| imagePoints | NPARRAY | Array 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. | |
| cameraMatrix | NPARRAY | Input camera intrinsic matrix $\cameramatrix{A}$ . A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here. | |
| distCoeffs | NPARRAY | Input 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. | |
| rvec | NPARRAY | Input/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. | |
| tvec | NPARRAY | Input/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_typeopt | COMBO | max 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_countopt | INT | 301–2147483647 | Maximum iterations (ignored when 'epsilon only'). |
| criteria_epsilonopt | FLOAT | 0.000–1e+38 | Target accuracy / smallest change worth continuing for (ignored when 'max count only'). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| rvec | NPARRAY | — |
| tvec | NPARRAY | — |