Suppose I have a image with some dimension (1920, 1080, 3) , I want to extract out R,G,B values into separate arrays R , G, B . I tried to do it li
(1920, 1080, 3)
R , G, B
dsplit it.
dsplit
import numpy as np def channelSplit(image): return np.dsplit(image,image.shape[-1]) [B,G,R]=channelSplit(image)
This works for RGB or RGBA images.