【图像去噪】基于柯西近端分裂 (CPS) 算法实现图像去噪附MATLAB源代码

简介: 【图像去噪】基于柯西近端分裂 (CPS) 算法实现图像去噪附MATLAB源代码

1 简介

In this paper, we propose a proximal splitting methodology with a non-convex penalty function based on the heavy-tailed Cauchy distribution. We first suggest a closed-form expression for calculating the proximal operator of the Cauchy prior, which then makes it applicable in generic proximal splitting algorithms. We further derive the condition required for guaranteed convergence to the global minimum in optimisation problems involving the Cauchy based penalty function. Setting the system parameters by satisfying the proposed condition ensures convergence even though the overall cost function is non-convex, when minimisation is performed via a proximal splitting algorithm. The proposed method based on Cauchy regularisation is evaluated by solving generic signal processing examples, i.e. 1D signal denoising in the frequency domain, two image reconstruction tasks including de-blurring and denoising, and error recovery in a multiple-antenna communication system. We experimentally verify the proposed convergence conditions for various cases, and show the effectiveness of the proposed Cauchy based non-convex penalty function over state-of-the-art penalty functions such as $L_1$ and total variation ( $TV$ ) norms.

2 部分代码

%% Deblurring via Cauchy proximal splitting algorithm% Y = HX + N% Y is the blurred and noisy image% X is the clear image (object of interest)% H is the point spread function (blurring operation)% N is the additive zero-meam Gaussian noise with variance \sigma^2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Some Important Variables%       ** X: Noise-free Image.%%       ** filterSize: The size of the blurring filter.%%       ** BSNRdb: Blurred-SNR value in decibels.%%       ** maxIter: Maximum number of FB iterations.%%       ** Y: Noisy and blurred image.%%       ** mu: CPS step size%%       ** gamma: Cauchy scale parameter%%       ** errorCriterion: The stopping criterion for the FB algorithm.%%       ** x_hat: The reconstructed image.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LICENSE% % This program is free software: you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation, either version 3 of the License, or% (at your option) any later version.% % This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the% GNU General Public License for more details.% % You should have received a copy of the GNU General Public License% along with this program.  If not, see <https://www.gnu.org/licenses/>.% % Copyright (C) Oktay Karakus,PhD % University of Bristol, UK% o.karakus@bristol.ac.uk% April 2020%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% REFERENCE%% [1] O Karakus, P Mayo, and A Achim. "Convergence Guarantees for %     Non-Convex Optimisation with Cauchy-Based Penalties"%       arXiv preprint.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%clearvarsclose allclcimName = 'cameraman';X = double(imread([imName '.tif']));filterSize = 5;h = fspecial('gaussian',[filterSize filterSize], 1);blurred = imfilter(X, h, 'circular');BSNRdb = 40; % Blurred-signal to noise ratio in decibelssigma = norm(blurred-mean(mean(blurred)),'fro')/sqrt(size(blurred, 1)*size(blurred, 2)*10^(BSNRdb/10)); % noise std calculationY = blurred + sigma*randn(size(blurred)); % The noisy and blurred image Y.K  = psf2otf(h, size(X));KC = conj(K);A  = @(x) real(ifft2(K.*fft2(x)));      % Forward operatorAH = @(x) real(ifft2(KC.*fft2(x)));     % Inverse operatorgrad_f_x = @(x) AH(A(x) - Y);           % Gradient operatorxx = ones(size(Y));yy = 0*ones(size(Y));Lip = norm(grad_f_x(xx) - grad_f_x(yy), 2)/norm(xx - yy, 2); % A general %           calculation for Lipschitz constant via gradiend Lipschitz %           definition of data fidelity term.mu = 1.5/Lip; % error parameterPSNR_noisy = psnr(uint8(Y), uint8(X));RMSE_noisy = sqrt(mean((Y - X).^2));delta_x = inf;x_hat = zeros(size(Y));iter = 1;maxIter = 250;errorCriterion = 1e-3;old_X = x_hat;gamma = 17*sqrt(mu); % The lower bound for guaranteeing convergence sqrt(mu)/2tic;while (delta_x(iter) > errorCriterion) && (iter < maxIter)    iter = iter + 1;    Z = x_hat - (mu)*(grad_f_x(x_hat));    x_hat = CauchyProx(Z, gamma, mu);    delta_x(iter) = max(abs( x_hat(:) - old_X(:) )) / max(abs(old_X(:))); % Error calculation    old_X = x_hat;endtimeSim = toc;PSNR_regularized = psnr(uint8(x_hat), uint8(X));RMSE_regularized = sqrt(mean((x_hat(:) - X(:)).^2));figure;set(gcf, 'Position', [100 100 900 400])subplot('Position', [0.0101, 0.05001, 0.3, 0.95])imshow(uint8(X));       % Originaltitle('Original Image')subplot('Position', [0.3401, 0.05001, 0.3, 0.95])imshow(uint8(Y));       % Blurredtitle(['Blurred Image (PSNR = ' num2str(PSNR_noisy) ' dB)'])subplot('Position', [0.6701, 0.05001, 0.3, 0.95])imshow(uint8(x_hat));   % Cauchy Reconstructedtitle(['CPS Reconstructed (PSNR = ' num2str(PSNR_regularized) ' dB)'])fprintf('Cauchy proximal splitting (CPS) for image deblurring\nSolved after %d iterations in %.3f seconds\nNoisy PSNR = %.3f dB\nReconstructed PSNR = %.3f dB\n', iter, timeSim, PSNR_noisy, PSNR_regularized)

