OpenCV decomposeEssentialMat_1
The Twin for Camera-Motion Decomposition
- E
- R1
- R2
- t
- nparray_0
- nparray_1
- nparray_2
OpenCV decomposeEssentialMat_1 is the overload twin of decomposeEssentialMat_0: same cv2.decomposeEssentialMat(E, R1, R2, t) call, same three outputs, no behavioral difference. The _1 exists purely because geroldmeisinger/opencv-comfyui emits one node per overload in cv2's type stubs, and both the MatLike and UMat signatures landed in the catalog. Pick either one.
What it's for
Structure-from-motion math. Feed it a 3×3 essential matrix relating two camera views, and it hands back the two candidate rotations (R1, R2) and the translation direction (t) between the cameras - the input you'd need to recover camera pose before triangulating 3D points. It's a niche, non-generative node that exists because the pack wraps every top-level cv2 function; unless you're building pose or 3D-reconstruction pipelines inside ComfyUI, you won't touch it.
Inputs and outputs
E(NPARRAY) - the 3×3 essential matrix (a float matrix, not an image; typically from this pack'sfindEssentialMat_0).R1,R2,t(NPARRAY, optional) - out-parameters; leave them unconnected.nparray_0,nparray_1(outputs) - the two 3×3 rotation candidates.nparray_2(output) - the 3×1 translation direction.
Install
ComfyUI Manager (search opencv-comfyui) or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-contrib-python
Restart ComfyUI. No models. Remember the real package name is opencv-contrib-python, not the README's opencv-python-contrib, and that conflicting OpenCV installs surface as the guidedFilter import error (the README links the known fix).
As with its twin, the outputs are float matrices, not pictures - feeding them to Nparrays2Image will error with 'NoneType' object has no attribute 'shape' or produce nonsense. Route them to downstream camera nodes instead. The full explanation is in the decomposeEssentialMat_0 article.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| E | NPARRAY | — | |
| R1opt | NPARRAY | — | |
| R2opt | NPARRAY | — | |
| topt | NPARRAY | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| nparray_0 | NPARRAY | — |
| nparray_1 | NPARRAY | — |
| nparray_2 | NPARRAY | — |