Nodes/opencv-comfyui/OpenCV eigenNonSymmetric_1
ComfyUI Node

OpenCV eigenNonSymmetric_1

EigenNonSymmetric, overload two — same math, still no pixels

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

eigenNonSymmetric_1 is eigenNonSymmetric_0 wearing a different overload number - OpenCV declares the function for MatLike and UMat, and this pack's generator made one node per declaration. Same inputs, same outputs, same behavior. If you only need that fact, take it and go.

If you're still here, the thing to understand is that this node is a raw linear-algebra primitive in a category labeled image/OpenCV, and the label is doing a lot of work. cv2.eigenNonSymmetric computes the eigenvalues and eigenvectors of a square non-symmetric matrix. The node takes src (an NPARRAY), and returns nparray_0 (eigenvalues) and nparray_1 (eigenvectors). The optional eigenvalues/eigenvectors inputs are out-parameters you should leave disconnected.

The part that will bite you

Non-symmetric matrices can have complex eigenvalues, and OpenCV stores them as paired floats - each column of the eigenvalue output is [real, imag], with the imaginary part zero for real eigenvalues. So don't expect a clean N-long list of numbers; expect a (2, N) array you'll have to interpret. If that sentence made your eyes glaze over, this node is not for you. If it made sense, you already know this is niche plumbing.

Also worth repeating because people do trip on it: don't feed this an image. An Image2Nparray output is a pixel array - the eigen-decomposition of your image's pixels is not an image operation, it's a math result with no visual meaning.

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 models.

Verdict: fine wrapper, correct behavior, and almost certainly not what you came to ComfyUI to do. The pack even warns you - "expect dragons." This is one of the dragons.

Categoryimage/OpenCV

Inputs (3)

NameTypeDefaultDescription
srcNPARRAY
eigenvaluesoptNPARRAY
eigenvectorsoptNPARRAY

Outputs (2)

NameTypeDescription
nparray_0NPARRAY
nparray_1NPARRAY