next up previous contents index
Next: fconvol Up: Reference Previous: cfsharpen   Contents   Index

erosion

$ \bigcirc$Name


erosion erosion/dilation of a Cimage




$ \bigcirc$Command Synopsis


erosion [-i] [-s s] [-r r] [-n n] in out



-i : if set, a dilation is applied instead of an erosion

-s s : if set, the shape s is taken as structuring element

-r r : otherwise, a disc of radius r (default 1.0) is used

-n n : number of iterations (default: 1)

in : input Cimage

out : output Cimage




$ \bigcirc$Function Summary


Cimage erosion (u , v , r , s , n , i )

Cimage u , v ;

float *r ;

Curve s ;

int *n ;

char *i ;




$ \bigcirc$Description


In this module, we have implemented two basic operators of mathematical morphology, the so-called erosion and dilation. Let u(x) be an image and F a shape, i.e. a subset of R2, then the erosion of u by the ``structuring element'' F is the image v defined by

v(x) = $\displaystyle \inf_{{\delta \epsilon F}}^{}$u(x + $\displaystyle \delta$).

This operation ``erodes'' high-intensity shapes of u and ``dilates'' dark ones. When two or more erosions are successively processed, the resulting operation is a single erosion with a shape given the convolution of the successive shapes. The ``inverse'' operation, called dilation, is defined by

v(x) = $\displaystyle \sup_{{\delta \epsilon F}}^{}$u(x + $\displaystyle \delta$).

However, the combination of these operators does not produce a null operation in general.

The erosion module iterates n erosions (or dilations if the -i option is set) on a cimage u, taking shape s as structuring element, or a disc of radius r (default r = 1.0) if no shape is specified.

The complexity of the algorithm is O(nr2| u|), so that it is faster to process many ``little'' erosions than a ``big'' one.




$ \bigcirc$See Also


disc.

opening, sr_distance.


$ \bigcirc$Version 2.5


Last Modification date : Thu Nov 29 20:23:56 2001


$ \bigcirc$Author


Lionel Moisan






next up previous contents index
Next: fconvol Up: Reference Previous: cfsharpen   Contents   Index
mw 2004-05-05