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

| Local Minima and Maxima |
--- | --- | ---

## Functions

template<...> void | localMinima (SrcIterator sul, SrcIterator slr, SrcAccessor sa, DestIterator dul, DestAccessor da, DestValue marker)
| Find local minima in an image.
template<...> void | localMaxima (SrcIterator sul, SrcIterator slr, SrcAccessor sa, DestIterator dul, DestAccessor da, DestValue marker)
| Find local maxima in an image.
template<...> void | extendedLocalMinima (SrcIterator sul, SrcIterator slr, SrcAccessor sa, DestIterator dul, DestAccessor da, DestValue marker)
| Find local minimal regions in an image.
template<...> void | extendedLocalMaxima (SrcIterator sul, SrcIterator slr, SrcAccessor sa, DestIterator dul, DestAccessor da, DestValue marker)
| Find local maximal regions in an image.

## Detailed Description

Detect local minima and maxima of the gray level, including extremal plateaus larger than 1 pixel

## Function Documentation

void extendedLocalMaxima (...)

Find local maximal regions in an image.

This function finds regions of uniform pixel value whose neighboring regions are all have smaller values (maximal plateaus of arbitrary size). Maximal regions are marked in the destination image with the given marker value (default is 1), all other destination pixels remain unchanged. `SrcAccessor::value_type` must be equality-comparable and less-comparable. A pixel at the image border will never be marked as maximum or maximal plateau. The function uses accessors.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                  class DestIterator, class DestAccessor,
                  class DestValue = DestAccessor::value_type>
            void
            extendedLocalMaxima(SrcIterator sul, SrcIterator slr, SrcAccessor sa,
                        DestIterator dul, DestAccessor da,
                        DestValue marker = NumericTraits<DestValue>::one())
        }

use argument objects in conjunction with Argument Object Factories:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                  class DestIterator, class DestAccessor,
                  class DestValue = DestAccessor::value_type>
            void
            extendedLocalMaxima(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                        pair<DestIterator, DestAccessor> dest,
                        DestValue marker = NumericTraits<DestValue>::one())
        }

Usage:

#include "vigra/localminmax.hxx"
Namespace: vigra

        vigra::BImage src(w,h), maxima(w,h);

        // init destiniation image
        maxima = 0;

        vigra::extendedLocalMaxima(srcImageRange(src), destImage(maxima));

Required Interface:

        SrcImageIterator src_upperleft, src_lowerright;
        DestImageIterator dest_upperleft;

        SrcAccessor src_accessor;
        DestAccessor dest_accessor;

        SrcAccessor::value_type u = src_accessor(src_upperleft);

        u == u
        u < u

        DestValue marker;
        dest_accessor.set(marker, dest_upperleft);

void extendedLocalMinima (...)

Find local minimal regions in an image.

This function finds regions of uniform pixel value whose neighboring regions are all have larger values (minimal plateaus of arbitrary size). Minimal regions are marked in the destination image with the given marker value (default is 1), all other destination pixels remain unchanged. `SrcAccessor::value_type` must be equality-comparable and less-comparable. A pixel at the image border will never be marked as minimum or minimal plateau. The function uses accessors.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                  class DestIterator, class DestAccessor,
                  class DestValue = DestAccessor::value_type>
            void
            extendedLocalMinima(SrcIterator sul, SrcIterator slr, SrcAccessor sa,
                        DestIterator dul, DestAccessor da,
                        DestValue marker = NumericTraits<DestValue>::one())
        }

use argument objects in conjunction with Argument Object Factories:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                  class DestIterator, class DestAccessor,
                  class DestValue = DestAccessor::value_type>
            void
            extendedLocalMinima(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                        pair<DestIterator, DestAccessor> dest,
                        DestValue marker = NumericTraits<DestValue>::one())
        }

Usage:

