Nodes/comfyui_cv/CV Concat Arrays
ComfyUI Node

CV Concat Arrays

Joins arrays along an EXISTING axis - the inverse of splitting one. axis 0 appends rows (two detection tables, two point sets, two frames of samples), axis 1 puts them side by side, axis -1 merges channels back together (the return leg of 'CV Split Channels' / cv2.extractChannel). Unlike 'CV Stack Batch' it adds no new axis and the inputs need only agree on the OTHER axes. Mixed dtypes are promoted the numpy way (uint8 + float32 -> float32); cast first with 'CV Cast Array' if you need to control that.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Concat Arrays
  • array1
  • array2
  • array3
  • array4
  • nparray
  • length
axis0
Categoryimage/CV/low-level

Inputs (5)

NameTypeDefaultDescription
array1NPARRAYFirst array. Its number of dimensions and its sizes on every axis EXCEPT the concat axis must match the others.
array2NPARRAYSecond array, appended after the first.
axisINT0-8–8Which axis to join along. 0 = rows (append), 1 = columns (side by side), -1 = the last axis (merge arrays that already have a channel axis). Negative counts from the end. ONE PAST the end - axis 2 for (H,W) inputs - stacks a NEW last axis instead, which is cv2.merge: three (H,W) channels become one (H,W,3) image. Splitting with cv2.extractChannel drops that axis, so that is the setting the round trip needs.
array3optNPARRAYOptional third array, appended after the second.
array4optNPARRAYOptional fourth array, appended after the third.

Outputs (2)

NameTypeDescription
nparrayNPARRAYThe joined array. Its size on the concat axis is the sum of the inputs'; every other axis is unchanged.
lengthINTSize of the result along the concat axis - handy for splitting it back apart with 'CV Take By Index'.