Implementation of Histogram Processing in MATLAB

clc
f= imread('C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\torres-kb3.jpg');
f= rgb2gray(f);
f= imresize(f,[256,256]);
f= 0.5*f;
figure(1), imshow(f);
b= histeq(f,256);
figure(2), imshow(b);
figure(3), imhist(f);
figure(4), imhist(b);
subplot(2,2,1);
imshow(f);
title('original image');
subplot(2,2,2);
imshow(b);
title('equalizd image');
subplot(2,2,3);
imhist(f);
title('original histogram');
subplot(2,2,4);
imhist(b);
title('equalized histogram');

Output

Output

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.