|
SMIL 1.1.2
|
2D and 3D Convolution with linear kernels More...
2D and 3D Convolution with linear kernels
Collaboration diagram for Convolution:Functions | |
| template<class T > | |
| RES_T | gaussianFilter (Image< T > &imIn, int radius, Image< T > &imOut) |
| gaussianFilter() - 3D Gaussian filter | |
| template<class T > | |
| RES_T | horizConvolve (const Image< T > &imIn, const vector< double > &kernel, Image< T > &imOut) |
| horizConvolve() - 2D Horizontal convolution | |
| template<class T > | |
| RES_T | vertConvolve (const Image< T > &imIn, const vector< double > &kernel, Image< T > &imOut) |
| vertConvolve() - 2D Vertical convolution | |
| template<class T > | |
| RES_T | convolve (const Image< T > &imIn, const vector< double > &kernel, Image< T > &imOut) |
| convolve() - 2D Convolution | |
gaussianFilter() - 3D Gaussian filter
Gaussian Filter : convolution de l'input image against a Gaussian Kernel of size 2 * radius + 1
The kernel is defined, in each direction, by :
![\[
kernel[i] = exp(- \frac{i^2}{2 . \sigma^2}),
\; i \in [-radius, +radius],
\;\sigma = radius / 2
\]](form_26.png)
| [in] | imIn | : input image |
| [in] | radius | : radius of the gaussian kernel |
| [out] | imOut | : output image |
Example
| RES_T horizConvolve | ( | const Image< T > & | imIn, |
| const vector< double > & | kernel, | ||
| Image< T > & | imOut | ||
| ) |
horizConvolve() - 2D Horizontal convolution
2D horizontal convolution using a 1D kernel
| [in] | imIn | : input image |
| [in] | kernel | : an 1D kernel (as a vector) |
| [out] | imOut | : output image |
Example:
| RES_T vertConvolve | ( | const Image< T > & | imIn, |
| const vector< double > & | kernel, | ||
| Image< T > & | imOut | ||
| ) |
vertConvolve() - 2D Vertical convolution
2D vertical convolution using a 1D kernel
| [in] | imIn | : input image |
| [in] | kernel | : an 1D kernel (vector) |
| [out] | imOut | : output image |
| RES_T convolve | ( | const Image< T > & | imIn, |
| const vector< double > & | kernel, | ||
| Image< T > & | imOut | ||
| ) |
convolve() - 2D Convolution
2D convolution by & 1D kernel. Vertical convolution followed by an horizontal convolution using the same 1D kernel.
| [in] | imIn | : input image |
| [in] | kernel | : the 1D kernel (vector) |
| [out] | imOut | : output image |