您的位置:首页 > 其它

[数字图像处理]频域滤波(2)--高通滤波器,带阻滤波器与陷波滤波器

2015-06-18 17:31 633 查看


1.高通滤波器

首先,对一副图像进行如下二维傅里叶变换。



我们将u=0和v=0带上式,我们可以得到如下式子。



根据上式,可以到F(0,0)的值是非常大的。这里,我们将F(0,0)称为直流分量,直流分量比其他的成分要大好几个数量级。所以,这也就是傅里叶谱为什么需要使用对数变换才能看清楚的原因。
这里,对于高通滤波器而言,由于直流分量被衰减,所以,所得到的图像的动态范围是非常狭窄的,也就造成了图像偏灰。进一步而言,保持直流(DC)分量,对别的部分进行增幅,可以增强图像的细节。这样的滤波器称为锐化滤波器。这一小节主要介绍高通滤波器与锐化滤波器。


1.1理想高通滤波器



这里的D0是滤波器的阻带半径,而D(u,v)是点到滤波器中央的距离。理想高通的滤波器的振幅特性如下所示。



用这个滤波器对图像进行处理,可得到如下所示的结果。我们可以看到,与理想的低通滤波器一样,所得到的图像有很明显的振铃现象。结果图像从视觉上来看,有些偏暗,这是因为图像的直流分量被滤掉的原因。




1.2巴特沃斯高通滤波器



同样的,巴特沃斯高通滤波器也可以通过改变次数n,对过度特性进行调整。过大的n会造成振铃现象。






1.3高斯高通滤波器



高斯滤波器的过度特性很好,所以不会发生振铃现象。






1.4 上述三种滤波器的实现Matlab代码

<a target=_blank id="L1" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">   1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">   2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">   3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">   4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">   5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">   6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">   7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">   8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">   9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;">  10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;">  11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;">  12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;">  13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;">  14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;">  15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;">  16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;">  17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;">  18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;">  19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;">  20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;">  21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;">  22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;">  23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;">  24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;">  25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;">  26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;">  27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;">  28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;">  29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;">  30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;">  31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;">  32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;">  33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;">  34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;">  35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;">  36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;">  37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;">  38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;">  39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;">  40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;">  41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;">  42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;">  43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;">  44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;">  45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;">  46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;">  47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;">  48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;">  49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;">  50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;">  51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;">  52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;">  53</a>
<a target=_blank id="L54" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;">  54</a>
<a target=_blank id="L55" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;">  55</a>
<a target=_blank id="L56" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;">  56</a>
<a target=_blank id="L57" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;">  57</a>
<a target=_blank id="L58" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;">  58</a>
<a target=_blank id="L59" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;">  59</a>
<a target=_blank id="L60" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;">  60</a>
<a target=_blank id="L61" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;">  61</a>
<a target=_blank id="L62" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;">  62</a>
<a target=_blank id="L63" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;">  63</a>
<a target=_blank id="L64" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;">  64</a>
<a target=_blank id="L65" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;">  65</a>
<a target=_blank id="L66" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;">  66</a>
<a target=_blank id="L67" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;">  67</a>
<a target=_blank id="L68" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;">  68</a>
<a target=_blank id="L69" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;">  69</a>
<a target=_blank id="L70" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;">  70</a>
<a target=_blank id="L71" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;">  71</a>
<a target=_blank id="L72" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;">  72</a>
<a target=_blank id="L73" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;">  73</a>
<a target=_blank id="L74" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;">  74</a>
<a target=_blank id="L75" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;">  75</a>
<a target=_blank id="L76" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;">  76</a>
<a target=_blank id="L77" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;">  77</a>
<a target=_blank id="L78" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;">  78</a>
<a target=_blank id="L79" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;">  79</a>
<a target=_blank id="L80" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;">  80</a>
<a target=_blank id="L81" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;">  81</a>
<a target=_blank id="L82" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;">  82</a>
<a target=_blank id="L83" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;">  83</a>
<a target=_blank id="L84" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;">  84</a>
<a target=_blank id="L85" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;">  85</a>
<a target=_blank id="L86" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;">  86</a>
<a target=_blank id="L87" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;">  87</a>
<a target=_blank id="L88" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;">  88</a>
<a target=_blank id="L89" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;">  89</a>
<a target=_blank id="L90" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;">  90</a>
<a target=_blank id="L91" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;">  91</a>
<a target=_blank id="L92" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;">  92</a>
<a target=_blank id="L93" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;">  93</a>
<a target=_blank id="L94" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;">  94</a>
<a target=_blank id="L95" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;">  95</a>
<a target=_blank id="L96" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;">  96</a>
<a target=_blank id="L97" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L97" rel="#L97" style="color: rgb(102, 102, 102); text-decoration: none;">  97</a>
<a target=_blank id="L98" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L98" rel="#L98" style="color: rgb(102, 102, 102); text-decoration: none;">  98</a>
<a target=_blank id="L99" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L99" rel="#L99" style="color: rgb(102, 102, 102); text-decoration: none;">  99</a>
<a target=_blank id="L100" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L100" rel="#L100" style="color: rgb(102, 102, 102); text-decoration: none;"> 100</a>
close all;clear all;
%% ---------Butterworth Highpass Filters (Fre. Domain)------------f = imread('characters_test_pattern.tif');f = mat2gray(f,[0 255]);
[M,N] = size(f);P = 2*M;Q = 2*N;fc = zeros(M,N);
for x = 1:1:M    for y = 1:1:N        fc(x,y) = f(x,y) * (-1)^(x+y);    endend
F = fft2(fc,P,Q);
H_1 = zeros(P,Q);H_2 = zeros(P,Q);
for x = (-P/2):1:(P/2)-1     for y = (-Q/2):1:(Q/2)-1        D = (x^2 + y^2)^(0.5);        D_0 = 100;        H_1(x+(P/2)+1,y+(Q/2)+1) = 1/(1+(D_0/D)^2);           H_2(x+(P/2)+1,y+(Q/2)+1) = 1/(1+(D_0/D)^6);     endend

