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 #66175 is a reply to message #66174] Thu, 23 April 2009 10:00 Go to previous messageGo to previous message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
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
[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 08:56:59 PDT 2025

Total time taken to generate the page: 0.00178 seconds