Functions
core/vil/algo/vil_correlate_2d.h File Reference

2D Convolution More...

#include <vcl_compiler.h>
#include <vcl_cassert.h>
#include <vil/vil_image_view.h>

Go to the source code of this file.

Functions

template<class srcT , class kernelT , class accumT >
accumT vil_correlate_2d_at_pt (const srcT *src_im, vcl_ptrdiff_t s_istep, vcl_ptrdiff_t s_jstep, vcl_ptrdiff_t s_pstep, const vil_image_view< kernelT > &kernel, accumT)
 Evaluate dot product between kernel and src_im.
template<class srcT , class destT , class kernelT , class accumT >
void vil_correlate_2d (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, const vil_image_view< kernelT > &kernel, accumT ac)
 Correlate kernel with srcT.

Detailed Description

2D Convolution

Author:
Tim Cootes

Definition in file vil_correlate_2d.h.


Function Documentation

template<class srcT , class destT , class kernelT , class accumT >
void vil_correlate_2d ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
const vil_image_view< kernelT > &  kernel,
accumT  ac 
) [inline]

Correlate kernel with srcT.

dest is resized to (1+src_im.ni()-kernel.ni())x(1+src_im.nj()-kernel.nj()) (a one plane image). On exit dest(x,y) = sum_ij src_im(x+i,y+j)*kernel(i,j)

Definition at line 54 of file vil_correlate_2d.h.

template<class srcT , class kernelT , class accumT >
accumT vil_correlate_2d_at_pt ( const srcT *  src_im,
vcl_ptrdiff_t  s_istep,
vcl_ptrdiff_t  s_jstep,
vcl_ptrdiff_t  s_pstep,
const vil_image_view< kernelT > &  kernel,
accumT   
) [inline]

Evaluate dot product between kernel and src_im.

Returns sum_ijp src_im[i*istep+j*jstep+p*pstep]*kernel(i,j,p)

Definition at line 17 of file vil_correlate_2d.h.