G_1 = H_1 .* F;G_2 = H_2 .* F;
g_1 = real(ifft2(G_1));g_1 = g_1(1:1:M,1:1:N);
g_2 = real(ifft2(G_2));g_2 = g_2(1:1:M,1:1:N);
for x = 1:1:M    for y = 1:1:N        g_1(x,y) = g_1(x,y) * (-1)^(x+y);        g_2(x,y) = g_2(x,y) * (-1)^(x+y);    endend
%% -----show-------figure();subplot(1,2,1);imshow(f,[0 1]);xlabel('a).Original Image');
subplot(1,2,2);imshow(log(1 + abs(F)),[ ]);xlabel('b).Fourier spectrum of a');
figure();subplot(1,2,1);imshow(H_1,[0 1]);xlabel('c)Butterworth Lowpass (D_{0}=100,n=1)');
subplot(1,2,2);h = mesh(1:20:P,1:20:Q,H_1(1:20:P,1:20:Q));set(h,'EdgeColor','k');axis([0 P 0 Q 0 1]);xlabel('u');ylabel('v');zlabel('|H(u,v)|');
figure();subplot(1,2,1);imshow(log(1 + abs(G_1)),[ ]);xlabel('d).Result of filtering using c');
subplot(1,2,2);imshow(g_1,[0 1]);xlabel('e).Result image');
figure();subplot(1,2,1);imshow(H_2,[0 1]);xlabel('f).Butterworth Lowpass (D_{0}=100,n=3)');
subplot(1,2,2);h = mesh(1:20:P,1:20:Q,H_2(1:20:P,1:20:Q));set(h,'EdgeColor','k');axis([0 P 0 Q 0 1]);xlabel('u');ylabel('v');zlabel('|H(u,v)|');
figure();subplot(1,2,1);imshow(log(1 + abs(G_2)),[ ]);xlabel('g).Result of filtering using e');
subplot(1,2,2);imshow(g_2,[0 1]);xlabel('h).Result image');



来自CODE的代码片
Butterworth_Highpass_Filters.m


<a target=_blank id="L1" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">   1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">   2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">   3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">   4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">   5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">   6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">   7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">   8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">   9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;">  10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;">  11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;">  12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;">  13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;">  14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;">  15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;">  16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;">  17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;">  18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;">  19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;">  20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;">  21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;">  22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;">  23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;">  24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;">  25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;">  26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;">  27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;">  28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;">  29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;">  30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;">  31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;">  32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;">  33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;">  34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;">  35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;">  36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;">  37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;">  38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;">  39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;">  40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;">  41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;">  42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;">  43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;">  44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;">  45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;">  46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;">  47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;">  48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;">  49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;">  50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;">  51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;">  52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;">  53</a>
<a target=_blank id="L54" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;">  54</a>
<a target=_blank id="L55" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;">  55</a>
<a target=_blank id="L56" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;">  56</a>
<a target=_blank id="L57" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;">  57</a>
<a target=_blank id="L58" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;">  58</a>
<a target=_blank id="L59" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;">  59</a>
<a target=_blank id="L60" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;">  60</a>
<a target=_blank id="L61" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;">  61</a>
<a target=_blank id="L62" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;">  62</a>
<a target=_blank id="L63" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;">  63</a>
<a target=_blank id="L64" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;">  64</a>
<a target=_blank id="L65" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;">  65</a>
<a target=_blank id="L66" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;">  66</a>
<a target=_blank id="L67" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;">  67</a>
<a target=_blank id="L68" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;">  68</a>
<a target=_blank id="L69" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;">  69</a>
<a target=_blank id="L70" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;">  70</a>
<a target=_blank id="L71" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;">  71</a>
<a target=_blank id="L72" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;">  72</a>
<a target=_blank id="L73" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;">  73</a>
<a target=_blank id="L74" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;">  74</a>
<a target=_blank id="L75" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;">  75</a>
<a target=_blank id="L76" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;">  76</a>
<a target=_blank id="L77" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;">  77</a>
<a target=_blank id="L78" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;">  78</a>
<a target=_blank id="L79" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;">  79</a>
<a target=_blank id="L80" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;">  80</a>
<a target=_blank id="L81" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;">  81</a>
<a target=_blank id="L82" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;">  82</a>
<a target=_blank id="L83" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;">  83</a>
<a target=_blank id="L84" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;">  84</a>
<a target=_blank id="L85" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;">  85</a>
<a target=_blank id="L86" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;">  86</a>
<a target=_blank id="L87" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;">  87</a>
<a target=_blank id="L88" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;">  88</a>
<a target=_blank id="L89" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;">  89</a>
<a target=_blank id="L90" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;">  90</a>
<a target=_blank id="L91" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;">  91</a>
<a target=_blank id="L92" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;">  92</a>
<a target=_blank id="L93" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;">  93</a>
<a target=_blank id="L94" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;">  94</a>
<a target=_blank id="L95" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;">  95</a>
<a target=_blank id="L96" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;">  96</a>
<a target=_blank id="L97" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L97" rel="#L97" style="color: rgb(102, 102, 102); text-decoration: none;">  97</a>
<a target=_blank id="L98" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L98" rel="#L98" style="color: rgb(102, 102, 102); text-decoration: none;">  98</a>
<a target=_blank id="L99" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L99" rel="#L99" style="color: rgb(102, 102, 102); text-decoration: none;">  99</a>
<a target=_blank id="L100" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L100" rel="#L100" style="color: rgb(102, 102, 102); text-decoration: none;"> 100</a>
<a target=_blank id="L101" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L101" rel="#L101" style="color: rgb(102, 102, 102); text-decoration: none;"> 101</a>
close all;clear all;
%% ---------Gaussian Highpass Filters (Fre. Domain)------------f = imread('characters_test_pattern.tif');f = mat2gray(f,[0 255]);
[M,N] = size(f);P = 2*M;Q = 2*N;fc = zeros(M,N);
for x = 1:1:M    for y = 1:1:N        fc(x,y) = f(x,y) * (-1)^(x+y);    endend
F = fft2(fc,P,Q);
H_1 = zeros(P,Q);H_2 = zeros(P,Q);
for x = (-P/2):1:(P/2)-1     for y = (-Q/2):1:(Q/2)-1        D = (x^2 + y^2)^(0.5);        D_0 = 60;        H_1(x+(P/2)+1,y+(Q/2)+1) = 1 - exp(-(D*D)/(2*D_0*D_0));           D_0 = 160;        H_2(x+(P/2)+1,y+(Q/2)+1) = 1 - exp(-(D*D)/(2*D_0*D_0));     endend
G_1 = H_1 .* F;G_2 = H_2 .* F;
g_1 = real(ifft2(G_1));g_1 = g_1(1:1:M,1:1:N);
g_2 = real(ifft2(G_2));g_2 = g_2(1:1:M,1:1:N);
for x = 1:1:M    for y = 1:1:N        g_1(x,y) = g_1(x,y) * (-1)^(x+y);        g_2(x,y) = g_2(x,y) * (-1)^(x+y);    endend

