Extract one specific feed from png using scikit image

I am evaluating a scikit image and looking for a way to only read the green channel from my images. Images are saved as RGBA, having only a green channel with values.

Is there something similar to CvSplit as in OpenCV?

+3


source to share


1 answer


The images are saved as MxNxd

arrays, where in your case d == 4

. So, use the standard NumPy slicing to get the green:



green = image[..., 1]

      

+5


source







All Articles