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

📄 chp7.htm

📁 数字图象处理入门,非常好的书!!!!推荐!
💻 HTM
📖 第 1 页 / 共 5 页
字号:
style='font-size:10.5pt;font-family:"Times New Roman"'>7.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"'>Sobel</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>

<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"'>3</span><span
lang=ZH-CN style='font-size:10.5pt'>模板操作函数</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>TemplateOperation</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'><b><span style='font-size:10.5pt;
font-family:"Times New Roman"'>2.</span></b><b><span style='font-size:7.0pt;
font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</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>

<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"'>(</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"'>(LOG)</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 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"'>LOG</span><span
lang=ZH-CN style='font-size:10.5pt'>算子是</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>5</span><span lang=ZH-CN style='font-size:10.5pt'>×</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>5</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:140.25pt;height:90pt'>
 <v:imagedata src="./chp7.files/image015.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap07.files/image030.gif"/>
</v:shape><![endif]--><![if !vml]><img width=187 height=120
src="./chp7.files/image015.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"'>7.4</span><span
lang=ZH-CN style='font-size:10.5pt'>。是不是很象一顶墨西哥草帽?所以,</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>LOG</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_i1040" type="#_x0000_t75" alt="" style='width:201pt;height:111pt'>
 <v:imagedata src="./chp7.files/image016.jpg" o:href="http://www-scf.usc.edu/~flv/ipbook/chap07.files/image032.jpg"/>
</v:shape><![endif]--><![if !vml]><img width=268 height=148
src="./chp7.files/image016.jpg" v:shapes="_x0000_i1040"><![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"'>7.4&nbsp;&nbsp;&nbsp;&nbsp;
LOG</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>

<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"'>7.5</span><span
lang=ZH-CN style='font-size:10.5pt'>为图</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>7.1</span><span lang=ZH-CN style='font-size:
10.5pt'>用</span><span style='font-size:10.5pt;font-family:"Times New Roman"'>LOG</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_i1041" type="#_x0000_t75" alt="" style='width:227.25pt;height:2in'>
 <v:imagedata src="./chp7.files/image017.jpg" o:href="http://www-scf.usc.edu/~flv/ipbook/chap07.files/image034.jpg"/>
</v:shape><![endif]--><![if !vml]><img width=303 height=192
src="./chp7.files/image017.jpg" v:shapes="_x0000_i1041"><![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"'>7.5&nbsp;&nbsp;&nbsp;&nbsp;
</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"'>7.1</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"'>LOG</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>

<p style='margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:
inter-ideograph;line-height:18.0pt'><span style='font-size:10.5pt;font-family:
"Times New Roman"'>LOG</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"'>5</span><span
lang=ZH-CN style='font-size:10.5pt'>×</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>5</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>

<h2 style='text-align:justify;text-justify:inter-ideograph'><span
style='font-family:"Times New Roman"'>7.2 Hough</span><span lang=ZH-CN
style='font-family:黑体;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 style='font-size:10.5pt;font-family:
"Times New Roman"'>Hough</span><span lang=ZH-CN style='font-size:10.5pt'>变换用来在图象中查找直线。它的原理很简单:假设有一条与原点距离为</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>s</span><span
lang=ZH-CN style='font-size:10.5pt'>,方向角为θ的一条直线,如图</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>7.6</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 align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;
line-height:18.0pt'><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:174pt;height:133.5pt'>
 <v:imagedata src="./chp7.files/image018.jpg" o:href="http://www-scf.usc.edu/~flv/ipbook/chap07.files/image036.jpg"/>
</v:shape><![endif]--><![if !vml]><img width=232 height=178
src="./chp7.files/image018.jpg" v:shapes="_x0000_i1042"><![endif]><o:p></o:p></span></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"'>7.6&nbsp;&nbsp;&nbsp; </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"'>s</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>

<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 align=center style='margin:0cm;margin-bottom:.0001pt;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_i1043" type="#_x0000_t75" alt="" style='width:96pt;height:15.75pt'>
 <v:imagedata src="./chp7.files/image019.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap07.files/image038.gif"/>
</v:shape><![endif]--><![if !vml]><img width=128 height=21
src="./chp7.files/image019.gif" v:shapes="_x0000_i1043"><![endif]></span></sub><span
style='font-size:10.5pt;font-family:"Times New Roman"'><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"'>(7.1)<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"'>(</span><span
lang=ZH-CN style='font-size:10.5pt'>见图</span><span style='font-size:10.5pt;
font-family:"Times New Roman"'>7.7)</span><span lang=ZH-CN style='font-size:
10.5pt'>。找到直线的两个端点,在它们之间连一条红色的直线。为了看清效果,将结果描成粗线,如图</span><span
style='font-size:10.5pt;font-family:"Times New Roman"'>7.8</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 style='text-align:justify;text-justify:inter-ideograph;line-height:18.0pt'><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:179.25pt;height:144.75pt'>
   <v:imagedata src="./chp7.files/image020.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap07.files/image040.gif"/>
  </v:shape><![endif]--><![if !vml]><img width=239 height=193
  src="./chp7.files/image020.gif" v:shapes="_x0000_i1044"><![endif]><o:p></o:p></span></p>
  <p align=center style='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"'>7.7 </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>
  </td>
  <td width=276 valign=top style='width:207.0pt;padding:0cm 0cm 0cm 0cm'>
  <p style='text-align:justify;text-justify:inter-ideograph;line-height:18.0pt'><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:182.25pt;height:144.75pt'>
   <v:imagedata src="./chp7.files/image021.jpg" o:href="http://www-scf.usc.edu/~flv/ipbook/chap07.files/image042.jpg"/>
  </v:shape><![endif]--><![if !vml]><img width=243 height=193
  src="./chp7.files/image021.jpg" v:shapes="_x0000_i1045"><![endif]><o:p></o:p></span></p>
  <p align=center style='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"'>7.8 Hough</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>
  </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><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:93.75pt;height:21.75pt'>
 <v:imagedata src="./chp7.files/image022.gif" o:href="http://www-scf.usc.edu/~flv/ipbook/chap07.files/image044.gif"/>
</v:shape><![endif]--><![if !vml]><img width=125 height=29

⌨️ 快捷键说明

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