PANDORE Version 6 |
GREYC-IMAGE |
perosion
Performs morphological erosion with a list of predefined structuring elements.
Synopsis
perosion num_se halfsize [-m mask][im_in|-][im_out|-]
Description
perosion erodes points of stronger contrast
according to a structuring element.
Erosion corresponds to the operation: replaces the central pixel p by the minimum
of its neighbors where the neighbors are specified by the structuring element.
erosion(p) = MIN(neighbors(p)).
The structuring element is specified by its
number num_se and its halfsize.
For a binary image, erosion erodes white areas.
For the region maps, erosion adds pixels with label=0 (background) at the points of erosion.
For the color images, the lexicographic is used:
initially by using band X, in the event of equality by using the band Y
then band Z.
Parameters
- num_se specifies the type of the structuring element:
case of 2D:
- 0: diamond (4-connexity)
- 1: square (8-connexity)
- 2: disc
- 3: horizontal line
- 4: diagonal line of 135 degrees (\)
- 5: vertical line
- 6: diagonal line of 45 degrees (/)
- 7: cross
- 8: X
- 9: cercle
case of 3D:
- 0: bipyramid (6-connexity)
- 1: cube (26-connexity)
- 2: sphere
- 3: horizontal line on x coordinate
- 4: horizontal line on y coordinate
- 5: horizontal line on x coordinate
- 6: diagonal line on x-y coordinates (\)
- 7: diagonal line on x-z coordinates (\)
- 8: diagonal line on y-z coordinates (\)
- 9: diagonal line on x-y coordinates (/)
- 10: diagonal line on x-z coordinates (/)
- 11: diagonal line on y-z coordinates (/)
- 12: cross in 3d
(This parameter is ignored for 1D image)
- halfsize specifies the half-size of the structuring
element. For example, a half-size of 1 for a square gives a structuring
element of size 3x3.
Inputs
- im_in: an image (1D, 2D, 3D) or a region map.
Outputs
- im_out: an image (or a region map) of the same type as im_in.
Result
Returns SUCCESS or FAILURE.
Examples
See also
Morphology,
pseerosion,
pdilation
C++ prototype
Errc PErosion( const Img2duc &im_in, Img2duc &im_out, int num_es, int halfsize );
Version française
Erosion des points de fort contraste d'une image.
Author: Régis Clouard