ComfyUI Node
cv2.solvePnP
Raw wrapper of cv2.solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, useExtrinsicGuess?, flags?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.solvePnP
- objectPoints
- imagePoints
- cameraMatrix
- distCoeffs
- retval
- rvec
- tvec
◄useExtrinsicGuessfalse►
◄flagsSOLVEPNP_ITERATIVE►
Categoryimage/CV/low-level/cv2 S
Inputs (6)
| 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 be also 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 be also 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. | |
| distCoeffsopt | NPARRAY | Input vector of distortion coefficients $\distcoeffs$. If the vector is NULL/empty, the zero distortion coefficients are assumed. Optional - leave unconnected for the OpenCV default (None). A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here. | |
| useExtrinsicGuessopt | BOOLEAN | false | Parameter used for #SOLVEPNP_ITERATIVE. If true (1), the function uses the provided rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further optimizes them. Preset to the OpenCV default (False). |
| flagsopt | COMBO | SOLVEPNP_ITERATIVE | Method for solving a PnP problem: see More information about Perspective-n-Points is described in |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| retval | BOOLEAN | — |
| rvec | NPARRAY | — |
| tvec | NPARRAY | — |