Re: adjustimg brightness of an image [message #13141 is a reply to message #13134] |
Mon, 19 October 1998 00:00   |
fireman
Messages: 49 Registered: August 1991
|
Member |
|
|
Anil Kochhar (anilk@mtolympus.ari.net) wrote:
: tvscl<Number1>Number2
: To my understanding this will make all pixels with values LESS
: than Number1, equal to Number1 and make all pixels w/ values GREATER than
: Number2
: equal to Number2, while adjusting all other pixels with values in between
: Number1 and Number 2 accordingly.
Almost. You are performing three operations: limiting the array,
scaling the array and displaying it. Let's look at limiting the array
by itself.
First, define an array:
IDL> a=lindgen(500,500) & print,min(a),max(a)
0 249999
Now try to limit the arrays with the < and > operators.
IDL> b=10000L<a>200000L & print,min(b),max(b)
200000 200000
Oops! Not what you were expecting. Try it the other way:
IDL> b=10000L>a<200000L & print,min(b),max(b)
10000 200000
Ahh, that's better.
The ">" operator always takes the greater of two values - order is
unimportant. But statements of equal precedence are parsed left to
right.
The first statement should be viewed at (10000L < A) > 200000L. It is
first evaluated as 10000L < A giving you values of A of 10000
_or_less_. The result is compared with 200000, which was greater than
every value of the new A.
The TVSCL should work right when called as:
tvscl, Number1 > image < Number2
--
---- Gwyn F. Fireman
---- General Sciences Corporation
---- MODIS Characterization Support Team
---- Gwyn.Fireman@gsfc.nasa.gov 301-352-2118
|
|
|