⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chp3.htm

📁 数字图象处理入门,非常好的书!!!!推荐!
💻 HTM
📖 第 1 页 / 共 5 页
字号:
</v:shape><![endif]--><![if !vml]><img width=107 height=75
src="./chp3.files/image007.gif" v:shapes="_x0000_i1032"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'>=<sub> <!--[if gte vml 1]><v:shape
 id="_x0000_i1033" type="#_x0000_t75" alt="" style='width:66pt;height:30.75pt'>
 <v:imagedata src="./chp3.files/image008.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image016.gif"/>
</v:shape><![endif]--><![if !vml]><img width=88 height=41
src="./chp3.files/image008.gif" v:shapes="_x0000_i1033"><![endif]></sub></span><span
lang=ZH-CN style='font-size:10.5pt'>×</span><span lang=ZH-CN style='font-size:
10.5pt;font-family:"Times New Roman"'> </span><sub><span style='font-size:10.5pt;
font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape id="_x0000_i1034"
 type="#_x0000_t75" alt="" style='width:41.25pt;height:56.25pt'>
 <v:imagedata src="./chp3.files/image009.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image018.gif"/>
</v:shape><![endif]--><![if !vml]><img width=55 height=75
src="./chp3.files/image009.gif" v:shapes="_x0000_i1034"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'>=<sub> <!--[if gte vml 1]><v:shape
 id="_x0000_i1035" type="#_x0000_t75" alt="" style='width:99.75pt;height:56.25pt'>
 <v:imagedata src="./chp3.files/image010.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image020.gif"/>
</v:shape><![endif]--><![if !vml]><img width=133 height=75
src="./chp3.files/image010.gif" v:shapes="_x0000_i1035"><![endif]></sub><o:p></o:p></span></p>

<p align=right style='margin:0cm;margin-bottom:.0001pt;text-align:right;
line-height:18.0pt'><span style='font-size:10.5pt;font-family:"Times New Roman"'>(3.3)<o:p></o:p></span></p>

<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
inter-ideograph;line-height:18.0pt'><span lang=ZH-CN style='font-size:10.5pt'>我们来验证一下。</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>

<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
inter-ideograph;line-height:18.0pt'><span lang=ZH-CN style='font-size:10.5pt'>设图象为</span><sub><span
lang=ZH-CN style='font-size:10.5pt;font-family:"Times New Roman"'> </span></sub><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
 id="_x0000_i1036" type="#_x0000_t75" alt="" style='width:1in;height:1in'>
 <v:imagedata src="./chp3.files/image011.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image022.gif"/>
</v:shape><![endif]--><![if !vml]><img width=96 height=96
src="./chp3.files/image011.gif" v:shapes="_x0000_i1036"><![endif]></span></sub><span
lang=ZH-CN style='font-size:10.5pt'>,经过</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>(3.2)</span><span lang=ZH-CN style='font-size:
10.5pt'>式处理后变为</span><sub><span lang=ZH-CN style='font-size:10.5pt;font-family:
"Times New Roman"'> </span></sub><sub><span style='font-size:10.5pt;font-family:
"Times New Roman"'><!--[if gte vml 1]><v:shape id="_x0000_i1037" type="#_x0000_t75"
 alt="" style='width:102pt;height:1in'>
 <v:imagedata src="./chp3.files/image012.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image024.gif"/>
</v:shape><![endif]--><![if !vml]><img width=136 height=96
src="./chp3.files/image012.gif" v:shapes="_x0000_i1037"><![endif]></span></sub><span
lang=ZH-CN style='font-size:10.5pt'>,经过</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>(3.3)</span><span lang=ZH-CN style='font-size:
10.5pt'>式处理后变为</span><sub><span lang=ZH-CN style='font-size:10.5pt;font-family:
"Times New Roman"'> </span></sub><sub><span style='font-size:10.5pt;font-family:
"Times New Roman"'><!--[if gte vml 1]><v:shape id="_x0000_i1038" type="#_x0000_t75"
 alt="" style='width:102pt;height:1in'>
 <v:imagedata src="./chp3.files/image012.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image026.gif"/>
