SMIL  0.8
 All Classes Functions Variables Groups Pages
Convolution
+ Collaboration diagram for Convolution:

Functions

template<class T >
RES_T convolve (const Image< T > &imIn, const vector< double > &kernel, Image< T > &imOut)
 Convolution in both x and y directions using the same 1D kernel. More...
 
template<class T >
RES_T gaussianFilter (const Image< T > &imIn, size_t radius, Image< T > &imOut)
 2D Gaussian filter More...
 
template<class T >
RES_T horizConvolve (const Image< T > &imIn, const vector< double > &kernel, Image< T > &imOut)
 Horizontal convolution. More...
 
template<class T >
RES_T vertConvolve (const Image< T > &imIn, const vector< double > &kernel, Image< T > &imOut)
 Vertical convolution. More...
 

Detailed Description

Function Documentation

RES_T smil::convolve ( const Image< T > &  imIn,
const vector< double > &  kernel,
Image< T > &  imOut 
)

Convolution in both x and y directions using the same 1D kernel.

See Also
horizConvolve
RES_T smil::gaussianFilter ( const Image< T > &  imIn,
size_t  radius,
Image< T > &  imOut 
)

2D Gaussian filter

The size of the filter is 2*radius+1

RES_T smil::horizConvolve ( const Image< T > &  imIn,
const vector< double > &  kernel,
Image< T > &  imOut 
)

Horizontal convolution.

Example:

1 im1 = Image("http://cmm.ensmp.fr/~faessel/smil/images/lena.png")
2 im2 = Image(im1)
3 kern = [ 0.0545, 0.2442, 0.4026, 0.2442, 0.0545 ]
4 horizConvolve(im1, kern, im2)
5 showAll()
RES_T smil::vertConvolve ( const Image< T > &  imIn,
const vector< double > &  kernel,
Image< T > &  imOut 
)

Vertical convolution.

See Also
horizConvolve