%% -----show-------figure();subplot(1,2,1);imshow(f,[0 1]);xlabel('a).Original Image');
subplot(1,2,2);imshow(log(1 + abs(F)),[ ]);xlabel('b).Fourier spectrum of a');
figure();subplot(1,2,1);imshow(H_1,[0 1]);xlabel('c)Gaussian Highpass (D_{0}=60)');
subplot(1,2,2);h = mesh(1:20:P,1:20:Q,H_1(1:20:P,1:20:Q));set(h,'EdgeColor','k');axis([0 P 0 Q 0 1]);xlabel('u');ylabel('v');zlabel('|H(u,v)|');
figure();subplot(1,2,1);imshow(log(1 + abs(G_1)),[ ]);xlabel('d).Result of filtering using c');
subplot(1,2,2);imshow(g_1,[0 1]);xlabel('e).Result image');
figure();subplot(1,2,1);imshow(H_2,[0 1]);xlabel('f).Gaussian Highpass (D_{0}=160)');
subplot(1,2,2);h = mesh(1:20:P,1:20:Q,H_2(1:20:P,1:20:Q));set(h,'EdgeColor','k');axis([0 P 0 Q 0 1]);xlabel('u');ylabel('v');zlabel('|H(u,v)|');
figure();subplot(1,2,1);imshow(log(1 + abs(G_2)),[ ]);xlabel('g).Result of filtering using e');
subplot(1,2,2);imshow(g_2,[0 1]);xlabel('h).Result image');



来自CODE的代码片
Gaussian_Highpass_Filters.m


<a target=_blank id="L1" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a>
<a target=_blank id="L54" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a>
<a target=_blank id="L55" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a>
<a target=_blank id="L56" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a>
<a target=_blank id="L57" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a>
<a target=_blank id="L58" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a>
<a target=_blank id="L59" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a>
<a target=_blank id="L60" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a>
<a target=_blank id="L61" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a>
<a target=_blank id="L62" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;"> 62</a>
<a target=_blank id="L63" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;"> 63</a>
<a target=_blank id="L64" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;"> 64</a>
<a target=_blank id="L65" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;"> 65</a>
<a target=_blank id="L66" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;"> 66</a>
<a target=_blank id="L67" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;"> 67</a>
<a target=_blank id="L68" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;"> 68</a>
<a target=_blank id="L69" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;"> 69</a>
<a target=_blank id="L70" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;"> 70</a>
<a target=_blank id="L71" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;"> 71</a>
<a target=_blank id="L72" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;"> 72</a>
<a target=_blank id="L73" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;"> 73</a>
<a target=_blank id="L74" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;"> 74</a>
<a target=_blank id="L75" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;"> 75</a>
<a target=_blank id="L76" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;"> 76</a>
<a target=_blank id="L77" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;"> 77</a>
<a target=_blank id="L78" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;"> 78</a>
<a target=_blank id="L79" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;"> 79</a>
<a target=_blank id="L80" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;"> 80</a>
<a target=_blank id="L81" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;"> 81</a>
<a target=_blank id="L82" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;"> 82</a>
<a target=_blank id="L83" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;"> 83</a>
<a target=_blank id="L84" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;"> 84</a>
<a target=_blank id="L85" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;"> 85</a>
<a target=_blank id="L86" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;"> 86</a>
<a target=_blank id="L87" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;"> 87</a>
<a target=_blank id="L88" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;"> 88</a>
<a target=_blank id="L89" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;"> 89</a>
<a target=_blank id="L90" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;"> 90</a>
<a target=_blank id="L91" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;"> 91</a>
<a target=_blank id="L92" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;"> 92</a>
<a target=_blank id="L93" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;"> 93</a>
<a target=_blank id="L94" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;"> 94</a>
<a target=_blank id="L95" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;"> 95</a>
<a target=_blank id="L96" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;"> 96</a>
<a target=_blank id="L97" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L97" rel="#L97" style="color: rgb(102, 102, 102); text-decoration: none;"> 97</a>
close all;clear all;
%% ---------Ideal Highpass Filters (Fre. Domain)------------f = imread('characters_test_pattern.tif');f = mat2gray(f,[0 255]);
[M,N] = size(f);P = 2*M;Q = 2*N;fc = zeros(M,N);
for x = 1:1:M    for y = 1:1:N        fc(x,y) = f(x,y) * (-1)^(x+y);    endend
F = fft2(fc,P,Q);
H_1 = ones(P,Q);H_2 = ones(P,Q);
for x = (-P/2):1:(P/2)-1     for y = (-Q/2):1:(Q/2)-1        D = (x^2 + y^2)^(0.5);        if(D <= 60)  H_1(x+(P/2)+1,y+(Q/2)+1) = 0; end            if(D <= 160) H_2(x+(P/2)+1,y+(Q/2)+1) = 0; end     endend
G_1 = H_1 .* F;G_2 = H_2 .* F;
g_1 = real(ifft2(G_1));g_1 = g_1(1:1:M,1:1:N);
g_2 = real(ifft2(G_2));g_2 = g_2(1:1:M,1:1:N);
for x = 1:1:M    for y = 1:1:N        g_1(x,y) = g_1(x,y) * (-1)^(x+y);        g_2(x,y) = g_2(x,y) * (-1)^(x+y);    endend%% -----show-------figure();subplot(1,2,1);imshow(f,[0 1]);xlabel('a).Original Image');
subplot(1,2,2);imshow(log(1 + abs(F)),[ ]);xlabel('b).Fourier spectrum of a');
figure();subplot(1,2,1);imshow(H_1,[0 1]);xlabel('c).Ideal Highpass filter(D=60)');
subplot(1,2,2);h = mesh(1:20:P,1:20:Q,H_1(1:20:P,1:20:Q));set(h,'EdgeColor','k');axis([0 P 0 Q 0 1]);xlabel('u');ylabel('v');zlabel('|H(u,v)|');
figure();subplot(1,2,1);imshow(log(1 + abs(G_1)),[ ]);xlabel('d).Result of filtering using c');
subplot(1,2,2);imshow(g_1,[0 1]);xlabel('e).Result image');
figure();subplot(1,2,1);imshow(H_2,[0 1]);xlabel('f).Ideal Highpass filter(D=160)');
subplot(1,2,2);h = mesh(1:20:P,1:20:Q,H_2(1:20:P,1:20:Q));set(h,'EdgeColor','k');axis([0 P 0 Q 0 1]);xlabel('u');ylabel('v');zlabel('|H(u,v)|');
figure();subplot(1,2,1);imshow(log(1 + abs(G_2)),[ ]);xlabel('g).Result of filtering using e');
subplot(1,2,2);imshow(g_2,[0 1]);xlabel('h).Result image');



