Monday, April 29, 2013

Image histogram in MATLAB


%load rgb image
src = 'C:\rainbow.jpg';
rgbI = imread(src);
grayI = rgb2gray(rgbI);

%get image histogram
[counts bins]=imhist(grayI);

%show histogram
bar(bins,counts);





courtsey:http://wildinformatics.blogspot.in/2010/10/image-histogram-in-matlab.html

No comments:

Post a Comment