Extracting Color channels in images
Color images are made of RGB color combination, below matlab code extracts all these individual channels.
>> A = imread('DesertSmall.jpg'); % reading Image >> ARed = A(:,:,1); % extracting RED Channel >> AGreen = A(:,:,2); % extracting GREEN Channel >> ABlue = A(:,:,3); % extracting BLUE Channel >> %-----------START PLOTTING--------- >> subplot(2,2,1); imshow(A); axis image; >> subplot(2,2,2); imshow(ARed); title('red'); >> subplot(2,2,3); imshow(AGreen); title('green'); >> subplot(2,2,4); imshow(ABlue); title('blue');