PANDORE Version 6 |
GREYC-IMAGE |
psedesign
Designs structuring element as image.
Synopsis
psedesign num_se halfsize [im_out|-]
Description
psedesign allows to generate a structuring element
as a new image.
The structuring element is designed from the type num_se
and the size halfsize. For example, a halfsize of 1 for a
num_se=3 gives a structuring element of type disc with size 3x3.
It is possible to create a structurant element with other shape
from its specification in a text file (see ptxt2pan).
These structuring elements can then be used by the
operators pseerosion and
psedilation.
Parameters
- The type of the structuring element is given by num_se:
In 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
In 3D:
- 10: bipyramid (6-connexity)
- 11: cubic (26-connexity)
- 12: sphere
- 13: horizontal line on x coordinate
- 14: horizontal line on y coordinate
- 15: horizontal line on x coordinate
- 16: diagonal line on x-y coordinates (/)
- 17: diagonal line on x-z coordinates (/)
- 18: diagonal line on y-z coordinates (/)
- 19: diagonal line on x-y coordinates (\)
- 20: diagonal line on x-z coordinates (\)
- 21: diagonal line on y-z coordinates (\)
- 22: cross in 3d
- size gives the half-size of the structuring element.
For example, a half-size of 1 for a square gives a structuring element
of size 3x3.
Outputs
- im_out: a 2D or 3D image of bytes.
Result
Returns SUCCESS or FAILURE.
Examples
See also
Morphology,
psedilation,
pseerosion,
ptxt2pan
C++ prototype
Img2duc* PSEDesign( int numse, int halfsize );
Author: Régis Clouard