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

Home » Public Forums » archive » Image subtraction
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: image subtraction [message #29775 is a reply to message #11675] Thu, 14 March 2002 08:00 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
"Kenneth P. Bowman" <kpb@null.com> :
>
>>>> imgArr = lonarr(12,512,512)
>
> Using the methods suggested previously, this is likely to be faster (due
> to better cache use) if you can dimension this array as
>
> imgArr = LONARR(512,512,12)

Good thinking, Ken, if this is an option for Art.
To round out the timings (YMMV):

FOR ii=0,11 DO imgArr[ii,*,*] = imgArr[ii,*,*] - img1 : 1.402 s

FOR ii=0,11 DO imgArr[ii,0,0] = imgArr[ii,*,*] - img1 : 1.232 s

FOR ii=0,11 DO imgArr[*,*,ii] = imgArr[*,*,ii] - img1 : 0.741 s

FOR ii=0,11 DO imgArr[0,0,ii] = imgArr[0,0,ii] - img1 : 0.301 s

A big win there!

For completeness:
imgarr = imgarr - rebin(reform(img1,1,512,512),12,512,512) : 0.210 s

Cheers,
--
-Dick

Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to retrieve the event structure returned to event function of widget ?
Next Topic: IDL 4.0.1: How to "fill" volume inside isosurface?

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

Current Time: Fri Oct 10 23:06:00 PDT 2025

Total time taken to generate the page: 3.27875 seconds