Total members 11890 |It is currently Thu Apr 25, 2024 6:26 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Following code does equalization on input image and draw the cumulative histogram before and after .
Code:

   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.
 





Attachments:
File comment: Before equalization
1.GIF
1.GIF [ 18.73 KiB | Viewed 11605 times ]
File comment: After equalization
2.GIF
2.GIF [ 21.7 KiB | Viewed 11605 times ]

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada
Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : image equalization and cumulative histogram
 drawing the histogram of image     -  
 Image Colors Frequencies Histogram in Java     -  
 Histogram Generator     -  
 Image-Viewer-Image Processing-Filters-Noise-enhancements     -  
 Move image in front of a background image     -  
 different between cfa image and gray level image     -  
 PNG image to the image you generated     -  
 put image in asp.net     -  
 php Random image     -  
 put image on button in C#     -  



Topic Tags

Matlab Image






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
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