📄 chap06.htm
字号:
<html>
<!-- Mirrored from www.lgui.net/column/book1/chap06.htm by HTTrack Website Copier/3.x [XR&CO'2005], Mon, 21 Mar 2005 13:20:11 GMT -->
<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<link rel=Edit-Time-Data href="chap06.files/editdata.html" >
<link rel=OLE-Object-Data href="chap06.files/oledata.mso" >
<title>第6章 腐蚀,膨胀,细化算法</title>
<style><!--
.Normal
{text-align:justify;
text-justify:inter-ideograph;
text-indent:0pt;
line-height:normal;
font-size:10.5pt;
font-family:"Times New Roman";}
.a
{text-align:center;
text-indent:0pt;
line-height:20.0pt;
font-size:12.0pt;
font-family:"Times New Roman";}
-->
</style>
</head>
<body lang=ZH-CN link=blue vlink=purple class="Normal" bgcolor="#FFFFFF">
<div style='layout-grid:15.6pt'>
<h1><a name="_Toc486331891"></a><a name="_Toc486332891"></a><a
name="_Toc486339000"></a><a name="_Toc454810865"></a><a name="_Toc454856639"><span><span>第<span
lang=EN-US>6</span></span></span></a><span><span><span style='font-family:黑体;"Times New Roman"'>章</span>
</span></span><span><span><span
style='font-family:黑体;"Times New Roman"'>腐蚀,膨胀,细化算法</span></span></span></h1>
<p style='line-height:18.0pt'><span
style='font-family:宋体;"Times New Roman"'>这一章的内容我认为是最有趣的。还记得前言中那个抽取骨架的例子吗?现在我们就来看看它是如何实现的。</span></p>
<p style='line-height:18.0pt'><span
style='font-family:宋体;"Times New Roman"'>今天所讲的内容属于一门新兴的学科:数学形态学</span><span lang=EN-US>(Mathematical
Morphology)</span><span style='font-family:宋体;
"Times New Roman"'>。说起来很有意思,它是法国和德国的科学家在研究岩石结构时建立的一门学科。形态学的用途主要是获取物体拓扑和结构信息,它通过物体和结构元素相互作用的某些运算,得到物体更本质的形态。在图象处理中的应用主要是:</span><span
lang=EN-US>(1)</span><span style='font-family:宋体;
"Times New Roman"'>利用形态学的基本运算,对图象进行观察和处理,从而达到改善图象质量的目的;</span><span
lang=EN-US>(2)</span><span style='font-family:宋体;
"Times New Roman"'>描述和定义图象的各种几何参数和特征,如面积、周长、连通度、颗粒度、骨架和方向性等。</span></p>
<p style='line-height:18.0pt'><span
style='font-family:宋体;"Times New Roman"'>限于篇幅,我们只介绍二值图象的形态学运算,对于灰度图象的形态学运算,有兴趣的读者可以阅读有关的参考书。在程序中,为了处理的方便,还是采用</span><span
lang=EN-US>256</span><span style='font-family:宋体;
"Times New Roman"'>级灰度图,不过只用到了调色板中的</span><span
lang=EN-US>0</span><span style='font-family:宋体;
"Times New Roman"'>和</span><span lang=EN-US>255</span><span
style='font-family:宋体;"Times New Roman"'>两项。</span></p>
<p style='line-height:18.0pt'><span
style='font-family:宋体;"Times New Roman"'>先来定义一些基本符号和关系。</span></p>
<p style='line-height:
18.0pt;'> <b><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
</span></span></b> <b><span style='font-family:宋体;"Times New Roman";"Times New Roman"'>元素</span><span
lang=EN-US></span></b></p>
<p style='line-height:18.0pt'><span
style='font-family:宋体;"Times New Roman"'>设有一幅图象</span><span lang=EN-US>X</span><span
style='font-family:宋体;"Times New Roman"'>,若点</span><span lang=EN-US>a</span><span style='font-family:
宋体;"Times New Roman"'>在</span><span
lang=EN-US>X</span><span style='font-family:宋体;
"Times New Roman"'>的区域以内,则称</span><span lang=EN-US>a</span><span
style='font-family:宋体;"Times New Roman"'>为</span><span lang=EN-US>X</span><span style='font-family:
宋体;"Times New Roman"'>的元素,记作</span><span
lang=EN-US>a</span><span style='font-family:宋体;
"Times New Roman"'>∈</span><span lang=EN-US>X</span><span
style='font-family:宋体;"Times New Roman"'>,如图</span><span lang=EN-US>6.1</span><span style='font-family:
宋体;"Times New Roman"'>所示。</span></p>
<p style='line-height:
18.0pt;'> <b><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
</span></span></b> <b><span lang=EN-US>B</span></b><b><span
style='font-family:宋体;"Times New Roman"'>包含于</span><span lang=EN-US>X</span></b></p>
<p style='line-height:18.0pt'><span
style='font-family:宋体;"Times New Roman"'>设有两幅图象</span><span lang=EN-US>B</span><span
style='font-family:宋体;"Times New Roman"'>,</span><span lang=EN-US>X</span><span style='font-family:
宋体;"Times New Roman"'>。对于</span><span
lang=EN-US>B</span><span style='font-family:宋体;
"Times New Roman"'>中所有的元素</span><span lang=EN-US>ai</span><span
style='font-family:宋体;"Times New Roman"'>,都有</span><span lang=EN-US>ai</span><span style='font-family:
宋体;"Times New Roman"'>∈</span><span
lang=EN-US>X</span><span style='font-family:宋体;
"Times New Roman"'>,则称</span><span lang=EN-US>B</span><span
style='font-family:宋体;"Times New Roman"'>包含于</span><span lang=EN-US>(included
in)X</span><span
style='font-family:宋体;"Times New Roman"'>,记作</span><span lang=EN-US>B<sub> <img width=16 height=13
src="chap06.files/image002.gif" v:shapes="_x0000_i1025"> </sub> X</span><span style='font-family:宋体;"Times New Roman";"Times New Roman"'>,如图</span><span
lang=EN-US>6.2</span><span style='font-family:宋体;
"Times New Roman"'>所示。</span></p>
<p style='line-height:
18.0pt;'> <b><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>
</span></span></b> <b><span lang=EN-US>B</span></b><b><span
style='font-family:宋体;"Times New Roman"'>击中</span><span lang=EN-US>X</span></b></p>
<p style='line-height:18.0pt'><span
style='font-family:宋体;"Times New Roman"'>设有两幅图象</span><span lang=EN-US>B</span><span
style='font-family:宋体;"Times New Roman"'>,</span><span lang=EN-US>X</span><span style='font-family:
宋体;"Times New Roman"'>。若存在这样一个点,它即是</span><span
lang=EN-US>B</span><span style='font-family:宋体;
"Times New Roman"'>的元素,又是</span><span lang=EN-US>X</span><span
style='font-family:宋体;"Times New Roman"'>的元素,则称</span><span lang=EN-US>B</span><span
style='font-family:宋体;"Times New Roman"'>击中</span><span lang=EN-US>(hit)X</span><span
style='font-family:宋体;"Times New Roman"'>,记作</span><span lang=EN-US>B</span><span style='font-family:
宋体;"Times New Roman"'>↑</span><span
lang=EN-US>X</span><span style='font-family:宋体;
"Times New Roman"'>,如图</span><span lang=EN-US>6.3</span><span
style='font-family:宋体;"Times New Roman"'>所示。</span></p>
<p style='line-height:
18.0pt;'> <b><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>
</span></span></b> <b><span lang=EN-US>B</span></b><b><span
style='font-family:宋体;"Times New Roman"'>不击中</span><span lang=EN-US>X</span></b></p>
<p style='line-height:18.0pt'><span
style='font-family:宋体;"Times New Roman"'>设有两幅图象</span><span lang=EN-US>B</span><span
style='font-family:宋体;"Times New Roman"'>,</span><span lang=EN-US>X</span><span style='font-family:
宋体;"Times New Roman"'>。若不存在任何一个点,它即是</span><span
lang=EN-US>B</span><span style='font-family:宋体;
"Times New Roman"'>的元素,又是</span><span lang=EN-US>X</span><span
style='font-family:宋体;"Times New Roman"'>的元素,即</span><span lang=EN-US>B</span><span style='font-family:
宋体;"Times New Roman"'>和</span><span
lang=EN-US>X</span><span style='font-family:宋体;
"Times New Roman"'>的交集是空,则称</span><span lang=EN-US>B</span><span
style='font-family:宋体;"Times New Roman"'>不击中</span><span lang=EN-US>(miss)X</span><span
style='font-family:宋体;"Times New Roman"'>,记作</span><span lang=EN-US>B</span><span style='font-family:
宋体;"Times New Roman"'>∩</span><span
lang=EN-US>X=</span><span style='font-family:宋体;
"Times New Roman"'>Ф;其中∩是集合运算相交的符号,Ф表示空集。如图</span><span
lang=EN-US>6.4</span><span style='font-family:宋体;
"Times New Roman"'>所示。</span></p>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=284 valign=top class="Normal">
<p align=center style='text-align:center;line-height:18.0pt'><b><span
lang=EN-US> <img width=104 height=64
src="chap06.files/image004.gif" v:shapes="_x0000_i1030"> </span></b></p>
<p align=center style='text-align:center;line-height:18.0pt'><b><span
style='font-family:宋体;"Times New Roman"'>图</span>6.1
</b><b><span style='font-family:
宋体;"Times New Roman"'>元素</span></b></p>
</td>
<td width=284 valign=top class="Normal">
<p align=center style='text-align:center;line-height:18.0pt'><span
lang=EN-US> <img width=106 height=65
src="chap06.files/image006.gif" v:shapes="_x0000_i1031"> </span></p>
<p align=center style='text-align:center;line-height:18.0pt'><b><span
style='font-family:宋体;"Times New Roman"'>图</span>6.2
</b><b><span style='font-family:
宋体;"Times New Roman"'>包含</span></b></p>
</td>
</tr>
<tr>
<td width=284 valign=top class="Normal">
<p align=center style='text-align:center;line-height:18.0pt'><span
lang=EN-US> <img width=136 height=65
src="chap06.files/image008.gif" v:shapes="_x0000_i1032"> </span></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -