【图像去噪】基于自适应EM算法实现图像去噪附matlab代码

简介: 【图像去噪】基于自适应EM算法实现图像去噪附matlab代码

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法  神经网络预测雷达通信 无线传感器

信号处理图像处理路径规划元胞自动机无人机

⛄ 内容介绍

In order to improve the denoising effect of natural image based-patch prior and effectively remove the noise in the image,this paper proposes Expectation Maximization adaptation learning process by using the statistical characteristics of image blocks to learn image block priors,which generates specific prior by mapping a generic prior to the specified image. Compared with the standard EM algorithm,the proposed method needs less training data,and can be applied to the pre-filtered image in the absence of clean databases. The experimental results show that the proposed algorithm is superior to the existing image denoising algorithms.

⛄ 部分代码

clear;

close all;

addpath('code');

addpath('data/standard_images')

load GSModel_8x8_200_2M_noDC_zeromean.mat

GMM.ncomponents = GS.nmodels;

GMM.mus = GS.means;

GMM.covs = GS.covs;

GMM.weights = GS.mixweights;

clear GS;

x = im2double(imread('House256.png'));

sigmaNoise = 20/255;

y = x + sigmaNoise * randn(size(x));        % noisy test image


%%%% EPLL denoising %%%%

xEPLL = y;

for sigma = sigmaNoise * [1, 1/sqrt(4), 1/sqrt(8), 1/sqrt(16), 1/sqrt(32)]

   [xEPLL, psnr_EPLL, ssim_EPLL] = MAP_GMM(x, y, xEPLL, sigmaNoise, sigma, GMM);

end

fprintf('PSNR(EPLL) is:%.2f\n', psnr_EPLL);

fprintf('SSIM(EPLL) is:%.4f\n', ssim_EPLL);


%%%% EM adaptation using EPLL denoised image and MAP denoising with adapted GMM %%%%

xHat = xEPLL;

epsilon = 0.01;

b = randn(size(y));

n = numel(y);

xEPLL1 = y + epsilon*b;

for sigma = sigmaNoise * [1, 1/sqrt(4), 1/sqrt(8), 1/sqrt(16), 1/sqrt(32)]

   [xEPLL1, ~, ~] = MAP_GMM(x, y + epsilon*b, xEPLL1, sigmaNoise, sigma, GMM);

end

xHat1 = xEPLL1;

div = (b(:)'*(xHat1(:) - xHat(:))) / (n*epsilon);

beta_opt = (sqrt(mean((y(:) - xHat(:)).^2) - sigmaNoise^2 + 2*sigmaNoise^2*div)) / sigmaNoise;

aGMM = EM_adaptation(GMM, xEPLL, beta_opt * sigmaNoise, 1);

xAdapted_EPLL = y;

for sigma = sigmaNoise * [1, 1/sqrt(4), 1/sqrt(8), 1/sqrt(16), 1/sqrt(32)]

   [xAdapted_EPLL, psnr_adapted, ssim_adapted] = MAP_GMM(x, y, xAdapted_EPLL, sigmaNoise, sigma, aGMM);

end

fprintf('PSNR(adapted by EPLL image) is:%.2f\n', psnr_adapted);

fprintf('SSIM(adapted by EPLL image) is:%.4f\n', ssim_adapted);

figure

subplot(131)

imshow(x);

title('原图')

subplot(132)

imshow(y);

title('加噪图')

subplot(133)

imshow(xAdapted_EPLL);

title(['去噪图,PSNR=',num2str(psnr_adapted)])

return


⛄ 运行结果

⛄ 参考文献

[1] Lei Y . Baesd-patch Daptive Image Denoising with EM Algorithm[J]. Science Mosaic, 2017.

❤️ 关注我领取海量matlab电子书和数学建模资料
❤️部分理论引用网络文献,若有侵权联系博主删除


相关文章
|
9月前
|
算法 定位技术 计算机视觉
【水下图像增强】基于波长补偿与去雾的水下图像增强研究(Matlab代码实现)
【水下图像增强】基于波长补偿与去雾的水下图像增强研究(Matlab代码实现)
1097 0
|
9月前
|
机器学习/深度学习 算法 机器人
使用哈里斯角Harris和SIFT算法来实现局部特征匹配(Matlab代码实现)
使用哈里斯角Harris和SIFT算法来实现局部特征匹配(Matlab代码实现)
398 8
|
9月前
|
机器学习/深度学习 编解码 算法
基于OFDM技术的水下声学通信多径信道图像传输研究(Matlab代码实现)
基于OFDM技术的水下声学通信多径信道图像传输研究(Matlab代码实现)
394 8
|
9月前
|
机器学习/深度学习 算法 机器人
【水下图像增强融合算法】基于融合的水下图像与视频增强研究(Matlab代码实现)
【水下图像增强融合算法】基于融合的水下图像与视频增强研究(Matlab代码实现)
781 0
|
9月前
|
算法 机器人 计算机视觉
【图像处理】水下图像增强的颜色平衡与融合技术研究(Matlab代码实现)
【图像处理】水下图像增强的颜色平衡与融合技术研究(Matlab代码实现)
294 0
|
9月前
|
新能源 Java Go
【EI复现】参与调峰的储能系统配置方案及经济性分析(Matlab代码实现)
【EI复现】参与调峰的储能系统配置方案及经济性分析(Matlab代码实现)
292 0
|
9月前
|
机器学习/深度学习 数据采集 测试技术
基于CEEMDAN-VMD-BiLSTM的多变量输入单步时序预测研究(Matlab代码实现)
基于CEEMDAN-VMD-BiLSTM的多变量输入单步时序预测研究(Matlab代码实现)
349 8
|
9月前
|
机器学习/深度学习 算法 自动驾驶
基于导向滤波的暗通道去雾算法在灰度与彩色图像可见度复原中的研究(Matlab代码实现)
基于导向滤波的暗通道去雾算法在灰度与彩色图像可见度复原中的研究(Matlab代码实现)
463 8
|
9月前
|
编解码 运维 算法
【分布式能源选址与定容】光伏、储能双层优化配置接入配电网研究(Matlab代码实现)
【分布式能源选址与定容】光伏、储能双层优化配置接入配电网研究(Matlab代码实现)
790 12
|
9月前
|
人工智能 数据可视化 网络性能优化
【顶级SCI复现】虚拟电厂的多时间尺度调度:在考虑储能系统容量衰减的同时,整合发电与多用户负荷的灵活性研究(Matlab代码实现)
【顶级SCI复现】虚拟电厂的多时间尺度调度:在考虑储能系统容量衰减的同时,整合发电与多用户负荷的灵活性研究(Matlab代码实现)
297 9