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

| Basic Morphological Operations |

## Functions
template<... >
void | discDilation (...)
| Apply dilation (maximum) filter with disc of given radius to image.
template<... >
void | discDilationWithMask (...)
| Apply dilation (maximum) filter with disc of given radius to image using a mask.
template<... >
void | discErosion (...)
| Apply erosion (minimum) filter with disc of given radius to image.
template<... >
void | discErosionWithMask (...)
| Apply erosion (minimum) filter with disc of given radius to image using a mask.
template<... >
void | discMedian (...)
| Apply median filter with disc of given radius to image.
template<... >
void | discMedianWithMask (...)
| Apply median filter with disc of given radius to image using a mask.
template<... >
void | discRankOrderFilter (...)
| Apply rank order filter with disc structuring function to the image.
template<... >
void | discRankOrderFilterWithMask (...)
| Apply rank order filter with disc structuring function to the image using a mask.

## Detailed Description

Perform erosion, dilation, and median with disc structuring functions

See also: Morphological operators for multi-dimensional arrays. Separable morphology with parabola structuring functions in arbitrary dimensions

## Function Documentation

void vigra::discRankOrderFilter | ( |  | ... | ) |

Apply rank order filter with disc structuring function to the image.

The pixel values of the source image must be in the range 0...255. Radius must be >= 0. Rank must be in the range 0.0 <= rank <= 1.0. The filter acts as a minimum filter if rank = 0.0, as a median if rank = 0.5, and as a maximum filter if rank = 1.0. Accessor are used to access the pixel data.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class DestIterator, class DestAccessor>
            void
            discRankOrderFilter(SrcIterator upperleft1,
                                SrcIterator lowerright1, SrcAccessor sa,
                                DestIterator upperleft2, DestAccessor da,
                                int radius, float rank)
        }

use argument objects in conjunction with Argument Object Factories :

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class DestIterator, class DestAccessor>
            void
            discRankOrderFilter(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                                pair<DestIterator, DestAccessor> dest,
                                int radius, float rank)
        }

Usage:

#include <vigra/flatmorphology.hxx>
Namespace: vigra

        vigra::CImage src, dest;

        // do median filtering
        vigra::discRankOrderFilter(srcImageRange(src), destImage(dest), 10, 0.5);

Required Interface:

        SrcIterator src_upperleft;
        DestIterator dest_upperleft;
        int x, y;
        unsigned char value;

        SrcAccessor src_accessor;
        DestAccessor dest_accessor;

        // value_type of accessor must be convertible to unsigned char
        value = src_accessor(src_upperleft, x, y);

        dest_accessor.set(value, dest_upperleft, x, y);

Preconditions:

        for all source pixels: 0 <= value <= 255

        (rank >= 0.0) && (rank <= 1.0)
        radius >= 0

void vigra::discErosion | ( |  | ... | ) |

Apply erosion (minimum) filter with disc of given radius to image.

This is an abbreviation vor the rank order filter with rank = 0.0. See discRankOrderFilter() for more information.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class DestIterator, class DestAccessor>
            void
            discErosion(SrcIterator upperleft1,
                        SrcIterator lowerright1, SrcAccessor sa,
                        DestIterator upperleft2, DestAccessor da,
                        int radius)
        }

use argument objects in conjunction with Argument Object Factories :

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class DestIterator, class DestAccessor>
            void
            discErosion(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                        pair<DestIterator, DestAccessor> dest,
                        int radius)
        }

void vigra::discDilation | ( |  | ... | ) |

Apply dilation (maximum) filter with disc of given radius to image.

This is an abbreviation vor the rank order filter with rank = 1.0. See discRankOrderFilter() for more information.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class DestIterator, class DestAccessor>
            void
            discDilation(SrcIterator upperleft1,
                        SrcIterator lowerright1, SrcAccessor sa,
                        DestIterator upperleft2, DestAccessor da,
                        int radius)
        }

use argument objects in conjunction with Argument Object Factories :

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class DestIterator, class DestAccessor>
            void
            discDilation(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                        pair<DestIterator, DestAccessor> dest,
                        int radius)
        }

void vigra::discMedian | ( |  | ... | ) |

Apply median filter with disc of given radius to image.

This is an abbreviation vor the rank order filter with rank = 0.5. See discRankOrderFilter() for more information.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class DestIterator, class DestAccessor>
            void
            discMedian(SrcIterator upperleft1,
                        SrcIterator lowerright1, SrcAccessor sa,
                        DestIterator upperleft2, DestAccessor da,
                        int radius)
        }

use argument objects in conjunction with Argument Object Factories :

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class DestIterator, class DestAccessor>
            void
            discMedian(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                        pair<DestIterator, DestAccessor> dest,
                        int radius)
        }

void vigra::discRankOrderFilterWithMask | ( |  | ... | ) |

Apply rank order filter with disc structuring function to the image using a mask.

The pixel values of the source image must be in the range 0...255. Radius must be >= 0. Rank must be in the range 0.0 <= rank <= 1.0. The filter acts as a minimum filter if rank = 0.0, as a median if rank = 0.5, and as a maximum filter if rank = 1.0. Accessor are used to access the pixel data.

