<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 一,經典濾波算法的基本原理 ###1,中值濾波和均值濾波的基本原理 參考以前轉載的博客:http://blog.csdn.net/ebowtang/article/details/38960271 ###2,高斯平滑濾波基本原理 參考以前轉載的博客:http://blog.csdn.net/ebowtang/article/details/38389747 # 二,噪聲測試效果 ### 1,不同噪聲效果 三幅圖各噪聲濃度分別是0.01 0.03,0.05(比如第一副圖均是加入0.01的噪聲濃度) ![](https://box.kancloud.cn/2016-03-02_56d6526a079a1.jpg) ![](https://box.kancloud.cn/2016-03-02_56d6526a23bdb.jpg) ![](https://box.kancloud.cn/2016-03-02_56d6526a3da52.jpg) ### 2,實驗代碼 ~~~ <span style="font-size:12px;">%讀入原始圖像并顯示 image_original=imread('dog.bmp'); figure(1) subplot(2,4,1); imshow(image_original); title('原輸入圖像'); axis square; %生成含高斯噪聲圖像并顯示 pp=0.05; image_gaosi_noise=imnoise(image_original,'gaussian',0,pp); subplot(2,4,2); imshow(image_gaosi_noise); title('添加高斯噪聲后圖像'); axis square; %生成含椒鹽噪聲圖像并顯示 d=0.05; image_saltpepper_noise=imnoise(image_original,'salt & pepper',d); subplot(2,4,3); imshow(image_saltpepper_noise); title('添加椒鹽噪聲后圖像'); axis square; %生成含乘性噪聲圖像并顯示 var=0.05; image_speckle_noise=imnoise(image_original,'speckle',var); subplot(2,4,4); imshow(image_speckle_noise); title('添加乘性噪聲后圖像'); axis square; %原圖像直方圖 r=0:255; bb=image_original(:); pg=hist(bb,r); pgr1=pg/length(bb); subplot(245);bar(pgr1);title('源輸入圖像的直方圖'); r=0:255; bl=image_gaosi_noise(:); pg=hist(bl,r); pgr2=pg/length(bl); subplot(246);bar(pgr2);title('高斯噪聲污染后的直方圖'); r=0:255; bh=image_saltpepper_noise(:); pu=hist(bh,r); pgr3=pu/length(bh); subplot(247);bar(pgr3);title('椒鹽噪聲污染后的直方圖'); r=0:255; ba=image_speckle_noise(:); pa=hist(ba,r); pgr4=pa/length(ba); subplot(248);bar(pgr4);title('乘性噪聲污染后直方圖');</span> ~~~ # 三,椒鹽噪聲去除能力對比 ### 1,三大去噪效果 三幅圖椒鹽噪聲濃度分別是0.01 0.03,0.05(比如第一副圖均是加入0.01的椒鹽噪聲去噪對比) ![](https://box.kancloud.cn/2016-03-02_56d6526a561cb.jpg) ![](https://box.kancloud.cn/2016-03-02_56d6526a6bde4.jpg) ![](https://box.kancloud.cn/2016-03-02_56d6526a858cc.jpg) ### 2,實現代碼 ~~~ <span style="font-size:12px;"></span><pre name="code" class="cpp">%讀入原始圖像并顯示 image_original=imread('dog.bmp'); figure(1) subplot(2,4,1); imshow(image_original); title('原輸入圖像'); axis square; %生成含高斯噪聲圖像并顯示 %pp=0.05; %image_gaosi_noise=imnoise(image_original,'gaussian',0,pp); %生成含椒鹽噪聲圖像并顯示 dd=0.05; image_saltpepper_noise=imnoise(image_original,'salt & pepper',dd); %生成含乘性噪聲圖像并顯示 %var=0.05; %image_speckle_noise=imnoise(image_original,'speckle',var); image_saltpepper_noise_after1=medfilt2(image_saltpepper_noise,[3,3]); subplot(2,4,2); imshow(image_saltpepper_noise_after1);title('中值濾波去椒鹽噪聲效果圖'); axis square; h_gaosi1=fspecial('gaussian',3,1); image_saltpepper_noise_after2=imfilter(image_saltpepper_noise,h_gaosi1); subplot(2,4,3); imshow(image_saltpepper_noise_after2);title('高斯平滑去椒鹽噪聲效果'); axis square; image_saltpepper_noise_after3=wiener2(image_saltpepper_noise,[5 5]); subplot(2,4,4); imshow(image_saltpepper_noise_after3);title('維納濾波去椒鹽噪聲效果'); axis square; %原圖像直方圖 r=0:255; bb=image_original(:); pg=hist(bb,r); pgr1=pg/length(bb); subplot(245);bar(pgr1);title('源輸入圖像的直方圖'); r=0:255; bl=image_saltpepper_noise_after1(:); pg=hist(bl,r); pgr2=pg/length(bl); subplot(246);bar(pgr2);title('中值濾波去椒鹽噪聲后的直方圖'); r=0:255; bh=image_saltpepper_noise_after2(:); pu=hist(bh,r); pgr3=pu/length(bh); subplot(247);bar(pgr3);title('高斯平滑去椒鹽噪聲后的直方圖'); r=0:255; ba=image_saltpepper_noise_after3(:); pa=hist(ba,r); pgr4=pa/length(ba); subplot(248);bar(pgr4);title('維納濾波去除椒鹽噪聲后的直方圖'); ~~~ # 四,高斯噪聲去除能力對比 ### 1,去噪效果對比 ![](https://box.kancloud.cn/2016-03-02_56d6526aa186a.jpg) ![](https://box.kancloud.cn/2016-03-02_56d6526ac1bee.jpg) ![](https://box.kancloud.cn/2016-03-02_56d6526ae8bee.jpg) ### 2,實驗代碼 ~~~ <span style="font-size:12px;"></span><pre name="code" class="cpp">%讀入原始圖像并顯示 image_original=imread('dog.bmp'); figure(1) subplot(2,4,1); imshow(image_original); title('原輸入圖像'); axis square; %生成含高斯噪聲圖像并顯示 pp=0.05; image_gaosi_noise=imnoise(image_original,'gaussian',0,pp); %生成含椒鹽噪聲圖像并顯示 %dd=0.01; %image_saltpepper_noise=imnoise(image_original,'salt & pepper',dd); %生成含乘性噪聲圖像并顯示 %var=0.05; %image_speckle_noise=imnoise(image_original,'speckle',var); image_gaosi_noise_after1=medfilt2(image_gaosi_noise,[3,3]); subplot(2,4,2); imshow(image_gaosi_noise_after1);title('中值濾波去高斯噪聲效果圖'); axis square; h_gaosi1=fspecial('gaussian',3,1); image_gaosi_noise_after2=imfilter(image_gaosi_noise,h_gaosi1); subplot(2,4,3); imshow(image_gaosi_noise_after2);title('高斯平滑去高斯噪聲效果'); axis square; image_gaosi_noise_after3=wiener2(image_gaosi_noise,[5 5]); subplot(2,4,4); imshow(image_gaosi_noise_after3);title('維納濾波去高斯噪聲效果'); axis square; %原圖像直方圖 r=0:255; bb=image_original(:); pg=hist(bb,r); pgr1=pg/length(bb); subplot(245);bar(pgr1);title('源輸入圖像的直方圖'); r=0:255; bl=image_gaosi_noise_after1(:); pg=hist(bl,r); pgr2=pg/length(bl); subplot(246);bar(pgr2);title('中值濾波去高斯噪聲后的直方圖'); r=0:255; bh=image_gaosi_noise_after2(:); pu=hist(bh,r); pgr3=pu/length(bh); subplot(247);bar(pgr3);title('高斯平滑去高斯噪聲后的直方圖'); r=0:255; ba=image_gaosi_noise_after3(:); pa=hist(ba,r); pgr4=pa/length(ba); subplot(248);bar(pgr4);title('維納濾波去除高斯噪聲后的直方圖'); ~~~ # 五,乘性噪聲去除能力對比 ### 1,去噪效果對比 ![](https://box.kancloud.cn/2016-03-02_56d6526b0fcaf.jpg) ![](https://box.kancloud.cn/2016-03-02_56d6526b2a4a6.jpg) ![](https://box.kancloud.cn/2016-03-02_56d6526b3f248.jpg) ### 2,實驗代碼 ~~~ <span style="font-size:12px;">%讀入原始圖像并顯示 image_original=imread('dog.bmp'); figure(1) subplot(2,4,1); imshow(image_original); title('原輸入圖像'); axis square; %生成含高斯噪聲圖像并顯示 %pp=0.01; %image_gaosi_noise=imnoise(image_original,'gaussian',0,pp); %生成含椒鹽噪聲圖像并顯示 %dd=0.01; %image_saltpepper_noise=imnoise(image_original,'salt & pepper',dd); %生成含乘性噪聲圖像并顯示 var=0.01; image_speckle_noise=imnoise(image_original,'speckle',var); image_speckle_noise_after1=medfilt2(image_speckle_noise,[3,3]); subplot(2,4,2); imshow(image_speckle_noise_after1);title('中值濾波去乘性噪聲效果圖'); axis square; h_gaosi1=fspecial('gaussian',3,1); image_speckle_noise_after2=imfilter(image_speckle_noise,h_gaosi1); subplot(2,4,3); imshow(image_speckle_noise_after2);title('高斯平滑去乘性噪聲效果'); axis square; image_speckle_noise_after3=wiener2(image_speckle_noise,[5 5]); subplot(2,4,4); imshow(image_speckle_noise_after3);title('維納濾波去乘性噪聲效果'); axis square; %原圖像直方圖 r=0:255; bb=image_original(:); pg=hist(bb,r); pgr1=pg/length(bb); subplot(245);bar(pgr1);title('源輸入圖像的直方圖'); r=0:255; bl=image_speckle_noise_after1(:); pg=hist(bl,r); pgr2=pg/length(bl); subplot(246);bar(pgr2);title('中值濾波去乘性噪聲后的直方圖'); r=0:255; bh=image_speckle_noise_after2(:); pu=hist(bh,r); pgr3=pu/length(bh); subplot(247);bar(pgr3);title('高斯平滑去乘性噪聲后的直方圖'); r=0:255; ba=image_speckle_noise_after3(:); pa=hist(ba,r); pgr4=pa/length(ba); subplot(248);bar(pgr4);title('維納濾波去除乘性噪聲后的直方圖');</span> ~~~ # 六,PNSR客觀對比 (PNSR客觀對比越高越好) 本對比也囊括了其他常見去噪方式的對比 ![](https://box.kancloud.cn/2016-03-02_56d6526b5f9bd.jpg) #參考資源 【1】《百度百科》 【2】《維基百科》 【3】岡薩雷斯《數字圖像處理》 【4】http://blog.csdn.net/ebowtang/article/details/38960271
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看