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

Home » Public Forums » archive » Re: Extracting average pixel value
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: Extracting average pixel value [message #66174 is a reply to message #66171] Thu, 23 April 2009 10:11 Go to previous messageGo to previous message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
On Apr 23, 1:00 pm, Bennett <juggernau...@gmail.com> wrote:
> On Apr 22, 3:48 am, GP <gepo...@gmail.com> wrote:
>
>> Hello...
>
>> I have an .img file composed of 24 images  (one every two weeks) and I
>> want to extract an  spectral average pixel value for a 3x3 window with
>> the center pixel in sample=4567 and line 643.
>> Anyone know what would be the best approach to do this with IDL or
>> ENVI?
>
>> The .img file is a  layer stacking... So the 24 images are represented
>> as "bands" if I open it with ENVI
>
>> Thanks in advance...
>> Geo
>
> In IDL you can do a
> newArray = CONVOL(imageArray, [[1,1,1],[1,0,1],[1,1,1]], /CENTER)
> This will compute the average value in a 3x3 box around each pixel
> (except
> the edge pixels which you can set to zero or truncate or handle
> separately...
> whatever you please really.  Who needs edges anyway, right?)
>
> Bennett

I forgot to say also divide your resulting newArray by 8.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Spherical Surface Plot w/ fsc_surface from David Fanning (:
Next Topic: Re: An Callable IDL Question

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

Current Time: Fri Oct 10 02:45:00 PDT 2025

Total time taken to generate the page: 0.00233 seconds