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 #29746 is a reply to message #11675] Mon, 18 March 2002 21:45 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
"Kenneth Bowman" <k-bowman@null.tamu.edu> wrote in message
news:k-bowman-F0D133.10113317032002@news.tamu.edu...
> In article <MO3k8.1762$HJ.1430@shaw-ty1>,
> "Dick Jackson" <dick@d-jackson.com> wrote:
>
> What's the timing for
>
> imgarr = imgarr - rebin(reform(img1,512,512,1),512,512,12) ?

Good question. I don't know why it would be so, but it's longer:

>>>> > img1 = lonarr(512,512)
>>
>>>> > 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

For even more completeness:

imgarr = imgarr - rebin(reform(img1,512,512,1),512,512,12) : 0.260 s


Again, this is on IDL 5.5, Win2000.

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: Sat Oct 11 09:13:17 PDT 2025

Total time taken to generate the page: 0.08159 seconds