日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

图像处理:图像复原与重建之逆滤波、维纳滤波、约束最小二乘滤波——Matlab实现

發(fā)布時(shí)間:2025/4/16 编程问答 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 图像处理:图像复原与重建之逆滤波、维纳滤波、约束最小二乘滤波——Matlab实现 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

?

參考資料:

陷波濾波器—matlab實(shí)現(xiàn)

http://blog.sina.com.cn/s/blog_ebd29d830102wdzw.html

圖像復(fù)原之約束最小二乘方濾波

https://blog.csdn.net/yi_tech_blog/article/details/54605146

圖像去模糊(約束最小二乘方濾波)

https://blog.csdn.net/bluecol/article/details/47359421

約束最小二乘方濾波去模糊

https://blog.csdn.net/yuyangyg/article/details/78681007

圖像去模糊(維納濾波)

https://blog.csdn.net/bluecol/article/details/46242355

?

%% 仿真逆濾波、維納濾波,約束最小二乘濾波close all; clear all; clc; % Display the original image. I = imread('Lena512.png'); [d1,d2,d3] = size(I); if(d3 > 1) I = rgb2gray(I); end I = im2double(I); [hei,wid,~] = size(I); subplot(3,3,1),imshow(I); title('Original Image ');% Simulate a motion blur. LEN = 50; THETA = 11; PSF = fspecial('motion', LEN, THETA); blurred = imfilter(I, PSF, 'conv', 'circular'); subplot(3,3,2), imshow(blurred); title('Blurred Image');% Simulate additive noise. noise_mean = 0; % noise_var = 0.00001; noise_var = 0.0001; blurred_noisy = imnoise(blurred, 'gaussian', ...noise_mean, noise_var); subplot(3,3,3), imshow(blurred_noisy) title('Simulate Blur and Noise')%% 使用自帶的 deconvwnr 進(jìn)行維納濾波。 deconvreg進(jìn)行約束最小二乘濾波 % deconvwnr 維納濾波,如果沒有參數(shù)NSPR,則為逆濾波%自帶 逆濾波 對(duì)已添加噪聲圖像 deconvwnr deblurred4 = deconvwnr(blurred_noisy,PSF); subplot(3,3,4), imshow(deblurred4); title('deconvwnr逆濾波 對(duì) 運(yùn)動(dòng)+噪聲')%自帶 維納濾波 對(duì)已添加噪聲圖像 deconvwnr deblurred4 = deconvwnr(blurred_noisy,PSF,0.005); %0.005為噪聲信號(hào)比 subplot(3,3,5), imshow(deblurred4); title('deconvwnr維納濾波 對(duì) 運(yùn)動(dòng)+噪聲')%自帶的 deconvreg 進(jìn)行約束最小二乘濾波 subplot(3,3,6); imshow(deconvreg(blurred_noisy, PSF,20)); %20 為噪聲功率 title('deconvreg最小二乘濾波 對(duì) 運(yùn)動(dòng)+噪聲');%% 自寫 逆濾波,約束最小二乘濾波%自寫 逆濾波 對(duì)未添加噪聲圖像 If = fft2(blurred); Pf = psf2otf(PSF,[hei,wid]); deblurred = ifft2(If./Pf); subplot(3,3,7), imshow(deblurred); title('逆濾波 對(duì) 僅運(yùn)動(dòng)') %自寫 逆濾波 對(duì)已經(jīng)添加噪聲圖像 If2 = fft2(blurred_noisy); deblurred2 = ifft2(If2./Pf); subplot(3,3,8), imshow(deblurred2); title('逆濾波 對(duì) 運(yùn)動(dòng)+噪聲')% Try restoration using Home Made Constrained Least Squares Filtering. % 自寫約束最小二乘濾波 p = [0 -1 0;-1 4 -1;0 -1 0]; P = psf2otf(p,[hei,wid]);gama = 0.001; If = fft2(blurred_noisy);numerator = conj(Pf); denominator = Pf.^2 + gama*(P.^2);deblurred2 = ifft2( numerator.*If./ denominator ); subplot(3,3,9), imshow(deblurred2) title('約束最小二乘濾波');

?

總結(jié)

以上是生活随笔為你收集整理的图像处理:图像复原与重建之逆滤波、维纳滤波、约束最小二乘滤波——Matlab实现的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。