pkg load image clear clc I = imread('Lena256color.jpg'); Ired = I(:,:,1); Igreen = I(:,:,2); Iblue = I(:,:,3); subplot(2,3,1), imshow(I,[0 255]), title('Original') subplot(2,3,4), imhist(Ired), title('Red histogram') subplot(2,3,5), imhist(Igreen), title('Green histogram') subplot(2,3,6), imhist(Iblue), title('Blue histogram')