更新时间:2023-02-27 07:39:30
这是我的IMHIST版本:
Here is my version of IMHIST:
I = imread('pic.jpg');
II = double(I);
clr = 'rgb'; clrTxt = {'Red' 'Green' 'Blue'};
for i=1:3
h = subplot(3,1,i);
c = histc(reshape(II(:,:,i),[],1), 0:255);
bar(0:255, c./max(c), 'histc')
set(gca, 'XLim', [0 255], 'YLim',[0 1])
set(findobj(h,'Type','patch'), 'FaceColor',clr(i), 'EdgeColor','none')
ylabel(clrTxt{i})
end
xlabel('Intensity')