来自CODE的代码片
Ideal_Highpass.m



1.5 锐化滤波器

按照之前所说的,锐化滤波器是将傅里叶谱的直流分量保留,然后将其余的成分增幅。使用锐化滤波器,可以对图像的细节进行增强,使得细节凸显出来。锐化滤波器的表达式如下所示。



其实上式的目的很明显,就是先将原图的傅里叶谱

保留下来,然后叠加上高通滤波器的结果

,所得到的图像就是锐化后的图像了。这里为了调整锐化程度,引入了两个变量





可以调整直流分量的衰减程度,

可以调整高频分量的增幅程度。





下面是代码。

<a target=_blank id="L1" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a>
<a target=_blank id="L54" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a>
<a target=_blank id="L55" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a>
<a target=_blank id="L56" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a>
<a target=_blank id="L57" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a>
<a target=_blank id="L58" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a>
<a target=_blank id="L59" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a>
<a target=_blank id="L60" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a>
<a target=_blank id="L61" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a>
<a target=_blank id="L62" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;"> 62</a>
<a target=_blank id="L63" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;"> 63</a>
<a target=_blank id="L64" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;"> 64</a>
<a target=_blank id="L65" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;"> 65</a>
<a target=_blank id="L66" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;"> 66</a>
<a target=_blank id="L67" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;"> 67</a>
<a target=_blank id="L68" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;"> 68</a>
<a target=_blank id="L69" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;"> 69</a>
<a target=_blank id="L70" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;"> 70</a>
<a target=_blank id="L71" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;"> 71</a>
<a target=_blank id="L72" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;"> 72</a>
<a target=_blank id="L73" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;"> 73</a>
<a target=_blank id="L74" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;"> 74</a>
<a target=_blank id="L75" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;"> 75</a>
<a target=_blank id="L76" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;"> 76</a>
<a target=_blank id="L77" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;"> 77</a>
<a target=_blank id="L78" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;"> 78</a>
close all;clear all;clc;
%% ---------The High-Fre-Emphasis Filters (Fre. Domain)------------f = imread('blurry_moon.tif');f = mat2gray(f,[0 255]);
[M,N] = size(f); P = 2*M;Q = 2*N;fc = zeros(M,N);
for x = 1:1:M    for y = 1:1:N        fc(x,y) = f(x,y) * (-1)^(x+y);    endend
F = fft2(fc,P,Q);
H_HP = zeros(P,Q);
for x = (-P/2):1:(P/2)-1     for y = (-Q/2):1:(Q/2)-1        D = (x^2 + y^2)^(0.5);        D_0 = 80;        H_HP(x+(P/2)+1,y+(Q/2)+1) = 1 - exp(-(D*D)/(2*D_0*D_0));        endend
G_HP = H_HP .* F;
G_HFE = (1 + 1.1 * H_HP) .* F;
g_1 = real(ifft2(G_HP));g_1 = g_1(1:1:M,1:1:N);
g_2 = real(ifft2(G_HFE));g_2 = g_2(1:1:M,1:1:N);
for x = 1:1:M    for y = 1:1:N        g_1(x,y) = g_1(x,y) * (-1)^(x+y);        g_2(x,y) = g_2(x,y) * (-1)^(x+y);    endend
g = histeq(g_2);
%g_1 = mat2gray(g_1);%% -----show-------figure();subplot(1,2,1);imshow(f,[0 1]);xlabel('a).Original Image');
subplot(1,2,2);imshow(log(1 + abs(F)),[ ]);xlabel('b).Fourier spectrum of a');
figure();subplot(1,2,1);imshow(g_1,[0 1]);xlabel('c).Result image of High-pass Filter');
subplot(1,2,2);imshow(log(1 + abs(G_HP)),[ ]);xlabel('d).Result of filtering using e');
figure();subplot(1,2,1);imshow(g_2,[0 1]);xlabel('e).Result image of High-Fre-Emphasis Filter');
subplot(1,2,2);imshow(log(1 + abs(G_HFE)),[ ]);xlabel('f).Result of filtering using e');



