Function iasebox

namespace:morph
page:iasebox

Synopse

Create a box structuring element.

  • B = iasebox(r=1)
    • B: Structuring Element
    • r: Double Radius.
01. from numpy import *
02. 
03. def iasebox(r=1):
04.     from iasesum import iasesum
05.     from iabinary import iabinary
06. 
07. 
08.     B = iasesum( iabinary([[1,1,1],
09.                           [1,1,1],
10.                           [1,1,1]]),r)
11. 
12. 
13.     return B

Description

iasebox creates the structuring element B formed by r successive Minkowski additions of the elementary square (i.e., the 3x3 square centered at the origin) with itself. If R=0, B is the unitary set that contains the origin. If R=1, B is the elementary square itself.

Examples

Example 1

1. from ia870 import iasebox, iaseshow
2. 
3. b1 = iasebox()
4. iashow(iaseshow(b1,'EXPAND'))
5. 
6. b2 = iasebox(2)
7. iashow(iaseshow(b2,'EXPAND'))

Equation