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

Home » Public Forums » archive » Re: adjustimg brightness of an image
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: adjustimg brightness of an image [message #13141 is a reply to message #13134] Mon, 19 October 1998 00:00 Go to previous messageGo to previous message
fireman is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Printing color line-plots on non-PS printers...
Next Topic: Re: dongle licence problems

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

Current Time: Fri Oct 10 17:55:34 PDT 2025

Total time taken to generate the page: 1.35930 seconds