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

Home » Public Forums » archive » Re: 2-D Convolutions in IDL w/o zero-padded edges
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: 2-D Convolutions in IDL w/o zero-padded edges [message #56396 is a reply to message #56391] Tue, 23 October 2007 14:50 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Matt Harner wrote:
> Hello.
>
> I am familiar with IDL and convolutions independently but not
> together. Is there a way in IDL to convolve an image with a kernal
> and return only those parts of the convolution that are computed
> without zero-padded edges? This would be equivalent to the MATLAB
> procedure conv2(image,kernel, 'valid').
>
> Thanks in advance for any help.
> Matt

Maybe you could compute the convolution over the whole area, then keep
only the valid entries... so if your kernel is a 3*3 one, you would do

GoodResults = AllResult[1:Xsize-2; 1:Ysize-2]

If you are using a kernel that is not a square, I have a function to
reduce your study area so that every pixel has a complete neighborhood
(you define the neighborhood by its coordinates as if it was centered on
cell 0;0)

Jean
[Message index]
 
Read Message
Read Message
Previous Topic: Need help reconstructing flat-field. Minimization problem.
Next Topic: Re: transform a floating point into byte or integer in envi

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

Current Time: Wed Oct 22 13:42:40 PDT 2025

Total time taken to generate the page: 1.92072 seconds