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

Home » Public Forums » archive » faster convol on local subsets?
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
faster convol on local subsets? [message #78633] Sun, 04 December 2011 16:37
Andre is currently offline  Andre
Messages: 4
Registered: June 2011
Junior Member
Hello experts,

Maybe somebody has an easy solution for this?
I have a 2D array (img) and want the filter response from kernels that vary according to the image position. In a second array (loc, same dimensions as img) I have the information which kernel should be used at each pixel. My current approach is to first convolve the full image with the j-th kernel and take the response only at the positions with the current j indexed in the loc array:

for j=0, n do begin
kernel=kernel_store[*,*,j]
response_temp = convol(img, kernel, /edge_zero, /NAN)
index=where(loc eq j)
if (index[0] gt -1)then response[index]=response_temp[index]
endfor

I works fine, but it is relatively slow and I wonder if there is a smarter (faster) to apply only the convolutions that are really needed?

Thanks in advance for any help!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Fast computation of pairwise array element differences
Next Topic: Re: Significant Update of cgImage

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

Current Time: Wed Oct 08 15:34:54 PDT 2025

Total time taken to generate the page: 0.00537 seconds