Creates one multichannel array out of several single-channel ones.
cv2.merge(mv[, dst]) → dst
mv[0]
; The number of channels will be the total number of channels in the matrix array.This function merges separate single-channel arrays into a multi-channel array: \(\text{dst}(I)_c = \text{mv}[c](I)\). This is most commonly used to merge separate image planes for B, G, and R channels into a color image.
split()
does the reverse operation. If you need to shuffle channels in some other advanced way, use mixChannels()
.