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

Home » Public Forums » archive » Re: Histogram Hot-shots Required
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: Histogram Hot-shots Required [message #16291 is a reply to message #16289] Fri, 16 July 1999 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
David Fanning wrote:
> What I can't figure out tonight is how to find out
> what bin that pixel is in, given that I know the pixel
> value. (Even as I write this sentence I have the sense
> that this is a trivial exercise, but I'm afraid it is
> not yielding the shear number of hours I have spent
> on it. At least not for me.)

Assuming I know the minimum and maximum values (the range) used in
creating the histogram, the histogram binsize, and the number of bins,
the zero-based bin index is given by

bin_index = long(float(pixel_value - histogram_min_value) /
float(binsize))

and then to protect against pixel values LT histogram minimum value, or
GE histogram maximum value

bin_index = (bin_index > 0L) < (number_of_bins - 1L)

At least, that's how it looks to me on paper....

Cheers,
Liam.

--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: The position
Next Topic: Re: Q: about Richardson_Lucy Alg. (deconvolution)

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

Current Time: Sun Oct 12 00:55:50 PDT 2025

Total time taken to generate the page: 0.48334 seconds