</v:shape><![endif]--><![if !vml]><img width=136 height=96
src="./chp3.files/image012.gif" v:shapes="_x0000_i1038"><![endif]></span></sub><span
lang=ZH-CN style='font-size:10.5pt'>,两者完全一样。如果计算时不考虑周围一圈的象素,前者做了</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>4</span><span
lang=ZH-CN style='font-size:10.5pt'>×</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>(9</span><span lang=ZH-CN style='font-size:10.5pt'>个乘法,</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>8</span><span
lang=ZH-CN style='font-size:10.5pt'>个加法,</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>1</span><span lang=ZH-CN style='font-size:10.5pt'>个除法</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>)</span><span
lang=ZH-CN style='font-size:10.5pt'>,共</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>36</span><span lang=ZH-CN style='font-size:10.5pt'>个乘法,</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>32</span><span
lang=ZH-CN style='font-size:10.5pt'>个加法,</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>4</span><span lang=ZH-CN style='font-size:10.5pt'>个除法;后者做了</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>4</span><span
lang=ZH-CN style='font-size:10.5pt'>×</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>(3</span><span lang=ZH-CN style='font-size:10.5pt'>个乘法,</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>2</span><span
lang=ZH-CN style='font-size:10.5pt'>个加法</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>)+4</span><span lang=ZH-CN style='font-size:
10.5pt'>×</span><span style='font-size:10.5pt;font-family:"Times New Roman"'>(3</span><span
lang=ZH-CN style='font-size:10.5pt'>个乘法,</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>2</span><span lang=ZH-CN style='font-size:10.5pt'>个加法</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>)+4</span><span
lang=ZH-CN style='font-size:10.5pt'>个除法,共</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>24</span><span lang=ZH-CN style='font-size:10.5pt'>个乘法,</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>16</span><span
lang=ZH-CN style='font-size:10.5pt'>个加法,</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>4</span><span lang=ZH-CN style='font-size:10.5pt'>个除法,运算简化了不少,如果是大图,效率的提高将是非常客观的。</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>

<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
inter-ideograph;line-height:18.0pt'><span lang=ZH-CN style='font-size:10.5pt'>平滑模板的思想是通过将一点和周围</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>8</span><span
lang=ZH-CN style='font-size:10.5pt'>个点作平均,从而去除突然变化的点,滤掉噪声,其代价是图象有一定程度的模糊。上面提到的模板</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>(3.1)</span><span
lang=ZH-CN style='font-size:10.5pt'>,就是一种平滑模板,称之为</span><span style='font-size:
10.5pt;font-family:"Times New Roman"'>Box</span><span lang=ZH-CN
style='font-size:10.5pt'>模板。</span><span style='font-size:10.5pt;font-family:
"Times New Roman"'>Box</span><span lang=ZH-CN style='font-size:10.5pt'>模板虽然考虑了邻域点的作用,但并没有考虑各点位置的影响,对于所有的</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>9</span><span
lang=ZH-CN style='font-size:10.5pt'>个点都一视同仁,所以平滑的效果并不理想。实际上我们可以想象,离某点越近的点对该点的影响应该越大,为此,我们引入了加权系数,将原来的模板改造成</span><sub><span
lang=ZH-CN style='font-size:10.5pt;font-family:"Times New Roman"'> </span></sub><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
 id="_x0000_i1039" type="#_x0000_t75" alt="" style='width:80.25pt;height:56.25pt'>
 <v:imagedata src="./chp3.files/image007.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image027.gif"/>
</v:shape><![endif]--><![if !vml]><img width=107 height=75
src="./chp3.files/image007.gif" v:shapes="_x0000_i1039"><![endif]></span></sub><span
lang=ZH-CN style='font-size:10.5pt'>,可以看出,距离越近的点,加权系数越大。</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>

<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
inter-ideograph;line-height:18.0pt'><span lang=ZH-CN style='font-size:10.5pt'>新的模板也是一个常用的平滑模板,称为高斯</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>(Gauss)</span><span
lang=ZH-CN style='font-size:10.5pt'>模板。为什么叫这个名字,这是因为这个模板是通过采样</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>2</span><span
lang=ZH-CN style='font-size:10.5pt'>维高斯函数得到的。</span><span style='font-size:
10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>

<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
inter-ideograph;line-height:18.0pt'><span lang=ZH-CN style='font-size:10.5pt'>设图象为</span><sub><span
lang=ZH-CN style='font-size:10.5pt;font-family:"Times New Roman"'> </span></sub><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
 id="_x0000_i1040" type="#_x0000_t75" alt="" style='width:1in;height:1in'>
 <v:imagedata src="./chp3.files/image011.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image028.gif"/>
</v:shape><![endif]--><![if !vml]><img width=96 height=96
src="./chp3.files/image011.gif" v:shapes="_x0000_i1040"><![endif]></span></sub><span
lang=ZH-CN style='font-size:10.5pt'>,分别用两种平滑模板处理</span><span style='font-size:
10.5pt;font-family:"Times New Roman"'>(</span><span lang=ZH-CN
style='font-size:10.5pt'>周围一圈象素直接从原图拷贝</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>)</span><span lang=ZH-CN style='font-size:10.5pt'>。采用</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>Box</span><span
lang=ZH-CN style='font-size:10.5pt'>模板的结果为</span><sub><span lang=ZH-CN
style='font-size:10.5pt;font-family:"Times New Roman"'> </span></sub><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
 id="_x0000_i1041" type="#_x0000_t75" alt="" style='width:101.25pt;height:1in'>
 <v:imagedata src="./chp3.files/image013.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image030.gif"/>
