OpenCV transpose_1
Transpose_1 — the mirror image of the mirror node
- src
- dst
- nparray
The joke writes itself: transpose_1 is the twin of transpose_0, and the two are as identical as their function allows. Both wrap cv2.transpose - mirror a matrix across its main diagonal. The pack generates every top-level OpenCV function from its overload declarations, numbers each variant, and ships them as separate nodes. Whatever difference exists between overloads in the type stubs didn't survive into the generated code. Same inputs, same output; pick either.
So the useful content here is the transpose operation itself. On a color image it swaps height and width while leaving channels alone - a diagonal mirror, not a 90° rotation, and not a flip. For photographs it's a curiosity. For matrix math inside a workflow it's occasionally load-bearing: transpose is how you reconcile row-vector and column-vector layouts, and if you're chaining this pack's linear-algebra nodes (SVDecomp, trace, transform), the shape of your arrays is the difference between correct math and garbage output that looks like correct math.
Inputs and outputs that matter
- src (NPARRAY) - the array to transpose.
Optional dst is the out-parameter OpenCV uses for in-place results - the pack README's universal advice is to leave those unwired. Output is a single nparray.
Installation
One pack, both twins: ComfyUI Manager (search "OpenCV"), or git clone https://github.com/geroldmeisinger/opencv-comfyui into ComfyUI/custom_nodes, restart. Requires opencv-contrib-python (pip install opencv-contrib-python; the README's opencv-python-contrib is a typo for the same thing). No models to download.
Common issues
Low-stress node. The pack-wide caveats still apply: work on NPARRAY at batch size 1 (Image2Nparray in, Nparrays2Image out, ImageFromBatch if you have a batch), and remember the BGR/RGB swap happens at the conversion boundary. If a workflow feeds you a "rotated" image and it's actually mirrored along the diagonal, that's the transpose doing its job - you wanted a rotate node.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| dstopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |