Fri Mar 25, 2011 4:08 pm
I = imread('cameraman.tif');
%% Show current image.
imshow(I);
%% draw the cumulative histogram of orginal image.
figure;
histogram = imhist(I);%image histogram.
ch = cumsum(histogram);%cumulative histogram.
bar(ch,'BarWidth',1)%draw bar.
%% image equalization and cumulative histogram
figure;
J = histeq(I);
imshow(J);
figure;
histogramEq = imhist(J);%image histogram.
ch = cumsum(histogramEq);%cumulative histogram.
bar(ch,'BarWidth',1)%draw bar.
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.