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

Home » Public Forums » archive » Re: Problems with CONVOL and 3D data
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
Re: Problems with CONVOL and 3D data [message #29255] Fri, 08 February 2002 05:34
Jaco van Gorkom is currently offline  Jaco van Gorkom
Messages: 97
Registered: November 2000
Member
"Alberto Martinez" <juan_eof@hotmail.com> wrote in message
news:3c63c8de@news.upm.es...
...
> kernel_1 = REFORM(kernel_1,3,1,1) ; An array in X direction , 3D
> kernel_2 = REFORM(kernel_1,1,3,1) ; The same in Y
> kernel_3 = REFORM(kernel_1,1,1,3) ; In Z direction
...
> result = CONVOL(FLOAT(data), FLOAT(kernel_2)) ;
>> %CONVOL: Kernel's dimensions are incompatible with operand's
>
> It seems that the filtering with "kernel_2" only works with data and
kernel
> in integers!
> I can�t filter Other types others types of 3D data with simple vector in
the
> Y direction !
> The others kernels works perfectly.

IDL has the habit of dropping leading dimensions of one, and this happens to
the FLOAT() result:
IDL> help, kernel_1, float(kernel_1), kernel_2, float(kernel_2), kernel_3,
float(kernel_3)

KERNEL_1 INT = Array[3, 1, 1]

<Expression> FLOAT = Array[3]

KERNEL_2 INT = Array[1, 3, 1]

<Expression> FLOAT = Array[1, 3]

KERNEL_3 INT = Array[1, 1, 3]

<Expression> FLOAT = Array[1, 1, 3]



so FLOAT(kernel_2) has two dimensions, whereas FLOAT(data) has three.

Another REFORM is needed:

result = CONVOL(FLOAT(data), REFORM(FLOAT(kernel_2), 1, 3, 1) )



Cheers,

Jaco
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Division of two images
Next Topic: Re: log scale of data coloring of IDLgrVolume object, not the axes

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

Current Time: Wed Oct 08 15:52:10 PDT 2025

Total time taken to generate the page: 0.00953 seconds