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

Home » Public Forums » archive » Re: Moving Average on Hyperspectral dataset
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: Moving Average on Hyperspectral dataset [message #53152 is a reply to message #53142] Mon, 26 March 2007 19:14 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JD Smith writes:

>
> image=smooth(image,[1,1,width])
>
>> With the loops the code takes about 3 hours ... Is there a way to speed it
>> up ?
>
> If that 1.2GB (*2) array is pushing your memory limits, consider doing
> it in "chunks", e.g. 50 samples at a time.

I thought it might go faster if you moved the dimension
you are smoothing into contiguous memory first:

image = Transpose(image, [2,0,1])
image = Smooth(image, [width, 1, 1])

But with an image(100,200,300), it took 0.281 seconds
with and without the TRANSPOSE. Is the transposition
really negligibly fast?

I note that the LOOP method took nearly 76 seconds!! :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: strange behaviour of bar_plot
Next Topic: Problems with converting map projection in ENVI

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

Current Time: Fri Oct 10 17:41:09 PDT 2025

Total time taken to generate the page: 0.48270 seconds