OpenCV eigen_0
Pure math, zero pixels, and that's fine
- src
- eigenvalues
- eigenvectors
- bool
- nparray_1
- nparray_2
eigen_0 is a straight wrapper over cv2.eigen, and if your first question is "what does that have to do with images?" - the honest answer is: not much, directly. It computes the eigenvalues and eigenvectors of a symmetric matrix. No pixels in, no pixels out, no visible effect. This node exists because the opencv-comfyui generator wrapped ~600 top-level cv2 functions and this was one of them, and the README warns you in advance that not every function is useful in a ComfyUI graph. eigen_0 is that warning personified.
What it does, precisely
cv2.eigen(src) takes a square, symmetric matrix (src as an NPARRAY) and returns three things: a success boolean, the eigenvalues, and the eigenvectors (as rows, sorted by eigenvalue descending in OpenCV's convention). The node exposes all three as outputs - bool, nparray_1 (eigenvalues), nparray_2 (eigenvectors) - plus optional eigenvalues and eigenvectors inputs that are the function's out-parameters. As with every out-param in this pack, leave them unplugged.
Where it could plausibly matter
Eigenvalue math is everywhere in computer vision even though this node has no image inputs - covariance matrices from feature sets, PCA-style dimensionality reduction, structure tensors for corner detection, stability analysis. If you're building a custom pipeline inside ComfyUI that needs an eigen-decomposition as an intermediate step (say, you've assembled a covariance NPARRAY from some detection features), this is a legitimate building block. If you're not doing that, there is nothing here for you, and you shouldn't feel bad about it.
Note the "symmetric" caveat: for general non-symmetric matrices, OpenCV's other entry point eigenNonSymmetric is the one - eigen is documented for symmetric inputs.
Install
It's in opencv-comfyui (geroldmeisinger). ComfyUI Manager → search OpenCV, or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-python-contrib
Restart ComfyUI. requirements.txt: opencv-contrib-python, numpy, torch. No downloads.
_0/_1 are the usual MatLike/UMat overload twins, identical in behavior.
The one real trap
The input src is an NPARRAY, but it's not an image - it's a matrix. Don't route an Image2Nparray output into it expecting image math; it'll happily compute the eigen-decomposition of your picture's pixel values and hand you numbers that mean nothing. That's actually a useful mental model for this whole pack: every node expects its own kind of NPARRAY, and the pack doesn't hold your hand about it. For eigen_0, that kind is "square symmetric float matrix."
Verdict: skip it unless you're doing serious math-node plumbing. It works as advertised; it just isn't an image node, no matter how much its category label says image/OpenCV.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| eigenvaluesopt | NPARRAY | — | |
| eigenvectorsopt | NPARRAY | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| bool | BOOLEAN | — |
| nparray_1 | NPARRAY | — |
| nparray_2 | NPARRAY | — |