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

Home » Public Forums » archive » Re: Maximum value array resampling
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: Maximum value array resampling [message #45010 is a reply to message #45009] Mon, 08 August 2005 11:20 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
By the way, since for processing many images of the same size you can
pre-compute the indices, you might consider a small change to the
modified loop method:


;; Pre-compute the indices:
d=size(x,/DIMENSIONS) & nx=d[0] & ny=d[1]
nx2=nx/2 & ny2=ny/2

inds1=rebin(lindgen(nx2)*2L,nx2,ny2,/SAMPLE)+ $
rebin(transpose(lindgen(ny2)*2L*nx),nx2,ny2,/SAMPLE)
inds2=inds1+1L
inds3=inds1+nx
inds4=inds1+nx+1L

;; Form the sub-sampled image (for each image)
xmax=x[inds1]>x[inds2]>x[inds3]>x[inds4]


This brings the total processing time per 5000x4000 image to under
0.5s on my not-so-fast Linux box (and doesn't have any loops ;).

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Dynamic array of an Object as class member variable.
Next Topic: New Tabbing Functionality in IDL 6.2

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

Current Time: Fri Oct 10 15:03:40 PDT 2025

Total time taken to generate the page: 1.04102 seconds