[hofig1s12] [Up] [hofig1s14] Chapter 1 - Binary Erosion and Dilation

hofig1s13
Dilation for digital images

Description

.

Demo Script

Image S

from morph import *
S = mmbinary([
  [0, 0, 0, 0, 0, 0, 0],
  [0, 0, 1, 0, 1, 0, 0],
  [0, 0, 1, 1, 0, 1, 0],
  [0, 0, 1, 1, 1, 0, 0],
  [0, 0, 0, 0, 0, 0, 0]])
mmshow(mmseshow(S,'expand'))
mmseshow(S,'expand')

Structuring element E

E = mmbinary([
  [0, 0, 0],
  [0, 1, 0],
  [0, 1, 1]])
mmshow(mmseshow(E,'expand'))
mmseshow(E,'expand')

Dilation

T=mmdil(S,mmimg2se(E))
mmshow(mmseshow(T,'expand'))
mmseshow(T,'expand')

[hofig1s12] [Up] [hofig1s14] http://www.python.org