Nodes/opencv-comfyui/OpenCV recoverPose_1
ComfyUI Node

OpenCV recoverPose_1

The exact twin of the two-camera pose node

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV recoverPose_1
  • points1
  • points2
  • cameraMatrix1
  • distCoeffs1
  • cameraMatrix2
  • distCoeffs2
  • E
  • R
  • t
  • mask
  • int
  • nparray_1
  • nparray_2
  • nparray_3
  • nparray_4
method
prob
threshold

recoverPose_1 is recoverPose_0 twice over - same function call, same nine inputs, same five outputs, and inside the source they're literally identical. This pack auto-generates one node per OpenCV overload stub, and for this two-camera variant the generator couldn't tell the stubs apart. So if you read the _0 page, you've read this one. Drag either into your workflow; the graph won't care.

For the recap: recoverPose estimates the relative camera motion (rotation R + translation t) between two views from matched 2D feature points and camera intrinsics. The _1 variant, like _0, is the full two-camera overload - separate cameraMatrix1/cameraMatrix2 and distCoeffs1/distCoeffs2 per camera, plus method/prob/threshold to drive RANSAC matching, and points1/points2 as the matched point arrays.

Outputs, in order: int (inlier count), nparray_1 (R), nparray_2 (t), nparray_3 (E), nparray_4 (inlier mask).

When you'd pick this family at all

Honest framing: this is 3D computer vision, not image generation. The people who get value out of it are doing Structure-from-Motion experiments, camera calibration, or synthetic-camera work inside ComfyUI, and even they need three things this node does not provide: a feature matcher to produce the point correspondences, the camera intrinsics themselves, and a plan for what to do with R/t once you have them. If you don't have all three, this node will happily take your arrays and hand back a number you can't interpret.

The pack's auto-generated nature means the eight recoverPose nodes you'll find in the menu are actually four overloads, each doubled: _0/_1 (two-camera RANSAC), _2/_3 (essential matrix + shared camera), _4/_5 (essential matrix + focal length/principal point), _6/_7 (essential matrix + distance threshold + triangulation). Pick the overload whose inputs you can actually supply, then ignore its twin.

Install

Same as every node here - no models, OpenCV only:

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 (README has the fix).

Short version: recoverPose_0 and recoverPose_1 are interchangeable. Use the number that makes your workflow file read nicely.

Categoryimage/OpenCV

Inputs (13)

NameTypeDefaultDescription
points1NPARRAY
points2NPARRAY
cameraMatrix1NPARRAY
distCoeffs1NPARRAY
cameraMatrix2NPARRAY
distCoeffs2NPARRAY
methodINT
probFLOAT
thresholdFLOAT
EoptNPARRAY
RoptNPARRAY
toptNPARRAY
maskoptNPARRAY

Outputs (5)

NameTypeDescription
intINT
nparray_1NPARRAY
nparray_2NPARRAY
nparray_3NPARRAY
nparray_4NPARRAY