將圖片的RGB讀出
判斷顏色分布大小
clear all;
close all
inputName='mush.jpg';
img=imread(inputName);
fprintf('The size of the image is %d * %d \n',size(img,1),size(img,2));
R=img(:,:,1);
G=img(:,:,2);
B=img(:,:,3);
figure(1);
imhist(R);
title('The hist of R');
figure(2);
imhist(G);
title('The hist of G');
figure(3);
imhist(B);
title('The hist of B');
沒有留言:
張貼留言