</v:shape><![endif]--><![if !vml]><img width=135 height=96
src="./chp3.files/image013.gif" v:shapes="_x0000_i1041"><![endif]></span></sub><span
lang=ZH-CN style='font-size:10.5pt'>,采用高斯模板的结果为</span><sub><span lang=ZH-CN
style='font-size:10.5pt;font-family:"Times New Roman"'> </span></sub><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
 id="_x0000_i1042" type="#_x0000_t75" alt="" style='width:102pt;height:1in'>
 <v:imagedata src="./chp3.files/image014.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image032.gif"/>
</v:shape><![endif]--><![if !vml]><img width=136 height=96
src="./chp3.files/image014.gif" v:shapes="_x0000_i1042"><![endif]></span></sub><span
lang=ZH-CN style='font-size:10.5pt'>。</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'><o:p></o:p></span></p>

<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
inter-ideograph;line-height:18.0pt'><span lang=ZH-CN style='font-size:10.5pt'>可以看到,原图中出现噪声的区域是第</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>2</span><span
lang=ZH-CN style='font-size:10.5pt'>行第</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>2</span><span lang=ZH-CN style='font-size:10.5pt'>列和第</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>3</span><span
lang=ZH-CN style='font-size:10.5pt'>行第</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>2</span><span lang=ZH-CN style='font-size:10.5pt'>列,灰度从</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>2</span><span
lang=ZH-CN style='font-size:10.5pt'>一下子跳到了</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>6</span><span lang=ZH-CN style='font-size:10.5pt'>,用</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>Box</span><span
lang=ZH-CN style='font-size:10.5pt'>模板处理后,灰度从</span><span style='font-size:
10.5pt;font-family:"Times New Roman"'>3.11</span><span lang=ZH-CN
style='font-size:10.5pt'>跳到</span><span style='font-size:10.5pt;font-family:
"Times New Roman"'>4.33</span><span lang=ZH-CN style='font-size:10.5pt'>;用高斯模板处理后,灰度从</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>3.</span><span
lang=ZH-CN style='font-size:10.5pt'>跳到</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>4.56,</span><span lang=ZH-CN style='font-size:
10.5pt'>都缓和了跳变的幅度,从这一点上看,两者都达到了平滑的目的。但是,原图中的第</span><span style='font-size:
10.5pt;font-family:"Times New Roman"'>3</span><span lang=ZH-CN
style='font-size:10.5pt'>,第</span><span style='font-size:10.5pt;font-family:
"Times New Roman"'>4</span><span lang=ZH-CN style='font-size:10.5pt'>行总的来说,灰度值是比较高的,经模板</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>1</span><span
lang=ZH-CN style='font-size:10.5pt'>处理后,第</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>3</span><span lang=ZH-CN style='font-size:10.5pt'>行第</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>2</span><span
lang=ZH-CN style='font-size:10.5pt'>列元素的灰度变成了</span><span style='font-size:
10.5pt;font-family:"Times New Roman"'>4.33</span><span lang=ZH-CN
style='font-size:10.5pt'>,与第</span><span style='font-size:10.5pt;font-family:
"Times New Roman"'>3</span><span lang=ZH-CN style='font-size:10.5pt'>,第</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>4</span><span
lang=ZH-CN style='font-size:10.5pt'>行的总体灰度相比偏小,另外,原图中第</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>3</span><span
lang=ZH-CN style='font-size:10.5pt'>行第</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>2</span><span lang=ZH-CN style='font-size:10.5pt'>列元素的灰度为</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>6</span><span
lang=ZH-CN style='font-size:10.5pt'>,第</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>3</span><span lang=ZH-CN style='font-size:10.5pt'>行第</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>3</span><span
lang=ZH-CN style='font-size:10.5pt'>列元素的灰度为</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>4</span><span lang=ZH-CN style='font-size:10.5pt'>,变换后,后者</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>4.56</span><span
lang=ZH-CN style='font-size:10.5pt'>反而比前者</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>4.33</span><span lang=ZH-CN style='font-size:
10.5pt'>大了。而采用高斯模板没有出现这些问题,究其原因,就是因为它考虑了位置的影响。</span><span style='font-size:
10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>

<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
inter-ideograph;line-height:18.0pt'><span lang=ZH-CN style='font-size:10.5pt'>举个实际的例子:下图中,从左到右分别是原图,用高斯模板处理的图,用</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>Box</span><span
lang=ZH-CN style='font-size:10.5pt'>模板处理的图,可以看出,采用高斯模板,在实现平滑效果的同时,要比</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>Box</span><span

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -