Professional Documents
Culture Documents
Matlab code: Histogram equalization without using histeq function | IMAGE PROCESSING
IMAGE PROCESSING
Follow
+ 176
Image Processing
Like
MATLAB CODE:
GIm=imread('tire.tif');
numofpixels=size(GIm,1)*size(GIm,2);
figure,imshow(GIm);
Subscribe Now:
Subscribe in a reader
title('Original Image');
HIm=uint8(zeros(size(GIm,1),size(GIm,2)));
freq=zeros(256,1);
probf=zeros(256,1);
probc=zeros(256,1);
cum=zeros(256,1);
output=zeros(256,1);
http://angeljohnsy.blogspot.com/2011/04/matlab-code-histogram-equalization.html
2/8
8/26/2014
Matlab code: Histogram equalization without using histeq function | IMAGE PROCESSING
for i=1:size(GIm,1)
for j=1:size(GIm,2)
value=GIm(i,j);
freq(value+1)=freq(value+1)+1;
probf(value+1)=freq(value+1)/numofpixels;
end
end
sum=0;
no_bins=255;
HIm(i,j)=output(GIm(i,j)+1);
end
end
figure,imshow(HIm);
TAGS
title('Histogram equalization');
GUI Components in
MATLAB Removing
Image noise Image
Conversion
Photoshop
effects in MATLAB Edge
detection
MATLAB
BUILT_IN
FUNCTIONS
Morphological
Image
Processing Array functions in
MATLAB Video Processing Object
Identification
Optical
illusion
Shapes Templates Files Histogram
equalization
Image
Compression
Followers
http://angeljohnsy.blogspot.com/2011/04/matlab-code-histogram-equalization.html
3/8
8/26/2014
Matlab code: Histogram equalization without using histeq function | IMAGE PROCESSING
figure('Position',get(0,'screensize'));
dat=cell(256,6);
columnname =
http://angeljohnsy.blogspot.com/2011/04/matlab-code-histogram-equalization.html
4/8
8/26/2014
Matlab code: Histogram equalization without using histeq function | IMAGE PROCESSING
Useful (5)
Interesting (0)
:-( (0)
21 comments:
Anonymous said...
its nice that this space provides output too..and most importantly..the code
works!!unlike most of the other sites!
-thank u soo much for this code.
September 26, 2011 at 7:53 PM
su_ng said...
good, very good
December 12, 2011 at 9:10 PM
cool_images said...
its last part is not working 3rd fig does not plot.ERROR::::bar must be 2 -D;
help me out
Thanx in advance...
December 14, 2011 at 11:50 PM
raj kumar said...
http://angeljohnsy.blogspot.com/2011/04/matlab-code-histogram-equalization.html
5/8