来自CODE的代码片
High-Fre-Emphasis_Filters.m



2.带阻滤波器

同样的,带阻滤波器也有三种特性。高斯、巴特沃斯和理想,三种类型,其数学表达式如下所示。



其带通滤波器可以使用上面的表格转化而得。



带阻滤波器可以用于去除周期性噪声,为了体现带阻滤波器的特性,我们先对一幅图像增加很严重的噪声。





在原图的傅里叶谱上添加了几个很明显的亮点。在对其做IDFT,可以看到,原图被严重的周期噪声污染了。此时,我们可以使用带阻滤波器,可以有很好的去噪效果。为了避免振铃现象,选择使用如下所示巴特沃斯带阻滤波器,所用滤波器的次数为2次。使用空间域的操作,要去除这种噪声基本是不可能的,这也是频域内的操作的优点。





<a target=_blank id="L1" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">   1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">   2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">   3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">   4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">   5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">   6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">   7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">   8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">   9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;">  10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;">  11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;">  12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;">  13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;">  14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;">  15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;">  16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;">  17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;">  18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;">  19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;">  20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;">  21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;">  22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;">  23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;">  24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;">  25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;">  26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;">  27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;">  28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;">  29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;">  30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;">  31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;">  32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;">  33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;">  34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;">  35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;">  36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;">  37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;">  38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;">  39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;">  40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;">  41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;">  42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;">  43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;">  44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;">  45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;">  46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;">  47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;">  48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;">  49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;">  50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;">  51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;">  52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;">  53</a>
<a target=_blank id="L54" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;">  54</a>
<a target=_blank id="L55" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;">  55</a>
<a target=_blank id="L56" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;">  56</a>
<a target=_blank id="L57" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;">  57</a>
<a target=_blank id="L58" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;">  58</a>
<a target=_blank id="L59" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;">  59</a>
<a target=_blank id="L60" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;">  60</a>
<a target=_blank id="L61" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;">  61</a>
<a target=_blank id="L62" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;">  62</a>
<a target=_blank id="L63" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;">  63</a>
<a target=_blank id="L64" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;">  64</a>
<a target=_blank id="L65" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;">  65</a>
<a target=_blank id="L66" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;">  66</a>
<a target=_blank id="L67" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;">  67</a>
<a target=_blank id="L68" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;">  68</a>
<a target=_blank id="L69" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;">  69</a>
<a target=_blank id="L70" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;">  70</a>
<a target=_blank id="L71" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;">  71</a>
<a target=_blank id="L72" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;">  72</a>
<a target=_blank id="L73" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;">  73</a>
<a target=_blank id="L74" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;">  74</a>
<a target=_blank id="L75" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;">  75</a>
<a target=_blank id="L76" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;">  76</a>
<a target=_blank id="L77" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;">  77</a>
<a target=_blank id="L78" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;">  78</a>
<a target=_blank id="L79" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;">  79</a>
<a target=_blank id="L80" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;">  80</a>
<a target=_blank id="L81" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;">  81</a>
<a target=_blank id="L82" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;">  82</a>
<a target=_blank id="L83" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;">  83</a>
<a target=_blank id="L84" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;">  84</a>
<a target=_blank id="L85" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;">  85</a>
<a target=_blank id="L86" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;">  86</a>
<a target=_blank id="L87" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;">  87</a>
<a target=_blank id="L88" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;">  88</a>
<a target=_blank id="L89" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;">  89</a>
<a target=_blank id="L90" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;">  90</a>
<a target=_blank id="L91" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;">  91</a>
<a target=_blank id="L92" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;">  92</a>
<a target=_blank id="L93" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;">  93</a>
<a target=_blank id="L94" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;">  94</a>
<a target=_blank id="L95" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;">  95</a>
<a target=_blank id="L96" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;">  96</a>
<a target=_blank id="L97" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L97" rel="#L97" style="color: rgb(102, 102, 102); text-decoration: none;">  97</a>
<a target=_blank id="L98" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L98" rel="#L98" style="color: rgb(102, 102, 102); text-decoration: none;">  98</a>
<a target=_blank id="L99" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L99" rel="#L99" style="color: rgb(102, 102, 102); text-decoration: none;">  99</a>
<a target=_blank id="L100" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L100" rel="#L100" style="color: rgb(102, 102, 102); text-decoration: none;"> 100</a>
<a target=_blank id="L101" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L101" rel="#L101" style="color: rgb(102, 102, 102); text-decoration: none;"> 101</a>
<a target=_blank id="L102" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L102" rel="#L102" style="color: rgb(102, 102, 102); text-decoration: none;"> 102</a>
<a target=_blank id="L103" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L103" rel="#L103" style="color: rgb(102, 102, 102); text-decoration: none;"> 103</a>
<a target=_blank id="L104" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L104" rel="#L104" style="color: rgb(102, 102, 102); text-decoration: none;"> 104</a>
<a target=_blank id="L105" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L105" rel="#L105" style="color: rgb(102, 102, 102); text-decoration: none;"> 105</a>
<a target=_blank id="L106" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L106" rel="#L106" style="color: rgb(102, 102, 102); text-decoration: none;"> 106</a>
<a target=_blank id="L107" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L107" rel="#L107" style="color: rgb(102, 102, 102); text-decoration: none;"> 107</a>
<a target=_blank id="L108" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L108" rel="#L108" style="color: rgb(102, 102, 102); text-decoration: none;"> 108</a>
<a target=_blank id="L109" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L109" rel="#L109" style="color: rgb(102, 102, 102); text-decoration: none;"> 109</a>
<a target=_blank id="L110" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L110" rel="#L110" style="color: rgb(102, 102, 102); text-decoration: none;"> 110</a>
<a target=_blank id="L111" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L111" rel="#L111" style="color: rgb(102, 102, 102); text-decoration: none;"> 111</a>
<a target=_blank id="L112" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L112" rel="#L112" style="color: rgb(102, 102, 102); text-decoration: none;"> 112</a>
<a target=_blank id="L113" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L113" rel="#L113" style="color: rgb(102, 102, 102); text-decoration: none;"> 113</a>
<a target=_blank id="L114" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L114" rel="#L114" style="color: rgb(102, 102, 102); text-decoration: none;"> 114</a>
<a target=_blank id="L115" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L115" rel="#L115" style="color: rgb(102, 102, 102); text-decoration: none;"> 115</a>
<a target=_blank id="L116" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L116" rel="#L116" style="color: rgb(102, 102, 102); text-decoration: none;"> 116</a>
<a target=_blank id="L117" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L117" rel="#L117" style="color: rgb(102, 102, 102); text-decoration: none;"> 117</a>
<a target=_blank id="L118" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L118" rel="#L118" style="color: rgb(102, 102, 102); text-decoration: none;"> 118</a>
<a target=_blank id="L119" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L119" rel="#L119" style="color: rgb(102, 102, 102); text-decoration: none;"> 119</a>
<a target=_blank id="L120" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L120" rel="#L120" style="color: rgb(102, 102, 102); text-decoration: none;"> 120</a>
<a target=_blank id="L121" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L121" rel="#L121" style="color: rgb(102, 102, 102); text-decoration: none;"> 121</a>
<a target=_blank id="L122" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L122" rel="#L122" style="color: rgb(102, 102, 102); text-decoration: none;"> 122</a>
<a target=_blank id="L123" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L123" rel="#L123" style="color: rgb(102, 102, 102); text-decoration: none;"> 123</a>
<a target=_blank id="L124" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L124" rel="#L124" style="color: rgb(102, 102, 102); text-decoration: none;"> 124</a>
<a target=_blank id="L125" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L125" rel="#L125" style="color: rgb(102, 102, 102); text-decoration: none;"> 125</a>
<a target=_blank id="L126" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L126" rel="#L126" style="color: rgb(102, 102, 102); text-decoration: none;"> 126</a>
<a target=_blank id="L127" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L127" rel="#L127" style="color: rgb(102, 102, 102); text-decoration: none;"> 127</a>
<a target=_blank id="L128" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L128" rel="#L128" style="color: rgb(102, 102, 102); text-decoration: none;"> 128</a>
<a target=_blank id="L129" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L129" rel="#L129" style="color: rgb(102, 102, 102); text-decoration: none;"> 129</a>
<a target=_blank id="L130" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L130" rel="#L130" style="color: rgb(102, 102, 102); text-decoration: none;"> 130</a>
<a target=_blank id="L131" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L131" rel="#L131" style="color: rgb(102, 102, 102); text-decoration: none;"> 131</a>
<a target=_blank id="L132" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L132" rel="#L132" style="color: rgb(102, 102, 102); text-decoration: none;"> 132</a>
<a target=_blank id="L133" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L133" rel="#L133" style="color: rgb(102, 102, 102); text-decoration: none;"> 133</a>
<a target=_blank id="L134" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L134" rel="#L134" style="color: rgb(102, 102, 102); text-decoration: none;"> 134</a>
close all;clear all;clc;%% ---------------------Add Noise-------------------------f = imread('left.tif');f = mat2gray(f,[0 255]);
[M,N] = size(f);P = 2*M;Q = 2*N;fc = zeros(M,N);
for x = 1:1:M    for y = 1:1:N        fc(x,y) = f(x,y) * (-1)^(x+y);    endend
F = fft2(fc,P,Q);
H_NP = ones(P,Q);
for x = (-P/2):1:(P/2)-1     for y = (-Q/2):1:(Q/2)-1        D = 2;                v_k = -200; u_k = 150;        D_k = ((x+u_k)^2 + (y+v_k)^2)^(0.5);        H_NP(x+(P/2)+1,y+(Q/2)+1) = H_NP(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);        D_k = ((x-u_k)^2 + (y-v_k)^2)^(0.5);        H_NP(x+(P/2)+1,y+(Q/2)+1) = H_NP(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);                v_k = 200; u_k = 150;        D_k = ((x+u_k)^2 + (y+v_k)^2)^(0.5);        H_NP(x+(P/2)+1,y+(Q/2)+1) = H_NP(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);        D_k = ((x-u_k)^2 + (y-v_k)^2)^(0.5);        H_NP(x+(P/2)+1,y+(Q/2)+1) = H_NP(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);                v_k = 0; u_k = 250;        D_k = ((x+u_k)^2 + (y+v_k)^2)^(0.5);        H_NP(x+(P/2)+1,y+(Q/2)+1) = H_NP(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);        D_k = ((x-u_k)^2 + (y-v_k)^2)^(0.5);        H_NP(x+(P/2)+1,y+(Q/2)+1) = H_NP(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);                v_k = 250; u_k = 0;        D_k = ((x+u_k)^2 + (y+v_k)^2)^(0.5);        H_NP(x+(P/2)+1,y+(Q/2)+1) = H_NP(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);        D_k = ((x-u_k)^2 + (y-v_k)^2)^(0.5);        H_NP(x+(P/2)+1,y+(Q/2)+1) = H_NP(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);                        H_NP(x+(P/2)+1,y+(Q/2)+1) = 1 + 700*(1 - H_NP(x+(P/2)+1,y+(Q/2)+1));     endend
G_Noise = F .* H_NP;
g_noise = real(ifft2(G_Noise));g_noise = g_noise(1:1:M,1:1:N);
for x = 1:1:M    for y = 1:1:N        g_noise(x,y) = g_noise(x,y) * (-1)^(x+y);    endend

