Nodes/opencv-comfyui/OpenCV recoverPose_7
ComfyUI Node

OpenCV recoverPose_7

The twin of the pose-plus-triangulation node

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV recoverPose_7
  • E
  • points1
  • points2
  • cameraMatrix
  • R
  • t
  • mask
  • triangulatedPoints
  • int
  • nparray_1
  • nparray_2
  • nparray_3
  • nparray_4
distanceThresh

recoverPose_7 is recoverPose_6 in a second costume. Same cv2.recoverPose call, same five inputs, same five outputs, and if you diff the generated source the two nodes are identical. The pack emits one node per OpenCV overload stub and couldn't distinguish these two, so you get a twin. Everything on the _6 page applies verbatim.

For the recap: this is the most feature-complete of the pack's four recoverPose overloads. You give it an essential matrix E, matched 2D points, a shared cameraMatrix, and a distanceThresh in world units. It decomposes E into rotation R and translation t, then triangulates the matched points into actual 3D coordinates (triangulatedPoints), rejecting any point that triangulates closer than distanceThresh to a camera. Outputs: int (surviving-point count), nparray_1 (R), nparray_2 (t), nparray_3 (inlier mask), nparray_4 (3D points).

The part people underestimate

distanceThresh isn't a slider you can set once and forget - its meaning is tied to the units of your scene. If your points are in meters, a threshold of 0.1 rejects anything closer than 10cm; if your data is in arbitrary normalized units, that same 0.1 means something entirely different. Get it wrong and the node either rejects everything (your int output collapses to ~0) or filters nothing (it stops being a filter). Start loose, watch the inlier count, tighten from there.

And the standing caveat for the whole family: this is 3D computer vision. It needs real matched points, a genuine essential matrix, and a calibrated camera to mean anything. Nobody routes this into a diffusion pipeline; it's for reconstruction and camera-geometry experiments. If that's not your project, recoverPose_7 is not your node.

recoverPose_7 vs recoverPose_6 - no difference. The menu's eight recoverPose entries are four overloads doubled; _6/_7 is the triangulation one.

Install

Standard pack install - no models, just OpenCV:

cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-contrib-python

Or search "OpenCV" in ComfyUI Manager, restart, find it under image/OpenCV. batch_size==1 only; the guidedFilter import error at load means conflicting OpenCV packages, with the fix linked in the README.

Categoryimage/OpenCV

Inputs (9)

NameTypeDefaultDescription
ENPARRAY
points1NPARRAY
points2NPARRAY
cameraMatrixNPARRAY
distanceThreshFLOAT
RoptNPARRAY
toptNPARRAY
maskoptNPARRAY
triangulatedPointsoptNPARRAY

Outputs (5)

NameTypeDescription
intINT
nparray_1NPARRAY
nparray_2NPARRAY
nparray_3NPARRAY
nparray_4NPARRAY