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

Home » Public Forums » archive » Re: Stretching 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: Stretching an image [message #41973 is a reply to message #41972] Thu, 09 December 2004 11:01 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> I'd like to know how to apply a stretch in an image using 2% of
> saturation. That's what ENVI does when I open any image.
>
> How can I do that using an IDL code?

I have no idea how ENVI does this, or even what
"2% of saturation" means, but I'm feeling reckless.
Here is how I would do it:

minImage = Min(image, Max=maxImage)
range = Float(maxImage) - Min(image)
onePercent = range * 0.01
low = minImage + onePercent
high = maxImage - onePercent
stretchedImage = BytScl(image, Min=low, Max=high)
TV, stretchedImage

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help with Nested FOR Loop
Next Topic: Re: Help with Nested FOR Loop

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

Current Time: Sat Oct 11 15:00:42 PDT 2025

Total time taken to generate the page: 2.40042 seconds