OpenCV recoverPose_3
The twin of the essential-matrix pose node
- E
- points1
- points2
- cameraMatrix
- R
- t
- mask
- int
- nparray_1
- nparray_2
- nparray_3
recoverPose_3 is a duplicate of recoverPose_2 - same cv2.recoverPose call, same E + points + shared cameraMatrix signature, same outputs. The auto-generator behind this pack emits one node per OpenCV overload stub, and for this overload the two stubs were indistinguishable, so you get a twin. Whatever the _2 page told you applies word for word here.
The short version of what it does: you give it an essential matrix E, matched 2D points from two views, and one shared camera intrinsics matrix. It decomposes E into the rotation R and translation t between the two cameras, using the point matches to pick the geometrically-consistent pose out of the four candidates the math allows. Outputs in order: int (number of points consistent with the chosen pose), nparray_1 (R), nparray_2 (t, scale-ambiguous), nparray_3 (inlier mask).
Inputs (quick)
E- 3×3 essential matrix (NPARRAY).points1,points2- matched point arrays (N×2or1×N×2).cameraMatrix- shared 3×3 intrinsics[[fx,0,cx],[0,fy,cy],[0,0,1]].- Optional
R,t,mask- out-parameters; leave them unplugged.
Before you build on this
Two warnings that are worth repeating because they'll save you an hour. First, E must be a genuine essential matrix from calibrated cameras - the uncalibrated fundamental matrix is a different object and this node won't rescue you from it. Second, none of the recoverPose family computes your point matches for you; you need a source of correspondences (a feature matcher from another pack or your own data) and real intrinsics. If all three pieces - E, points, calibration - aren't in your graph already, this node is a paperweight.
recoverPose_3 vs recoverPose_2: no difference, use either. The menu's eight recoverPose entries are really four overloads doubled (_0/_1, _2/_3, _4/_5, _6/_7); pick the overload whose inputs you can supply and ignore the twin.
Install
Standard for the pack - 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 (fix in the README).
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| E | NPARRAY | — | |
| points1 | NPARRAY | — | |
| points2 | NPARRAY | — | |
| cameraMatrix | NPARRAY | — | |
| Ropt | NPARRAY | — | |
| topt | NPARRAY | — | |
| maskopt | NPARRAY | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| int | INT | — |
| nparray_1 | NPARRAY | — |
| nparray_2 | NPARRAY | — |
| nparray_3 | NPARRAY | — |