%% ---------Bondpass Filters (Fre. Domain)------------H_1 = ones(P,Q);
for x = (-P/2):1:(P/2)-1     for y = (-Q/2):1:(Q/2)-1        D = (x^2 + y^2)^(0.5);        D_0 = 250;        W = 30;        H_1(x+(P/2)+1,y+(Q/2)+1) = 1/(1+((D*W)/((D*D) - (D_0*D_0)))^6);        endend
G_1 = H_1 .* G_Noise;
g_1 = real(ifft2(G_1));g_1 = g_1(1:1:M,1:1:N);
for x = 1:1:M    for y = 1:1:N        g_1(x,y) = g_1(x,y) * (-1)^(x+y);    endend
%% -----show-------close all;
figure();subplot(1,2,1);imshow(f,[0 1]);xlabel('a).Original Image');
subplot(1,2,2);imshow(log(1 + abs(F)),[ ]);xlabel('b).Fourier spectrum of a');

figure();subplot(1,2,2);imshow(log(1 + abs(G_Noise)),[ ]);xlabel('c).Fourier spectrum of b');
subplot(1,2,1);imshow(g_noise,[0 1]);xlabel('b).Result of add noise');

figure();subplot(1,2,1);imshow(H_1,[0 1]);xlabel('d).Butterworth Bandpass filter(D=355 W=40 n =2)');
subplot(1,2,2);h = mesh(1:20:Q,1:20:P,H_1(1:20:P,1:20:Q));set(h,'EdgeColor','k');axis([0 Q 0 P 0 1]);xlabel('u');ylabel('v');zlabel('|H(u,v)|');