#include "vigra/localminmax.hxx"
Namespace: vigra

        vigra::BImage src(w,h), minima(w,h);

        // init destiniation image
        minima = 0;

        vigra::extendedLocalMinima(srcImageRange(src), destImage(minima));

Required Interface:

        SrcImageIterator src_upperleft, src_lowerright;
        DestImageIterator dest_upperleft;

        SrcAccessor src_accessor;
        DestAccessor dest_accessor;

        SrcAccessor::value_type u = src_accessor(src_upperleft);

        u == u
        u < u

        DestValue marker;
        dest_accessor.set(marker, dest_upperleft);

void localMaxima (...)

Find local maxima in an image.

The maxima are found only when the have a size of one pixel. Use extendedLocalMaxima() to find maximal plateaus. Maxima are marked in the destination image with the given marker value (default is 1), all other destination pixels remain unchanged. `SrcAccessor::value_type` must be less-comparable. A pixel at the image border will never be marked as maximum. The function uses accessors.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                  class DestIterator, class DestAccessor,
                  class DestValue = DestAccessor::value_type>
            void
            localMaxima(SrcIterator sul, SrcIterator slr, SrcAccessor sa,
                DestIterator dul, DestAccessor da,
                DestValue marker = NumericTraits<DestValue>::one())
        }

use argument objects in conjunction with Argument Object Factories:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                  class DestIterator, class DestAccessor,
                  class DestValue = DestAccessor::value_type>
            void
            localMaxima(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                pair<DestIterator, DestAccessor> dest,
                DestValue marker = NumericTraits<DestValue>::one())
        }

Usage:

#include "vigra/localminmax.hxx"
Namespace: vigra

        vigra::BImage src(w,h), maxima(w,h);

        // init destiniation image
        maxima = 0;

        vigra::localMaxima(srcImageRange(src), destImage(maxima));

Required Interface:

        SrcImageIterator src_upperleft, src_lowerright;
        DestImageIterator dest_upperleft;

        SrcAccessor src_accessor;
        DestAccessor dest_accessor;

        SrcAccessor::value_type u = src_accessor(src_upperleft);

        u < u

        DestValue marker;
        dest_accessor.set(marker, dest_upperleft);

void localMinima (...)

Find local minima in an image.

The minima are found only when the have a size of one pixel. Use extendedLocalMinima() to find minimal plateaus. Minima are marked in the destination image with the given marker value (default is 1), all other destination pixels remain unchanged. `SrcAccessor::value_type` must be less-comparable. A pixel at the image border will never be marked as minimum. The function uses accessors.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                  class DestIterator, class DestAccessor,
                  class DestValue = DestAccessor::value_type>
            void
            localMinima(SrcIterator sul, SrcIterator slr, SrcAccessor sa,
                DestIterator dul, DestAccessor da,
                DestValue marker = NumericTraits<DestValue>::one())
        }

use argument objects in conjunction with Argument Object Factories:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                  class DestIterator, class DestAccessor,
                  class DestValue = DestAccessor::value_type>
            void
            localMinima(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                pair<DestIterator, DestAccessor> dest,
                DestValue marker = NumericTraits<DestValue>::one())
        }

Usage:

#include "vigra/localminmax.hxx"
Namespace: vigra

        vigra::BImage src(w,h), minima(w,h);

        // init destiniation image
        minima = 0;

        vigra::localMinima(srcImageRange(src), destImage(minima));

Required Interface:

        SrcImageIterator src_upperleft, src_lowerright;
        DestImageIterator dest_upperleft;

        SrcAccessor src_accessor;
        DestAccessor dest_accessor;

        SrcAccessor::value_type u = src_accessor(src_upperleft);

        u < u

        DestValue marker;
        dest_accessor.set(marker, dest_upperleft);

© Ullrich Köthe (koethe@informatik.uni-hamburg.de) Cognitive Systems Group, University of Hamburg, Germany | html generated using doxygen and Python VIGRA 1.3.2 (27 Jan 2005)