[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
One-dimensional and separable convolution functions |
Functions | |
template<... > | |
void | convolveLine (...) |
Performs a 1-dimensional convolution of the source signal using the given kernel. More... | |
template<... > | |
void | separableConvolveX (...) |
Performs a 1 dimensional convolution in x direction. More... | |
template<... > | |
void | separableConvolveY (...) |
Performs a 1 dimensional convolution in y direction. More... | |
Perform 1D convolution and separable filtering in 2 dimensions.
These generic convolution functions implement the standard convolution operation for a wide range of images and signals that fit into the required interface. They need a suitable kernel to operate.
void vigra::convolveLine | ( | ... | ) |
Performs a 1-dimensional convolution of the source signal using the given kernel.
The KernelIterator must point to the center iterator, and the kernel's size is given by its left (kleft <= 0) and right (kright >= 0) borders. The signal must always be larger than the kernel. At those positions where the kernel does not completely fit into the signal's range, the specified BorderTreatmentMode is applied.
The signal's value_type (SrcAccessor::value_type) must be a linear space over the kernel's value_type (KernelAccessor::value_type), i.e. addition of source values, multiplication with kernel values, and NumericTraits must be defined. The kernel's value_type must be an algebraic field, i.e. the arithmetic operations (+, -, *, /) and NumericTraits must be defined.
If start
and stop
are non-zero, the relation 0 <= start < stop <= width
must hold (where width
is the length of the input array). The convolution is then restricted to that subrange, and it is assumed that the output array only refers to that subrange (i.e. id
points to the element corresponding to start
). If start
and stop
are both zero (the default), the entire array is convolved.
Declarations:
pass Image Iterators and Data Accessors :
use argument objects in conjunction with Argument Object Factories :
Usage:
#include <vigra/separableconvolution.hxx>
Namespace: vigra
Required Interface:
If border == BORDER_TREATMENT_CLIP:
Preconditions:
If border == BORDER_TREATMENT_CLIP: Sum of kernel elements must be != 0.
void vigra::separableConvolveX | ( | ... | ) |
Performs a 1 dimensional convolution in x direction.
It calls convolveLine() for every row of the image. See convolveLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/separableconvolution.hxx>
Namespace: vigra
Preconditions:
w > std::max(kernel.right(), -kernel.left())
. border == BORDER_TREATMENT_CLIP
: The sum of kernel elements must be != 0. void vigra::separableConvolveY | ( | ... | ) |
Performs a 1 dimensional convolution in y direction.
It calls convolveLine() for every column of the image. See convolveLine() for more information about required interfaces and vigra_preconditions.
Declarations:
pass 2D array views:
Usage:
#include <vigra/separableconvolution.hxx>
Namespace: vigra
Preconditions:
h > std::max(kernel.right(), -kernel.left())
. border == BORDER_TREATMENT_CLIP
: The sum of kernel elements must be != 0.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|