[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function BYTSCL



Steffen Kernchen wrote:
> what function(s) can I use instead of BYTSCL?
> I have an array and I want to transform it to get a better contrast.
> But I should NOT use BYTSCL....  :(

It sounds like you want to do something other than selecting the minimum
and maximum array values for the scaling range used in BYTSCL. How about
trying histogram clipping?

(1) Compute a histogram for the image at N (say N=100) intervals between
the minimum and maximum array values.

(2) From the low end of the histogram, find the histogram bin where X
percent (say X=2) of the total number of array elements (pixels) lie to
the *left* of the current bin. The data value for this bin becomes the
minimum of the scaling range. Perform a similar search from the high end
of the histogram to obtain the maximum of the scaling range.

(3) Now use BYTSCL with the derived scaling range to create a contrast
enhanced image.

Other functions that will be useful in this exercise are HISTOGRAM and
TOTAL.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley