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

Home » Public Forums » archive » question: IDL for incorporating text files in hyperspectral band math
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
question: IDL for incorporating text files in hyperspectral band math [message #58790] Tue, 19 February 2008 15:03 Go to next message
jo is currently offline  jo
Messages: 1
Registered: February 2008
Junior Member
Hello all,
I am a masters student working with hyperspectral imagery for benthic
mapping. I am also a fresh beginner at IDL and have found myself at a
wall for hyperspectral image processing in ENVI.

I am trying to perform a sun glint correction of a water surface in a
hyperspectral (AISA) image. From the DN value of each visible band in
each pixel, I must subtract the product of a coefficient (which is
already calculated), and the DN of a single NIR band.

So again, in a single pixel: DNvis - (coefficient x DNnir) for all vis
bands. Calculate for all pixels.

Obviously the vis and NIR DN values are contained within the
hyperspectral image, but the coefficients are stored in a text file as
a single column containing one coefficient for each of approx 400
bands. I know that the ENVI band math can be used for mathematics
between 2 images of the same spatial and spectral dimension, but the
issue is the intermediate step: getting ENVI to read the text file and
apply one coefficient at a time to the NIR image. I need to use IDL
for this, but have little experience with the script.

Could anybody offer some direction on this issue, or maybe somebody
has already written a simple script that they wouldn't mind sharing
for applying a text file to an image?

Thank-you in advance for your time!
Jenn
Re: question: IDL for incorporating text files in hyperspectral band math [message #58867 is a reply to message #58790] Thu, 21 February 2008 12:48 Go to previous message
wita is currently offline  wita
Messages: 43
Registered: January 2005
Member
Hi Jenn,

What you want to do seems a bit too complicated to perform in ENVI
bandmath which was designed for relatively simple band operations. I
would suggest to use ENVI's routines (ENVI_OPEN_FILE, ENVI_GET_SLICE,
etc) to do the operations you want to do. This is a bit more work, but
gives you much more flexibility in return. I can send you an example
of how to do this later on; can't get to my IDL library from home
right now.

Allard
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: passing values to cw_fslider
Next Topic: Re: passing values to cw_fslider

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

Current Time: Wed Oct 08 14:00:36 PDT 2025

Total time taken to generate the page: 0.00576 seconds