[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

Functions
Morphological operators for multi-dimensional arrays.

Functions

template<... >
void multiBinaryDilation (...)
 Binary dilation on multi-dimensional arrays.
template<... >
void multiBinaryErosion (...)
 Binary erosion on multi-dimensional arrays.
template<... >
void multiGrayscaleDilation (...)
 Parabolic grayscale dilation on multi-dimensional arrays.
template<... >
void multiGrayscaleErosion (...)
 Parabolic grayscale erosion on multi-dimensional arrays.

Detailed Description

These functions perform morphological operations on an arbitrary dimensional array that is specified by iterators (compatible to Multi-dimensional Array Iterators) and shape objects. It can therefore be applied to a wide range of data structures (vigra::MultiArrayView, vigra::MultiArray etc.).


Function Documentation

void vigra::multiBinaryErosion (   ...)

Binary erosion on multi-dimensional arrays.

This function applies a flat circular erosion operator with a given radius. The operation is isotropic. The input is intepreted as a binary multi-dimensional array where non-zero pixels represent foreground and zero pixels represent background. In the output, foregound is always represented by ones (i.e. NumericTrais<typename DestAccessor::value_type>::one()).

This function may work in-place, which means that siter == diter is allowed. A temporary internal array is only allocated if working on the destination array directly would cause overflow errors (that is if NumericTraits<typename DestAccessor::value_type>::max() < squaredNorm(shape), i.e. the squared length of the image diagonal doesn't fit into the destination type).

Declarations:

pass arguments explicitly:

    namespace vigra {
        template <class SrcIterator, class SrcShape, class SrcAccessor,
                  class DestIterator, class DestAccessor>
        void
        multiBinaryErosion(SrcIterator siter, SrcShape const & shape, SrcAccessor src,
                                    DestIterator diter, DestAccessor dest, int radius);

    }

use argument objects in conjunction with Argument Object Factories :

    namespace vigra {
        template <class SrcIterator, class SrcShape, class SrcAccessor,
                  class DestIterator, class DestAccessor>
        void
        multiBinaryErosion(triple<SrcIterator, SrcShape, SrcAccessor> const & source,
                                    pair<DestIterator, DestAccessor> const & dest, 
                                    int radius);

    }

Usage:

#include <vigra/multi_morphology.hxx>

    MultiArray<3, unsigned char>::size_type shape(width, height, depth);
    MultiArray<3, unsigned char> source(shape);
    MultiArray<3, unsigned char> dest(shape);
    ...

    // perform isotropic binary erosion
    multiBinaryErosion(srcMultiArrayRange(source), destMultiArray(dest), 3);
See also:
vigra::discErosion()
void vigra::multiBinaryDilation (   ...)

Binary dilation on multi-dimensional arrays.

This function applies a flat circular dilation operator with a given radius. The operation is isotropic. The input is intepreted as a binary multi-dimensional array where non-zero pixels represent foreground and zero pixels represent background. In the output, foregound is always represented by ones (i.e. NumericTrais<typename DestAccessor::value_type>::one()).

This function may work in-place, which means that siter == diter is allowed. A temporary internal array is only allocated if working on the destination array directly would cause overflow errors (that is if NumericTraits<typename DestAccessor::value_type>::max() < squaredNorm(shape), i.e. the squared length of the image diagonal doesn't fit into the destination type).

Declarations:

pass arguments explicitly:

    namespace vigra {
        template <class SrcIterator, class SrcShape, class SrcAccessor,
                  class DestIterator, class DestAccessor>
        void
        multiBinaryDilation(SrcIterator siter, SrcShape const & shape, SrcAccessor src,
                                    DestIterator diter, DestAccessor dest, int radius);

    }

use argument objects in conjunction with Argument Object Factories :

    namespace vigra {
        template <class SrcIterator, class SrcShape, class SrcAccessor,
                  class DestIterator, class DestAccessor>
        void
        multiBinaryDilation(triple<SrcIterator, SrcShape, SrcAccessor> const & source,
                                    pair<DestIterator, DestAccessor> const & dest, 
                                    int radius);

    }

Usage:

#include <vigra/multi_morphology.hxx>

    MultiArray<3, unsigned char>::size_type shape(width, height, depth);
    MultiArray<3, unsigned char> source(shape);
    MultiArray<3, unsigned char> dest(shape);
    ...

    // perform isotropic binary erosion
    multiBinaryDilation(srcMultiArrayRange(source), destMultiArray(dest), 3);
See also:
vigra::discDilation()
void vigra::multiGrayscaleErosion (   ...)

Parabolic grayscale erosion on multi-dimensional arrays.

This function applies a parabolic erosion operator with a given spread (sigma) on a grayscale array. The operation is isotropic. The input is a grayscale multi-dimensional array.

This function may work in-place, which means that siter == diter is allowed. A full-sized internal array is only allocated if working on the destination array directly would cause overflow errors (i.e. if typeid(typename DestAccessor::value_type) < N * M*M, where M is the size of the largest dimension of the array.

Declarations:

pass arguments explicitly:

    namespace vigra {
        template <class SrcIterator, class SrcShape, class SrcAccessor,
                  class DestIterator, class DestAccessor>
        void
        multiGrayscaleErosion(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
        multiGrayscaleErosion(triple<SrcIterator, SrcShape, SrcAccessor> const & source,
                                    pair<DestIterator, DestAccessor> const & dest, 
                                    double sigma);

    }

Usage:

#include <vigra/multi_morphology.hxx>

    MultiArray<3, unsigned char>::size_type shape(width, height, depth);
    MultiArray<3, unsigned char> source(shape);
    MultiArray<3, unsigned char> dest(shape);
    ...

    // perform isotropic grayscale erosion
    multiGrayscaleErosion(srcMultiArrayRange(source), destMultiArray(dest), 3.0);
See also:
vigra::discErosion()
void vigra::multiGrayscaleDilation (   ...)

Parabolic grayscale dilation on multi-dimensional arrays.

This function applies a parabolic dilation operator with a given spread (sigma) on a grayscale array. The operation is isotropic. The input is a grayscale multi-dimensional array.

This function may work in-place, which means that siter == diter is allowed. A full-sized internal array is only allocated if working on the destination array directly would cause overflow errors (i.e. if typeid(typename DestAccessor::value_type) < N * M*M, where M is the size of the largest dimension of the array.

Declarations:

pass arguments explicitly:

    namespace vigra {
        template <class SrcIterator, class SrcShape, class SrcAccessor,
                  class DestIterator, class DestAccessor>
        void
        multiGrayscaleDilation(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
        multiGrayscaleDilation(triple<SrcIterator, SrcShape, SrcAccessor> const & source,
                                    pair<DestIterator, DestAccessor> const & dest, 
                                    double sigma);

    }

Usage:

#include <vigra/multi_morphology.hxx>

    MultiArray<3, unsigned char>::size_type shape(width, height, depth);
    MultiArray<3, unsigned char> source(shape);
    MultiArray<3, unsigned char> dest(shape);
    ...

    // perform isotropic grayscale erosion
    multiGrayscaleDilation(srcMultiArrayRange(source), destMultiArray(dest), 3.0);
See also:
vigra::discErosion()

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.7.0 (Thu Aug 25 2011)