1D Convolution with cunning boundary options More...
Go to the source code of this file.
Functions | |
template<class srcT , class destT , class kernelT , class accumT > | |
void | vil3d_convolve_1d (const vil3d_image_view< srcT > &src_im, vil3d_image_view< destT > &dest_im, const kernelT *kernel, vcl_ptrdiff_t k_lo, vcl_ptrdiff_t k_hi, accumT ac, enum vil_convolve_boundary_option start_option, enum vil_convolve_boundary_option end_option) |
Convolve kernel[i] (i in [k_lo,k_hi]) with srcT in i-direction. |
1D Convolution with cunning boundary options
Note. The convolution operation is defined by i.e. the kernel g is reflected before the integration is performed. If you don't want this to happen, the behaviour you want is not called "convolution".
Definition in file vil3d_convolve_1d.h.
void vil3d_convolve_1d | ( | const vil3d_image_view< srcT > & | src_im, |
vil3d_image_view< destT > & | dest_im, | ||
const kernelT * | kernel, | ||
vcl_ptrdiff_t | k_lo, | ||
vcl_ptrdiff_t | k_hi, | ||
accumT | ac, | ||
enum vil_convolve_boundary_option | start_option, | ||
enum vil_convolve_boundary_option | end_option | ||
) | [inline] |
Convolve kernel[i] (i in [k_lo,k_hi]) with srcT in i-direction.
On exit dest_im(i,j) = sum src_m(i-x,j)*kernel(x) (x=k_lo..k_hi)
kernel | should point to tap 0. |
dest_im | will be resized to size of src_im. |
If you want to convolve in all three directions, use the following approach: verbatim vil3d_convolve_1d( src, smoothed1, ... );
vil3d_convolve_1d(vil3d_switch_axes_jki(smoothed1), smoothed2, ... ); smoothed2_im = vil3d_switch_axes_kij(smoothed2);
vil3d_convolve_1d(vil3d_switch_axes_kij(smoothed2), smoothed3, ... ); smoothed3_im = vil3d_switch_axes_jki(smoothed3);
Definition at line 41 of file vil3d_convolve_1d.h.