Nodes/opencv-comfyui/OpenCV eigenNonSymmetric_0
ComfyUI Node

OpenCV eigenNonSymmetric_0

The even nerdier eigenvalue node — for matrices with no manners

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV eigenNonSymmetric_0
  • src
  • eigenvalues
  • eigenvectors
  • nparray_0
  • nparray_1

If eigen_0 was the eigenvalue node with no obvious image use, eigenNonSymmetric_0 is that node's even more specialized sibling. It wraps cv2.eigenNonSymmetric, which does the eigen-decomposition for matrices that aren't symmetric - which is a whole different ballgame, because non-symmetric matrices can have complex eigenvalues, and OpenCV packs those complex pairs into a float array you'll have to decode yourself. This is deep water, and you should only be in it if you genuinely need it.

What it does

Give it one input, src (the matrix as an NPARRAY), and it returns two outputs: nparray_0 (eigenvalues) and nparray_1 (eigenvectors). There's no success boolean here, unlike cv2.eigen - the function just returns the two arrays. Note the representation quirk: for real eigenvalues OpenCV stores them as [real, 0] pairs, and for complex ones as [real, imag] pairs, so the eigenvalue output is shaped like (2, N) and each column is one eigenvalue. That's the kind of detail that makes this node feel hostile to beginners, and honestly it is.

The optional eigenvalues and eigenvectors inputs are the function's out-parameters - leave them unplugged, per the pack's standing advice.

When it's the right tool

Real use cases live in math-heavy plumbing: analyzing linear systems, stability of dynamical models, certain feature-descriptor math. If you have a non-symmetric matrix somewhere in a ComfyUI graph - which is rare, because most covariance-ish matrices people build are symmetric - this is the function. If your matrix is symmetric, you want eigen instead; and if you're not sure what a symmetric matrix is, this node is not for you yet.

Install

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. requirements.txt: opencv-contrib-python, numpy, torch. No downloads.

_0/_1 are the MatLike/UMat overload twins; identical.

The honest version

This is one of the nodes the pack's README is talking about when it says not every generated function "is useful within ComfyUI without further processing." It works exactly as cv2.eigenNonSymmetric does, which is a good thing - but wiring it into an image workflow gets you nothing, and decoding complex eigenvalues from the paired-float output is work you'd rather do in Python. Know what you're building, or skip it with a clear conscience.

Categoryimage/OpenCV

Inputs (3)

NameTypeDefaultDescription
srcNPARRAY
eigenvaluesoptNPARRAY
eigenvectorsoptNPARRAY

Outputs (2)

NameTypeDescription
nparray_0NPARRAY
nparray_1NPARRAY