% MORPHOLOGY
% histogram equalisation
filename= 'far.jpg'; % the filename to be read
im=imread(filename);
im=imresize(im,[256,256]);
im=rgb2gray(im);
figure(1);
subplot(1,2,1);
imshow(im);
subplot(1,2,2);
Imagesc(im); % display
axis('square');
colormap('gray');
imhist(im);
im_histeq=histeq(im);
figure(2);
subplot(1,2,1);
imshow(im_histeq); % display
%axis('square');
colormap('gray');
subplot(1,2,2);
imhist(im_histeq);
Original Image and Histogram :
Equalized Image and Equalized Histogram :
Thank you. It is wonderful working code. I leaned lot form it.
ReplyDeleteIt would be better if you can demonstrate other image processing techniques.
your welcome. I have more posts on Image Processing. Join Code 2 Learn on facebook and explore more.
ReplyDeletehttp://www.code2learn.com/search/label/image%20processing
sir . . Good evening sir :) i am from india in tamilnadu :) now i am studying BE /ECE final year. If i am gonna do main project sir:) if am selected digital image processing domain .but i don't having sufficient knowledge regarding it .then recently seen your post sir it wap really impressed sir. Shall you please help for me sir. Shall you suggest any one good DIP regarding project with matlab coding sir. -My email id is skysathiya@gmail.com. . Pls sir don't ignore my request . .
ReplyDeletecan u pls mail me that code to me also
Deleteplease sir enhancement ka pura code post kar dijiye mai bahut pareshaan hu
ReplyDeletehiiiiiii sir i m from bhu
ReplyDeletemaine aapka purana histogram equalization ka code download karke kaam kiya tha but abhi code nahi hai mere pas ..............please kindly do the needful
ReplyDeleteSir, what I am trying to do is to use Histogram based segmentation to detect boundaries from a cartosat DEM.I am having an image in .tif format.I am trying to find matlab code for this purpose.Looking for help.
ReplyDeleteThank you
Sir, what I am trying to do is to use Histogram based segmentation to detect boundaries from a cartosat DEM.I am having an image in .tif format.I am trying to find matlab code for this purpose.Kindly help.
ReplyDeleteThank you