ComfyUI Node
CV Permute Axes
Reorders an ndarray's axes (numpy moveaxis). The main use is converting an (H, W, C) image array into (C, H, W) for DNN blob input, or vice-versa. The 'source' axis is moved to the 'dest' position; all other axes keep their relative order.
CV Permute Axes
- nparray
- nparray
◄source-1►
◄dest0►
Categoryimage/CV/low-level
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| nparray | NPARRAY | Array whose axes to permute. | |
| source | INT | -1-4–4 | Axis to move FROM (-1 = last, e.g. the channel axis in an HWC image). |
| dest | INT | 0-4–4 | Axis to move TO (0 = first, e.g. making channels the leading dimension for NCHW). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | The same data with axes reordered. |