[hofig1s8] [Up] [hofig1s10] Chapter 1 - Binary Erosion and Dilation

hofig1s9
Erosion 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')

Erosion

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

[hofig1s8] [Up] [hofig1s10] http://www.python.org