figure();subplot(1,2,2);imshow(log(1 + abs(G_1)),[ ]);xlabel('e).Fourier spectrum of f');
subplot(1,2,1);imshow(g_1,[0 1]);xlabel('f).Result of denoise');



来自CODE的代码片
Butterworth_Boundpass.m


3.陷波滤波器(Notch Filter)

陷波滤波器也用于去除周期噪声,虽然带阻滤波器也能可以去除周期噪声,但是带阻滤波器对噪声以外的成分也有衰减。而陷波滤波器主要对,某个点进行衰减,对其余的成分不损失。使用下图将更容易理解。



从空间域内看,图像存在着周期性噪声。其傅里叶频谱中,也能看到噪声的所在之处(这里我用红圈标注出来了,他们不是数据的一部分)。我们如果使用带阻滤波器的话,是非常麻烦的,也会使得图像有损失。陷波滤波器,能够直接对噪声处进行衰减,可以有很好的去噪效果。
其表达式如下所示,陷波滤波器可以通过对高通滤波器的中心,进行位移就可以得到了。



这里,由于傅里叶的周期性,傅里叶频谱上不可能单独存在一个点的噪声,必定是关于远点对称的一个噪声对。这里的



需要去除的噪声点,其求取的方式如下所示。



针对于上图,我们设计如下滤波器,去进行去噪。



(图片下标错了,后续更新改过来!)

所得到的结果,如下所示。噪声已经被去除了,画质得到了很大的改善。



(图片下标错了,后续更新改过来!)

