OpenCV findEssentialMat_5
FindEssentialMat_4, the duplicate you can safely ignore
- points1
- points2
- cameraMatrix1
- distCoeffs1
- cameraMatrix2
- distCoeffs2
- mask
- nparray_0
- nparray_1
OpenCV findEssentialMat_5 is findEssentialMat_4 wearing a different number. Same six NPARRAY inputs (points1, points2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2), same RANSAC knobs (method, prob, threshold), same optional mask, and it calls the exact same cv2.findEssentialMat signature. There's no scenario where _5 behaves differently from _4.
The reason it exists is pack mechanics, not function design. This pack generates a node for every overloaded signature it finds in OpenCV's Python type stubs, and OpenCV declares nearly everything twice - once for MatLike, once for UMat. Both are thin wrappers over the same C++ implementation, so the generator dutifully emits both as separate nodes. findEssentialMat_4 got the MatLike signature; findEssentialMat_5 got the UMat one. Same math, same outputs.
What it does (briefly)
Estimates the essential matrix between two views when each view has its own calibrated camera: undistort each side with its own distortion coefficients, map to normalized coordinates, run RANSAC over the correspondences. Outputs nparray_0 (the 3x3 essential matrix) and nparray_1 (the inlier mask). This is the stereo-rig variant - if you're on a single camera, findEssentialMat_1 (full intrinsics) or _2 (focal length only) is the one you actually want.
The recurring gotcha
Both outputs are NPARRAYs, and they're geometry, not pixels. The 'NoneType' object has no attribute 'shape' error you'll eventually hit is the pack telling you you've tried to render a matrix as an image. Check what the OpenCV function returns before wiring anything into Nparrays2Image.
Also note that points1/points2 must be matched correspondences - this node estimates the matrix, it doesn't find matches for you. Feature matchers were skipped by the pack's generator (they're classes, and it only wraps top-level functions), so matching usually happens outside ComfyUI or through careful chaining of the detection nodes that do exist.
Install
Standard for the pack. ComfyUI Manager → search opencv-comfyui → install → restart, or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
requirements.txt pulls in opencv-contrib-python, numpy, torch. Startup failure almost always traces back to cv2 not importing cleanly - check for duplicate OpenCV installs (the guidedFilter error is the usual tell).
Bottom line: if a workflow references _5, just swap in _4 and move on. They're the same node.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| points1 | NPARRAY | — | |
| points2 | NPARRAY | — | |
| cameraMatrix1 | NPARRAY | — | |
| distCoeffs1 | NPARRAY | — | |
| cameraMatrix2 | NPARRAY | — | |
| distCoeffs2 | NPARRAY | — | |
| method | INT | — | |
| prob | FLOAT | — | |
| threshold | FLOAT | — | |
| maskopt | NPARRAY | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| nparray_0 | NPARRAY | — |
| nparray_1 | NPARRAY | — |