[hofig6s26] [Up] [hofig7s1] Chapter 6 - Morphological Processing of Gray-Scale Images

hofig6s29
Airport runway detection

Description

This figure illustrates the detection of airport runways.

Demo Script

.

from morph import *
a = mmreadgray('galeao.jpg');
a = a[9:-70,29:-130];
b = mmopenth(a,mmsedisk(5));
c = mmaddm(b, 180);
Warning: Converting input image from int32 to uint8.
d = mmthreshad(b,30);
Warning: Converting input image from int32 to uint8.
e = mmthin(d);
f = mmareaopen(e, 1000,mmsebox());
g = mminfrec(mmgray(f), b);
h = mmthreshad(g, 20);
Warning: Converting input image from int32 to uint8.
i = mmunion(a,mmgray(h));
mmshow(a)
mmshow(b)
mmshow(c)
mmshow(d)
mmshow(e)
mmshow(f)
mmshow(g)
mmshow(h)
mmshow(i)
a b
c d
e f
g h
i

[hofig6s26] [Up] [hofig7s1] http://www.python.org