📄 chp3.htm
字号:
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"'>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"'><o:p></o:p></span></p>
<p class=a style='margin:0cm;margin-bottom:.0001pt;line-height:18.0pt'><!--[if gte vml 1]><v:shape
id="_x0000_i1043" type="#_x0000_t75" alt="" style='width:402.75pt;height:144.75pt'>
<v:imagedata src="./chp3.files/image015.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image033.gif"/>
</v:shape><![endif]--><![if !vml]><img width=537 height=193
src="./chp3.files/image015.gif" v:shapes="_x0000_i1043"><![endif]></p>
<p align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;
line-height:18.0pt'><b><span lang=ZH-CN style='font-size:10.5pt'>图</span></b><b><span
style='font-size:10.5pt;font-family:"Times New Roman"'>3.3
</span></b><b><span lang=ZH-CN style='font-size:10.5pt'>高斯模板和</span></b><b><span
style='font-size:10.5pt;font-family:"Times New Roman"'>Box</span></b><b><span
lang=ZH-CN style='font-size:10.5pt'>模板的对比图</span></b><span style='font-size:
10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>
<h2 style='text-align:justify;text-justify:inter-ideograph'><span
style='font-family:"Times New Roman"'>3.2 </span><span lang=ZH-CN
style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"'>中值滤波</span><span
style='font-family:"Times New Roman"'><o:p></o:p></span></h2>
<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"'>(x,y)</span><span
lang=ZH-CN style='font-size:10.5pt'>为中心的小窗口内的所有象素的灰度按从大到小的顺序排列,将中间值作为</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>(x,y)</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"'>)</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>
<div>
<table border=0 cellspacing=0 cellpadding=0 style='mso-cellspacing:0cm;
mso-padding-alt:0cm 0cm 0cm 0cm'>
<tr>
<td width=276 valign=top style='width:207.0pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;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>
</td>
<td width=276 valign=top style='width:207.0pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;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>
</td>
</tr>
<tr>
<td width=276 valign=top style='width:207.0pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;line-height:18.0pt'><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
id="_x0000_i1044" type="#_x0000_t75" alt="" style='width:111.75pt;height:105.75pt'>
<v:imagedata src="./chp3.files/image016.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image035.gif"/>
</v:shape><![endif]--><![if !vml]><img width=149 height=141
src="./chp3.files/image016.gif" v:shapes="_x0000_i1044"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>
</td>
<td width=276 valign=top style='width:207.0pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;line-height:18.0pt'><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
id="_x0000_i1045" type="#_x0000_t75" alt="" style='width:78pt;height:105.75pt'>
<v:imagedata src="./chp3.files/image017.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image037.gif"/>
</v:shape><![endif]--><![if !vml]><img width=104 height=141
src="./chp3.files/image017.gif" v:shapes="_x0000_i1045"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>
</td>
</tr>
</table>
</div>
<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"'>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"'>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"'>3</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"'><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"'>3</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"'>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_i1046" type="#_x0000_t75"
alt="" style='width:63.75pt;height:30.75pt'>
<v:imagedata src="./chp3.files/image018.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image039.gif"/>
</v:shape><![endif]--><![if !vml]><img width=85 height=41
src="./chp3.files/image018.gif" v:shapes="_x0000_i1046"><![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_i1047" 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/image041.gif"/>
</v:shape><![endif]--><![if !vml]><img width=88 height=41
src="./chp3.files/image008.gif" v:shapes="_x0000_i1047"><![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"'><o:p></o:p></span></p>
<div>
<table border=0 cellspacing=0 cellpadding=0 style='mso-cellspacing:0cm;
mso-padding-alt:0cm 0cm 0cm 0cm'>
<tr>
<td width=141 valign=top style='width:105.75pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;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>
</td>
<td width=137 valign=top style='width:102.75pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;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"'><o:p></o:p></span></p>
</td>
<td width=137 valign=top style='width:102.75pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;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"'><o:p></o:p></span></p>
</td>
<td width=136 valign=top style='width:102.0pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;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>
</td>
</tr>
<tr>
<td width=141 style='width:105.75pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;line-height:18.0pt'><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
id="_x0000_i1048" type="#_x0000_t75" alt="" style='width:95.25pt;height:84pt'>
<v:imagedata src="./chp3.files/image019.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image043.gif"/>
</v:shape><![endif]--><![if !vml]><img width=127 height=112
src="./chp3.files/image019.gif" v:shapes="_x0000_i1048"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>
</td>
<td width=137 style='width:102.75pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;line-height:18.0pt'><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
id="_x0000_i1049" type="#_x0000_t75" alt="" style='width:78pt;height:116.25pt'>
<v:imagedata src="./chp3.files/image020.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image045.gif"/>
</v:shape><![endif]--><![if !vml]><img width=104 height=155
src="./chp3.files/image020.gif" v:shapes="_x0000_i1049"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>
</td>
<td width=137 style='width:102.75pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;line-height:18.0pt'><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
id="_x0000_i1050" type="#_x0000_t75" alt="" style='width:87.75pt;height:116.25pt'>
<v:imagedata src="./chp3.files/image021.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image047.gif"/>
</v:shape><![endif]--><![if !vml]><img width=117 height=155
src="./chp3.files/image021.gif" v:shapes="_x0000_i1050"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>
</td>
<td width=136 style='width:102.0pt;padding:0cm 0cm 0cm 0cm'>
<p align=center style='text-align:center;line-height:18.0pt'><sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><!--[if gte vml 1]><v:shape
id="_x0000_i1051" type="#_x0000_t75" alt="" style='width:63pt;height:84pt'>
<v:imagedata src="./chp3.files/image022.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap03.files/image049.gif"/>
</v:shape><![endif]--><![if !vml]><img width=84 height=112
src="./chp3.files/image022.gif" v:shapes="_x0000_i1051"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><o:p></o:p></span></p>
</td>
</tr>
</table>
</div>
<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -