[hoeq1s1] [Up] [hofig1s4] Chapter 1 - Binary Erosion and Dilation

hofig1s3
Display discrete image and structuring element

Description

This figure illustrates the display of small images.

Demo Script

Graphical representation of small discrete binary images

Small binary images can be graphically represented by a dot on 1-pixels and an empty square on 0-pixels. mmseshow with the option EXPAND generates this graphical representation.

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

[hoeq1s1] [Up] [hofig1s4] http://www.python.org