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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: HIST_EQUAL [message #23007] Sun, 17 December 2000 05:49
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Karl Young (kyoung@itsa.ucsf.edu) writes:

> Every once in a while some of us use histograms for something other
> than image intensity analysis; i.e. I just wanted to try and restore the
> good name of histograms re. not only being used to generate misleading
> information ! ;-) And also histogram equalization is pretty useful in
> isolating dynamic range problems (i.e. problems for which most of your
> data is in a very small part of the entire range of possible values)

Goodness knows it wasn't my intention to disparage
the use of histograms. And you are absolutely right.
In the hands of the Wizards, HISTOGRAM can be used
for just about all manner of useful solutions to
thorny problems.

I was just pointing out that for the mathematically
challenged (e.g., those of my ilk) that the solutions,
written up in articles in this newsgroup by the
practitioners of this magic art, more often than not
elicit a big Huh!? on first reading.

That is a far cry from saying they are not useful. :-)

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
Re: HIST_EQUAL [message #23008 is a reply to message #23007] Sat, 16 December 2000 12:24 Go to previous message
Karl Young is currently offline  Karl Young
Messages: 31
Registered: April 1996
Member
Hey David,

Every once in a while some of us use histograms for something other
than image intensity analysis; i.e. I just wanted to try and restore the
good name of histograms re. not only being used to generate misleading
information ! ;-) And also histogram equalization is pretty useful in
isolating dynamic range problems (i.e. problems for which most of your
data is in a very small part of the entire range of possible values)

David Fanning wrote:

> "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...
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: dumb surface plot question
Next Topic: Polygon hull

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

Current Time: Sat Oct 11 04:00:46 PDT 2025

Total time taken to generate the page: 1.19947 seconds