3 仿真结果

4 参考文献

[1] Karakus O ,  Mayo P ,  Achim A . Convergence Guarantees for Non-Convex Optimisation with Cauchy-Based Penalties[J].  2020.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。

相关文章
|
20天前
|
算法 安全 数据安全/隐私保护
基于game-based算法的动态频谱访问matlab仿真
本算法展示了在认知无线电网络中,通过游戏理论优化动态频谱访问,提高频谱利用率和物理层安全性。程序运行效果包括负载因子、传输功率、信噪比对用户效用和保密率的影响分析。软件版本:Matlab 2022a。完整代码包含详细中文注释和操作视频。
|
1月前
|
机器学习/深度学习 算法 数据安全/隐私保护
基于MSER和HOG特征提取的SVM交通标志检测和识别算法matlab仿真
### 算法简介 1. **算法运行效果图预览**:展示算法效果,完整程序运行后无水印。 2. **算法运行软件版本**:Matlab 2017b。 3. **部分核心程序**:完整版代码包含中文注释及操作步骤视频。 4. **算法理论概述**: - **MSER**:用于检测显著区域,提取图像中稳定区域,适用于光照变化下的交通标志检测。 - **HOG特征提取**:通过计算图像小区域的梯度直方图捕捉局部纹理信息,用于物体检测。 - **SVM**:寻找最大化间隔的超平面以分类样本。 整个算法流程图见下图。
|
5天前
|
算法 数据挖掘 数据安全/隐私保护
基于FCM模糊聚类算法的图像分割matlab仿真
本项目展示了基于模糊C均值(FCM)算法的图像分割技术。算法运行效果良好,无水印。使用MATLAB 2022a开发,提供完整代码及中文注释,附带操作步骤视频。FCM算法通过隶属度矩阵和聚类中心矩阵实现图像分割,适用于灰度和彩色图像,广泛应用于医学影像、遥感图像等领域。
|
6天前
|
算法 调度
基于遗传模拟退火混合优化算法的车间作业最优调度matlab仿真,输出甘特图
车间作业调度问题(JSSP)通过遗传算法(GA)和模拟退火算法(SA)优化多个作业在并行工作中心上的加工顺序和时间,以最小化总完成时间和机器闲置时间。MATLAB2022a版本运行测试,展示了有效性和可行性。核心程序采用作业列表表示法,结合遗传操作和模拟退火过程,提高算法性能。
|
7天前
|
存储 算法 决策智能
基于免疫算法的TSP问题求解matlab仿真
旅行商问题(TSP)是一个经典的组合优化问题,目标是寻找经过每个城市恰好一次并返回起点的最短回路。本文介绍了一种基于免疫算法(IA)的解决方案,该算法模拟生物免疫系统的运作机制,通过克隆选择、变异和免疫记忆等步骤,有效解决了TSP问题。程序使用MATLAB 2022a版本运行,展示了良好的优化效果。
|
6天前
|
机器学习/深度学习 算法 芯片
基于GSP工具箱的NILM算法matlab仿真
基于GSP工具箱的NILM算法Matlab仿真,利用图信号处理技术解析家庭或建筑内各电器的独立功耗。GSPBox通过图的节点、边和权重矩阵表示电气系统,实现对未知数据的有效分类。系统使用MATLAB2022a版本,通过滤波或分解技术从全局能耗信号中提取子设备的功耗信息。
|
6天前
|
机器学习/深度学习 算法 5G
基于MIMO系统的SDR-AltMin混合预编码算法matlab性能仿真
基于MIMO系统的SDR-AltMin混合预编码算法通过结合半定松弛和交替最小化技术,优化大规模MIMO系统的预编码矩阵,提高信号质量。Matlab 2022a仿真结果显示,该算法能有效提升系统性能并降低计算复杂度。核心程序包括预编码和接收矩阵的设计,以及不同信噪比下的性能评估。
23 3
|
17天前
|
人工智能 算法 数据安全/隐私保护
基于遗传优化的SVD水印嵌入提取算法matlab仿真
该算法基于遗传优化的SVD水印嵌入与提取技术,通过遗传算法优化水印嵌入参数,提高水印的鲁棒性和隐蔽性。在MATLAB2022a环境下测试,展示了优化前后的性能对比及不同干扰下的水印提取效果。核心程序实现了SVD分解、遗传算法流程及其参数优化,有效提升了水印技术的应用价值。
|
18天前
|
机器学习/深度学习 算法 数据安全/隐私保护
基于贝叶斯优化CNN-LSTM网络的数据分类识别算法matlab仿真
本项目展示了基于贝叶斯优化(BO)的CNN-LSTM网络在数据分类中的应用。通过MATLAB 2022a实现,优化前后效果对比明显。核心代码附带中文注释和操作视频,涵盖BO、CNN、LSTM理论,特别是BO优化CNN-LSTM网络的batchsize和学习率,显著提升模型性能。
|
23天前
|
存储
基于遗传算法的智能天线最佳阵列因子计算matlab仿真
本课题探讨基于遗传算法优化智能天线阵列因子,以提升无线通信系统性能,包括信号质量、干扰抑制及定位精度。通过MATLAB2022a实现的核心程序,展示了遗传算法在寻找最优阵列因子上的应用,显著改善了天线接收功率。