<a target=_blank id="L1" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a>
<a target=_blank id="L54" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a>
<a target=_blank id="L55" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a>
<a target=_blank id="L56" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a>
<a target=_blank id="L57" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a>
<a target=_blank id="L58" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a>
<a target=_blank id="L59" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a>
<a target=_blank id="L60" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a>
<a target=_blank id="L61" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a>
<a target=_blank id="L62" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;"> 62</a>
<a target=_blank id="L63" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;"> 63</a>
<a target=_blank id="L64" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;"> 64</a>
<a target=_blank id="L65" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;"> 65</a>
<a target=_blank id="L66" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;"> 66</a>
<a target=_blank id="L67" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;"> 67</a>
<a target=_blank id="L68" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;"> 68</a>
<a target=_blank id="L69" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;"> 69</a>
<a target=_blank id="L70" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;"> 70</a>
<a target=_blank id="L71" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;"> 71</a>
<a target=_blank id="L72" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;"> 72</a>
<a target=_blank id="L73" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;"> 73</a>
<a target=_blank id="L74" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L74" rel="#L74" style="color: rgb(102, 102, 102); text-decoration: none;"> 74</a>
<a target=_blank id="L75" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L75" rel="#L75" style="color: rgb(102, 102, 102); text-decoration: none;"> 75</a>
<a target=_blank id="L76" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L76" rel="#L76" style="color: rgb(102, 102, 102); text-decoration: none;"> 76</a>
<a target=_blank id="L77" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L77" rel="#L77" style="color: rgb(102, 102, 102); text-decoration: none;"> 77</a>
<a target=_blank id="L78" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L78" rel="#L78" style="color: rgb(102, 102, 102); text-decoration: none;"> 78</a>
<a target=_blank id="L79" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L79" rel="#L79" style="color: rgb(102, 102, 102); text-decoration: none;"> 79</a>
<a target=_blank id="L80" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L80" rel="#L80" style="color: rgb(102, 102, 102); text-decoration: none;"> 80</a>
<a target=_blank id="L81" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L81" rel="#L81" style="color: rgb(102, 102, 102); text-decoration: none;"> 81</a>
<a target=_blank id="L82" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L82" rel="#L82" style="color: rgb(102, 102, 102); text-decoration: none;"> 82</a>
<a target=_blank id="L83" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L83" rel="#L83" style="color: rgb(102, 102, 102); text-decoration: none;"> 83</a>
<a target=_blank id="L84" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L84" rel="#L84" style="color: rgb(102, 102, 102); text-decoration: none;"> 84</a>
<a target=_blank id="L85" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L85" rel="#L85" style="color: rgb(102, 102, 102); text-decoration: none;"> 85</a>
<a target=_blank id="L86" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L86" rel="#L86" style="color: rgb(102, 102, 102); text-decoration: none;"> 86</a>
<a target=_blank id="L87" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L87" rel="#L87" style="color: rgb(102, 102, 102); text-decoration: none;"> 87</a>
<a target=_blank id="L88" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L88" rel="#L88" style="color: rgb(102, 102, 102); text-decoration: none;"> 88</a>
<a target=_blank id="L89" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L89" rel="#L89" style="color: rgb(102, 102, 102); text-decoration: none;"> 89</a>
<a target=_blank id="L90" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L90" rel="#L90" style="color: rgb(102, 102, 102); text-decoration: none;"> 90</a>
<a target=_blank id="L91" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L91" rel="#L91" style="color: rgb(102, 102, 102); text-decoration: none;"> 91</a>
<a target=_blank id="L92" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L92" rel="#L92" style="color: rgb(102, 102, 102); text-decoration: none;"> 92</a>
<a target=_blank id="L93" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L93" rel="#L93" style="color: rgb(102, 102, 102); text-decoration: none;"> 93</a>
<a target=_blank id="L94" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L94" rel="#L94" style="color: rgb(102, 102, 102); text-decoration: none;"> 94</a>
<a target=_blank id="L95" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L95" rel="#L95" style="color: rgb(102, 102, 102); text-decoration: none;"> 95</a>
<a target=_blank id="L96" href="http://blog.csdn.net/zhoufan900428/article/details/17201293#L96" rel="#L96" style="color: rgb(102, 102, 102); text-decoration: none;"> 96</a>
close all;clear all;clc;
%% ---------Butterworth Notch filter (Fre. Domain)------------f = imread('car_75DPI_Moire.tif');f = mat2gray(f,[0 255]);
[M,N] = size(f);P = 2*M;Q = 2*N;fc = zeros(M,N);
for x = 1:1:M    for y = 1:1:N        fc(x,y) = f(x,y) * (-1)^(x+y);    endend
F = fft2(fc,P,Q);
H_NF = ones(P,Q);
for x = (-P/2):1:(P/2)-1     for y = (-Q/2):1:(Q/2)-1        D = 30;                v_k = 59; u_k = 77;        D_k = ((x+u_k)^2 + (y+v_k)^2)^(0.5);        H_NF(x+(P/2)+1,y+(Q/2)+1) = H_NF(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);        D_k = ((x-u_k)^2 + (y-v_k)^2)^(0.5);        H_NF(x+(P/2)+1,y+(Q/2)+1) = H_NF(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);                v_k = 59; u_k = 159;        D_k = ((x+u_k)^2 + (y+v_k)^2)^(0.5);        H_NF(x+(P/2)+1,y+(Q/2)+1) = H_NF(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);        D_k = ((x-u_k)^2 + (y-v_k)^2)^(0.5);        H_NF(x+(P/2)+1,y+(Q/2)+1) = H_NF(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);                v_k = -54; u_k = 84;        D_k = ((x+u_k)^2 + (y+v_k)^2)^(0.5);        H_NF(x+(P/2)+1,y+(Q/2)+1) = H_NF(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);        D_k = ((x-u_k)^2 + (y-v_k)^2)^(0.5);        H_NF(x+(P/2)+1,y+(Q/2)+1) = H_NF(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);                v_k = -54; u_k = 167;        D_k = ((x+u_k)^2 + (y+v_k)^2)^(0.5);        H_NF(x+(P/2)+1,y+(Q/2)+1) = H_NF(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);        D_k = ((x-u_k)^2 + (y-v_k)^2)^(0.5);        H_NF(x+(P/2)+1,y+(Q/2)+1) = H_NF(x+(P/2)+1,y+(Q/2)+1) * 1/(1+(D/D_k)^4);     endend
G_1 = H_NF .* F;
g_1 = real(ifft2(G_1));g_1 = g_1(1:1:M,1:1:N);
for x = 1:1:M    for y = 1:1:N        g_1(x,y) = g_1(x,y) * (-1)^(x+y);    endend
%% -----show-------close all;
figure();subplot(1,2,1);imshow(f,[0 1]);xlabel('a).Original Image');
subplot(1,2,2);imshow(log(1 + abs(F)),[ ]);xlabel('b).Fourier spectrum of a');
figure();subplot(1,2,1);imshow(H_NF,[0 1]);xlabel('c).Butterworth Notch filter(D=30 n=2)');
subplot(1,2,2);h = mesh(1:10:Q,1:10:P,H_NF(1:10:P,1:10:Q));set(h,'EdgeColor','k');axis([0 Q 0 P 0 1]);xlabel('u');ylabel('v');zlabel('|H(u,v)|');
figure();subplot(1,2,2);imshow(log(1 + abs(G_1)),[ ]);xlabel('e).Fourier spectrum of d');
subplot(1,2,1);imshow(g_1,[0 1]);xlabel('d).Result image');



来自CODE的代码片
Notch_Filtering.m


原文发于博客:http://blog.csdn.net/thnh169/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: