Function iasedisk

Synopse

Create a disk or a semi-sphere structuring element.

  • B = iasedisk(r=3, DIM="2D", METRIC="EUCLIDEAN", FLAT="FLAT", h=0)
    • B: Structuring Element
    • r: Integer Disk radius.
    • DIM: String '1D', '2D, or '3D'.
    • METRIC: String 'EUCLIDEAN', ' CITY-BLOCK', 'OCTAGON', or ' CHESSBOARD'.
    • FLAT: String 'FLAT' or 'NON-FLAT'.
    • h: Double Elevation of the center of the semi-sphere.

Description

iasedisk creates a flat structuring element B that is disk under the metric METRIC , centered at the origin and with radius r or a non-flat structuring element that is a semi-sphere under the metric METRIC, centered at (0, h) and with radius r. This structuring element can be created on the 1D, 2D or 3D space.

Examples

Example 1

Example 2

Warning: downcasting image from int32 to uint16 (may lose precision)
Warning: downcasting image from int32 to uint16 (may lose precision)
Warning: downcasting image from int32 to uint16 (may lose precision)

Example 3

[[-2147483647 -2147483647           1           1           1 -2147483647
  -2147483647]
 [-2147483647           2           2           2           2           2
  -2147483647]
 [          1           2           3           3           3           2
            1]
 [          1           2           3           3           3           2
            1]
 [          1           2           3           3           3           2
            1]
 [-2147483647           2           2           2           2           2
  -2147483647]
 [-2147483647 -2147483647           1           1           1 -2147483647
  -2147483647]]
[[-2147483647 -2147483647           6           6           6 -2147483647
  -2147483647]
 [-2147483647           7           7           7           7           7
  -2147483647]
 [          6           7           8           8           8           7
            6]
 [          6           7           8           8           8           7
            6]
 [          6           7           8           8           8           7
            6]
 [-2147483647           7           7           7           7           7
  -2147483647]
 [-2147483647 -2147483647           6           6           6 -2147483647
  -2147483647]]

Comparing with morph

gia:
[[ True  True  True]
 [ True  True  True]
 [ True  True  True]]
gmma:
[[ True  True  True]
 [ True  True  True]
 [ True  True  True]]

Example 3D da toolbox morph

[[[False False False]
  [False  True False]
  [False False False]]

 [[False  True False]
  [ True  True  True]
  [False  True False]]

 [[False False False]
  [False  True False]
  [False False False]]]

Equation