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

Home » Public Forums » archive » speed up image processing
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
speed up image processing [message #67437] Thu, 23 July 2009 05:53
Klemen is currently offline  Klemen
Messages: 80
Registered: July 2009
Member
Hi, I quite new to IDL, I know its basics, and I have recently found
out that using the right approach can significant speed up the
processing. My problem is, I have a 2D array and I would like to
compute a minimum and some additional stuff for each input image pixel
from the predefined vector that stretches out of each pixel.
Currently, I use simply 2 for loops. Is there a way to do this faster
- removing for loops?

Thank you, Klemen

vector_indx = [ncols+1, 2*ncols+2, 3*ncols+3]

for j = 0,nrows do begin
for i = 0,ncols do begin
x = image(i,j) ;read the current pixel data
indx = j*ncols + i ;convert to 1D index
image_out(i,j) = min(image[vector_indx+indx])
...
endfor
endfor
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: problems with IDL-IDL bridge spawning
Next Topic: plot_map

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

Current Time: Wed Oct 08 15:26:38 PDT 2025

Total time taken to generate the page: 0.00508 seconds