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

Home » Public Forums » archive » Does IDL has histogram matching function?
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: Does IDL has histogram matching function? [message #32955 is a reply to message #32803] Mon, 18 November 2002 15:49 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul Sorenson (aardvark62@msn.com) writes:

> There is an undocumented keyword to HIST_EQUAL that looks like it
> might do the same thing as Davids HistoMatch. Here is an example:
>
> filename = filepath('ctscan.dat', subdir=['examples', 'data'])
> image = read_binary(filename, data_dims=[256, 256])
>
> desired_hist = histogram(hist_equal(image), min=0, max=255)
>
> window, xsize=3*256, ysize=256
> tv, image, 0
> tv, hist_equal(image), 1
> tv, hist_equal(image, fcn=total(desired_hist, /cumulative)), 2
> end

I think this is probably right, but I think
both this function and the code that I threw off
in a couple of minutes earlier in the week suffers
from a deficiency.

As it happens, I need a histogram-match-by-region
capability. In other words, the user wants to select
a region in an image, and use the histogram of that
region to adjust the histogram of the entire image.

This example and my previous code work if the histograms
are taken from images of the same size. They do not work
correctly (I think) if the histograms use images of different
sizes. In that case, you must normalize the histograms to the
same "total number" of pixels. I'll probably have this on
my web page soon, with the corrections in it. I just didn't
want anyone getting too far down the wrong road here. :-)

Cheers,

David


--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@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
Read Message
Read Message
Read Message
Previous Topic: Re: Does IDL has histogram matching function?
Next Topic: Re: POLYSHADE-like object graphics?

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

Current Time: Wed Oct 08 20:13:38 PDT 2025

Total time taken to generate the page: 0.02736 seconds