Split and display channels of color image

Display RGB channels from color image as three different gray images

Other languages:

RGB image is composed of three color channels. This script decomposes those channels into own variables and displays them as grayscale images.

A = imread('kytka256.jpg');

subplot 221;imshow(A);title('Original');
subplot 222;imshow(R);title('Red');
subplot 223;imshow(G);title('Green');
subplot 224;imshow(B);title('Blue');
Something is wrong? Let us know right here