Function iasetrans

namespace:morph
page:iasetrans

Synopse

Translate a structuring element

  • Bo = iasetrans(Bi, t)
    • Bo: Structuring Element
    • Bi: Structuring Element
    • t: Image coordinate
01. from numpy import *
02. 
03. def iasetrans(Bi, t):
04.     from iamat2set import iamat2set
05.     from iaset2mat import iaset2mat
06. 
07. 
08.     x,v=iamat2set(Bi)
09.     Bo = iaset2mat((x+t,v))
10.     Bo = Bo.astype(Bi.dtype)
11. 
12.     return Bo

Description

iasetrans translates a structuring element by a specific value.

Examples

Example 1

01. from ia870 import iasetrans
02. from ia870 import iaseline
03. from ia870 import iaseshow
04. 
05. B = array([1,1,1],bool)
06. adshow(iaseshow(B,'EXPAND'))
07. 
08. B1 = iasetrans(B, [2, -1])
09. adshow(iaseshow(B1,'EXPAND'))
10. 
11. b1 = iaseline(5)
12. adshow(iaseshow(b1,'EXPAND'))
13. b2 = iasetrans(b1,[2,-2])
14. adshow(iaseshow(b2,'EXPAND'))

Equation

See Also