ViSP  2.6.2
vpImageMorphology Class Reference

#include <vpImageMorphology.h>

Public Types

enum  vpConnexityType { CONNEXITY_4, CONNEXITY_8 }
 

Static Public Member Functions

template<class Type >
static void erosion (vpImage< Type > &I, Type value, Type value_out, vpConnexityType connexity=CONNEXITY_4)
 
template<class Type >
static void dilatation (vpImage< Type > &I, Type value, Type value_out, vpConnexityType connexity=CONNEXITY_4)
 

Detailed Description

Various mathematical morphology tools, erosion, dilatation...

Author
Fabien Spindler (Fabie.nosp@m.n.Sp.nosp@m.indle.nosp@m.r@ir.nosp@m.isa.f.nosp@m.r) Irisa / Inria Rennes

Definition at line 71 of file vpImageMorphology.h.

Member Enumeration Documentation

Type of connexity 4, or 8.

Enumerator
CONNEXITY_4 

For a given pixel 4 neighbors are considered (left, right, up, down)

CONNEXITY_8 

For a given pixel 8 neighbors are considered (left, right, up, down, and the 4 pixels located on the diagonal)

Definition at line 77 of file vpImageMorphology.h.

Member Function Documentation

template<class Type >
void vpImageMorphology::dilatation ( vpImage< Type > &  I,
Type  value,
Type  value_out,
vpConnexityType  connexity = CONNEXITY_4 
)
static

Dilate a binary image using a structuring element of size one.

Parameters
I: Image to process.
value: Values of the pixels to dilate.
value_out: Value to set if dilatation is done.
connexity: Type of connexity: 4 or 8.

To dilate a black area in an unsigned char image with one element mask, set value to 0 and value_out to 255.

To dilate a white area in an unsigned char image with one element mask, set value to 255 and value_out to 0.

See also
erosion()

Definition at line 178 of file vpImageMorphology.h.

References CONNEXITY_4, vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().

template<class Type >
void vpImageMorphology::erosion ( vpImage< Type > &  I,
Type  value,
Type  value_out,
vpConnexityType  connexity = CONNEXITY_4 
)
static

Erode a binary image using a structuring element of size one.

Parameters
I: Image to process.
value: Values of the pixels to erode.
value_out: Value to set if erosion is done.
connexity: Type of connexity: 4 or 8.

To erode a black area in an unsigned char image, set value to 0 and value_out to 255.

To erode a white area in an unsigned char image with one element mask, set value to 255 and value_out to 0.

See also
dilatation()

Definition at line 113 of file vpImageMorphology.h.

References CONNEXITY_4, vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().