I am extremely new to scikit-image (skimage
) library in Python for image processing (started few minutes ago!). I have used imread
to read an image file in a numpy.ndarray
. The array is 3 dimensional where the size of the third dimension is 3 (namely one for each of Red, Green and Blue components of an image).
rgb_image = imread("input_rgb_image.jpg")
rgb_image.shape # gives (1411L, 1411L, 3L)
I tried to extract green channel as:
green_image = rgb_image[:,:,1]
But when I write this image matrix to an output file as:
imsave("green_output_image.jpg",green_image)
I get an image which doesn't really look ONLY green!
rgb_image[:,:,0] = 0
and so on.... – Morningglory