The mask is only applied to th input image, i.e. the function generates an output wherever the current disc contains at least one pixel with mask value 'true'. Source pixels with mask value 'false' are ignored during the calculation of the rank order.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class MaskIterator, class MaskAccessor,
                      class DestIterator, class DestAccessor>
            void
            discRankOrderFilterWithMask(SrcIterator upperleft1,
                                        SrcIterator lowerright1, SrcAccessor sa,
                                        MaskIterator upperleftm, MaskAccessor mask,
                                        DestIterator upperleft2, DestAccessor da,
                                        int radius, float rank)
        }

group arguments (use in conjunction with Argument Object Factories):

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class MaskIterator, class MaskAccessor,
                      class DestIterator, class DestAccessor>
            void
            discRankOrderFilterWithMask(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                                        pair<MaskIterator, MaskAccessor> mask,
                                        pair<DestIterator, DestAccessor> dest,
                                        int radius, float rank)
        }

Usage:

#include <vigra/flatmorphology.hxx>
Namespace: vigra

        vigra::CImage src, dest, mask;

        // do median filtering
        vigra::discRankOrderFilterWithMask(srcImageRange(src),
                                    maskImage(mask), destImage(dest), 10, 0.5);

Required Interface:

        SrcIterator src_upperleft;
        DestIterator dest_upperleft;
        MaskIterator mask_upperleft;
        int x, y;
        unsigned char value;

        SrcAccessor src_accessor;
        DestAccessor dest_accessor;
        MaskAccessor mask_accessor;

        mask_accessor(mask_upperleft, x, y) // convertible to bool

        // value_type of accessor must be convertible to unsigned char
        value = src_accessor(src_upperleft, x, y);

        dest_accessor.set(value, dest_upperleft, x, y);

Preconditions:

        for all source pixels: 0 <= value <= 255

        (rank >= 0.0) && (rank <= 1.0)
        radius >= 0

void vigra::discErosionWithMask | ( |  | ... | ) |

Apply erosion (minimum) filter with disc of given radius to image using a mask.

This is an abbreviation vor the masked rank order filter with rank = 0.0. See discRankOrderFilterWithMask() for more information.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class MaskIterator, class MaskAccessor,
                      class DestIterator, class DestAccessor>
            void
            discErosionWithMask(SrcIterator upperleft1,
                                SrcIterator lowerright1, SrcAccessor sa,
                                MaskIterator upperleftm, MaskAccessor mask,
                                DestIterator upperleft2, DestAccessor da,
                                int radius)
        }

group arguments (use in conjunction with Argument Object Factories):

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class MaskIterator, class MaskAccessor,
                      class DestIterator, class DestAccessor>
            void
            discErosionWithMask(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                                pair<MaskIterator, MaskAccessor> mask,
                                pair<DestIterator, DestAccessor> dest,
                                int radius)
        }

void vigra::discDilationWithMask | ( |  | ... | ) |

Apply dilation (maximum) filter with disc of given radius to image using a mask.

This is an abbreviation vor the masked rank order filter with rank = 1.0. See discRankOrderFilterWithMask() for more information.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class MaskIterator, class MaskAccessor,
                      class DestIterator, class DestAccessor>
            void
            discDilationWithMask(SrcIterator upperleft1,
                                SrcIterator lowerright1, SrcAccessor sa,
                                MaskIterator upperleftm, MaskAccessor mask,
                                DestIterator upperleft2, DestAccessor da,
                                int radius)
        }

group arguments (use in conjunction with Argument Object Factories):

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class MaskIterator, class MaskAccessor,
                      class DestIterator, class DestAccessor>
            void
            discDilationWithMask(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                                pair<MaskIterator, MaskAccessor> mask,
                                pair<DestIterator, DestAccessor> dest,
                                int radius)
        }

void vigra::discMedianWithMask | ( |  | ... | ) |

Apply median filter with disc of given radius to image using a mask.

This is an abbreviation vor the masked rank order filter with rank = 0.5. See discRankOrderFilterWithMask() for more information.

Declarations:

pass arguments explicitly:

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class MaskIterator, class MaskAccessor,
                      class DestIterator, class DestAccessor>
            void
            discMedianWithMask(SrcIterator upperleft1,
                                SrcIterator lowerright1, SrcAccessor sa,
                                MaskIterator upperleftm, MaskAccessor mask,
                                DestIterator upperleft2, DestAccessor da,
                                int radius)
        }

group arguments (use in conjunction with Argument Object Factories):

        namespace vigra {
            template <class SrcIterator, class SrcAccessor,
                      class MaskIterator, class MaskAccessor,
                      class DestIterator, class DestAccessor>
            void
            discMedianWithMask(triple<SrcIterator, SrcIterator, SrcAccessor> src,
                                pair<MaskIterator, MaskAccessor> mask,
                                pair<DestIterator, DestAccessor> dest,
                                int radius)
        }

© 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.9.0 (Tue Nov 6 2012)