comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: HIST_EQUAL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: HIST_EQUAL [message #23014 is a reply to message #23008] Fri, 15 December 2000 12:15 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
"Sergio Ahumada N." ("Sergio Ahumada N." <san[@]inf.utfsm.cl>) writes:

> I need to know what's the difference between HISTOGRAM and
> HIST_EQUAL functions, I don't find so much info about this.
>
> Is HIST_EQUAL a graphics of density distribution ?

HIST_EQUAL is a histogram equalization method, whereby
the pixel values in an image are changed and re-distributed
in such as way that if you took a histogram of a histogram-
equalized image, there would be approximately the same
number of pixels in each histogram bin.

HISTOGRAM is a function for performing black magic on
IDL arrays. (I would strongly advise you against reading
any article that has "histogram" in the Subject field.
Along that path lies destruction.)

In every day use, however, the HISTOGRAM function can
tell you how many pixels in an image have the same
value. In other words, the histogram gives you a sense
of how the pixel values are distributed in an image.

For example, try this:

************************************************************ *
filename = Filepath('ctscan.dat', Subdir=['examples','data'])
OpenR, lun, filename, /Get_Lun
image = BytArr(256, 256)
ReadU, lun, image
Free_Lun, lun

Window, 0, XSize=600, YSize=350
!P.Multi = [0, 2, 1]
TVImage, image
Plot, Histogram(image), XTitle='Pixel Value', XStyle=1, $
YTitle='Number of Pixels', Title='Normal Image'

Window, 1, XSize=600, YSize=350
histoimage = Hist_Equal(image)
TVImage, histoimage
Plot, Histogram(histoimage), XTitle='Pixel Value', XStyle=1, $
YTitle='Number of Pixels', Title='Histogram Equalized Image'

!P.Multi=0
************************************************************ *

You can find the TVImage program on my web page:

http://www.dfanning.com/programs/tvimage.pro

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: dumb surface plot question
Next Topic: Polygon hull

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Nov 28 13:11:32 PST 2025

Total time taken to generate the page: 0.14688 seconds