[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
Convolution filters for multi-dimensional arrays. | ![]() |
---|
Functions | |
template<...> void | separableConvolveMultiArray (SrcIterator s, SrcShape const &shape, SrcAccessor src, DestIterator d, DestAccessor dest, KernelIterator kernels) |
Separated convolution on multi-dimensional arrays. | |
template<...> void | convolveMultiArrayOneDimension (SrcIterator s, SrcShape const &shape, SrcAccessor src, DestIterator d, DestAccessor dest, unsigned int dim, vigra::Kernel1D< T > const &kernel) |
Convolution along a single dimension of a multi-dimensional arrays. | |
template<...> void | gaussianSmoothMultiArray (SrcIterator s, SrcShape const &shape, SrcAccessor src, DestIterator d, DestAccessor dest, double sigma) |
Isotropic Gaussian smoothing of a multi-dimensional arrays. | |
template<...> void | gaussianGradientMultiArray (SrcIterator si, SrcShape const &shape, SrcAccessor src, DestIterator di, DestAccessor dest, double sigma) |
Calculate Gaussian gradient of a multi-dimensional arrays. | |
template<...> void | symmetricGradientMultiArray (SrcIterator si, SrcShape const &shape, SrcAccessor src, DestIterator di, DestAccessor dest) |
Calculate gradient of a multi-dimensional arrays using symmetric difference filters. |
Detailed Description |
void convolveMultiArrayOneDimension (...) |
Convolution along a single dimension of a multi-dimensional arrays.
This function computes a convolution along one dimension (specified by the parameter
This function may work in-place, which means that Declarations: pass arguments explicitly: namespace vigra { template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor, class T> void convolveMultiArrayOneDimension(SrcIterator siter, SrcShape const & shape, SrcAccessor src, DestIterator diter, DestAccessor dest, unsigned int dim, vigra::Kernel1D<T> const & kernel); } use argument objects in conjunction with Argument Object Factories: namespace vigra { template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor, class T> void convolveMultiArrayOneDimension(triple<SrcIterator, SrcShape, SrcAccessor> const & source, pair<DestIterator, DestAccessor> const & dest, unsigned int dim, vigra::Kernel1D<T> const & kernel); } Usage: #include "vigra/multi_convolution.hxx"
MultiArray<3, unsigned char>::size_type shape(width, height, depth); MultiArray<3, unsigned char> source(shape); MultiArray<3, float> dest(shape); ... Kernel1D<float> gauss; gauss.initGaussian(sigma); // perform Gaussian smoothing along dimensions 1 (height) convolveMultiArrayOneDimension(srcMultiArrayRange(source), destMultiArray(dest), 1, gauss);
|
void gaussianGradientMultiArray (...) |
Calculate Gaussian gradient of a multi-dimensional arrays.
This function computes the Gaussian gradient of the given multi-dimensional array with a sequence of first-derivative-of-Gaussian filters at the given standard deviation Declarations: pass arguments explicitly: namespace vigra { template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor> void gaussianGradientMultiArray(SrcIterator siter, SrcShape const & shape, SrcAccessor src, DestIterator diter, DestAccessor dest, double sigma); } use argument objects in conjunction with Argument Object Factories: namespace vigra { template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor> void gaussianGradientMultiArray(triple<SrcIterator, SrcShape, SrcAccessor> const & source, pair<DestIterator, DestAccessor> const & dest, double sigma); } Usage: #include "vigra/multi_convolution.hxx"
MultiArray<3, unsigned char>::size_type shape(width, height, depth); MultiArray<3, unsigned char> source(shape); MultiArray<3, TinyVector<float, 3> > dest(shape); ... // compute Gaussian gradient at scale sigma gaussianGradientMultiArray(srcMultiArrayRange(source), destMultiArray(dest), sigma); Required Interface: see convolveImage(), in addition:
int dimension = 0;
VectorElementAccessor<DestAccessor> elementAccessor(0, dest);
|
void gaussianSmoothMultiArray (...) |
Isotropic Gaussian smoothing of a multi-dimensional arrays.
This function computes an isotropic convolution of the given multi-dimensional array with a Gaussian filter at the given standard deviation Declarations: pass arguments explicitly: namespace vigra { template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor> void gaussianSmoothMultiArray(SrcIterator siter, SrcShape const & shape, SrcAccessor src, DestIterator diter, DestAccessor dest, double sigma); } use argument objects in conjunction with Argument Object Factories: namespace vigra { template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor> void gaussianSmoothMultiArray(triple<SrcIterator, SrcShape, SrcAccessor> const & source, pair<DestIterator, DestAccessor> const & dest, double sigma); } Usage: #include "vigra/multi_convolution.hxx"
MultiArray<3, unsigned char>::size_type shape(width, height, depth); MultiArray<3, unsigned char> source(shape); MultiArray<3, float> dest(shape); ... // perform isotropic Gaussian smoothing at scale `sigma“ gaussianSmoothMultiArray(srcMultiArrayRange(source), destMultiArray(dest), sigma);
|
void separableConvolveMultiArray (...) |
Separated convolution on multi-dimensional arrays. This function computes a separated convolution on all dimensions of the given multi-dimensional array. Both source and destination arrays are represented by iterators, shape objects and accessors. The destination array is required to already have the correct size. There are two variants of this functions: one takes a single kernel of type vigra::Kernel1D which is then applied to all dimensions, whereas the other requires an iterator referencing a sequence of vigra::Kernel1D objects, one for every dimension of the data. Then the first kernel in this sequence is applied to the innermost dimension (e.g. the x-dimension of an image), while the last is applied to the outermost dimension (e.g. the z-dimension in a 3D image).
This function may work in-place, which means that Declarations: pass arguments explicitly: namespace vigra { // apply the same kernel to all dimensions template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor, class T> void separableConvolveMultiArray(SrcIterator siter, SrcShape const & shape, SrcAccessor src, DestIterator diter, DestAccessor dest, Kernel1D<T> const & kernel); // apply each kernel from the sequence `kernels“ in turn template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor, class KernelIterator> void separableConvolveMultiArray(SrcIterator siter, SrcShape const & shape, SrcAccessor src, DestIterator diter, DestAccessor dest, KernelIterator kernels); } use argument objects in conjunction with Argument Object Factories: namespace vigra { // apply the same kernel to all dimensions template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor, class T> void separableConvolveMultiArray(triple<SrcIterator, SrcShape, SrcAccessor> const & source, pair<DestIterator, DestAccessor> const & dest, Kernel1D<T> const & kernel); // apply each kernel from the sequence `kernels“ in turn template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor, class KernelIterator> void separableConvolveMultiArray(triple<SrcIterator, SrcShape, SrcAccessor> const & source, pair<DestIterator, DestAccessor> const & dest, KernelIterator kernels); } Usage: #include "vigra/multi_convolution.hxx"
MultiArray<3, unsigned char>::size_type shape(width, height, depth); MultiArray<3, unsigned char> source(shape); MultiArray<3, float> dest(shape); ... Kernel1D<float> gauss; gauss.initGaussian(sigma); // perform Gaussian smoothing on all dimensions separableConvolveMultiArray(srcMultiArrayRange(source), destMultiArray(dest), gauss);
|
void symmetricGradientMultiArray (...) |
Calculate gradient of a multi-dimensional arrays using symmetric difference filters. This function computes the gradient of the given multi-dimensional array with a sequence of symmetric difference filters a (differentiation is applied to each dimension in turn, starting with the innermost dimension). Both source and destination arrays are represented by iterators, shape objects and accessors. The destination array is required to have a vector valued pixel type with as many elements as the number of dimensions. This function is implemented by calls to convolveMultiArrayOneDimension() with the symmetric difference kernel. Declarations: pass arguments explicitly: namespace vigra { template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor> void symmetricGradientMultiArray(SrcIterator siter, SrcShape const & shape, SrcAccessor src, DestIterator diter, DestAccessor dest); } use argument objects in conjunction with Argument Object Factories: namespace vigra { template <class SrcIterator, class SrcShape, class SrcAccessor, class DestIterator, class DestAccessor> void symmetricGradientMultiArray(triple<SrcIterator, SrcShape, SrcAccessor> const & source, pair<DestIterator, DestAccessor> const & dest); } Usage: #include "vigra/multi_convolution.hxx"
MultiArray<3, unsigned char>::size_type shape(width, height, depth); MultiArray<3, unsigned char> source(shape); MultiArray<3, TinyVector<float, 3> > dest(shape); ... // compute gradient symmetricGradientMultiArray(srcMultiArrayRange(source), destMultiArray(dest)); Required Interface: see convolveImage(), in addition:
int dimension = 0;
VectorElementAccessor<DestAccessor> elementAccessor(0, dest);
|
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|