ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

【图像去噪】基于matlab即插即用法图像去噪(含PSNR)【含Matlab源码 152期】

【图像去噪】基于matlab即插即用法图像去噪(含PSNR)【含Matlab源码 152期】 欢迎来到海神之光博客之家✅博主简介热爱科研的Matlab仿真开发者修心和技术同步精进个人主页海神之光代码获取方式海神之光Matlab王者学习之路—代码获取方式⛳️座右铭行百里者半于九十。更多Matlab图像处理仿真内容点击①Matlab图像处理进阶版②付费专栏Matlab图像处理初级版⛳️关注CSDN海神之光更多资源等你来⛄一、简介理论知识参考文献基于Retinex和ADMM优化的水下光照不均匀图像增强算法⛄二、部分源代码function out PlugPlayADMM_deblur(y,h,lambda,method,opts)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%out PlugPlayADMM_deblur(y,h,lambda,method,opts)%deblurs image y by solving the ADMM:%%inversion step: xargmin_x(||Ax-y||2rho/2||x-(v-u)||2)%denoising step: vDenoise(xu)% update u: uu(x-v)%%Input: y - the observed gray scale image% h - blur kernel% lambda - regularization parameter% method - denoiser, e.g., ‘BM3D’% opts.rho - internal parameter of ADMM {1}% opts.gamma - parameter for updating rho {1}% opts.maxitr - maximum number of iterations for ADMM {20}% opts.tol - tolerance level for residual {1e-4}% ** default values of opts are given in {}.%%Output: out - recovered gray scale image%%Xiran Wang and Stanley Chan%Copyright 2016%Purdue University, West Lafayette, In, USA.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Check inputsif nargin4error(‘not enough input, try again \n’);elseif nargin4opts [];end% Check defaultsif ~isfield(opts,‘rho’)opts.rho 1;endif ~isfield(opts,‘max_itr’)opts.max_itr 20;endif ~isfield(opts,‘tol’)opts.tol 1e-4;endif ~isfield(opts,‘gamma’)opts.gamma1;endif ~isfield(opts,‘print’)opts.print false;end% set parametersmax_itr opts.max_itr;tol opts.tol;gamma opts.gamma;rho opts.rho;%initialize variablesdim size(y);N dim(1)*dim(2);Hty imfilter(y,h,‘circular’);eigHtH abs(fftn(h, dim)).^2;residual inf;%set function handle for denoiserswitch methodcase ‘BM3D’denoisewrapper_BM3D;case ‘TV’denoisewrapper_TV;case ‘NLM’denoisewrapper_NLM;case ‘RF’denoisewrapper_RF;otherwiseerror(‘unknown denoiser \n’);end% main loopif opts.printtruefprintf(‘Plug-and-Play ADMM — Deblurring \n’);fprintf(‘Denoiser %s \n\n’, method);fprintf(‘itr \t ||x-xold|| \t ||v-vold|| \t ||u-uold|| \n’);enditr 1;while(residualtolitrmax_itr)%store x, v, u from previous iteration for psnr residual calculationx_old x;v_old v;u_old u;%inversion step xtilde v-u; rhs fftn(Htyrho*xtilde,dim); x real(ifftn(rhs./(eigHtHrho),dim)); %denoising step vtilde xu; vtilde proj(vtilde); sigma sqrt(lambda/rho); v denoise(vtilde,sigma); %update langrangian multiplier u u (x-v); %update rho rho rho*gamma; %calculate residual residualx (1/sqrt(N))*(sqrt(sum(sum((x-x_old).^2)))); residualv (1/sqrt(N))*(sqrt(sum(sum((v-v_old).^2)))); residualu (1/sqrt(N))*(sqrt(sum(sum((u-u_old).^2)))); residual residualx residualv residualu; if opts.printtrue fprintf(%3g \t %3.5e \t %3.5e \t %3.5e \n, itr, residualx, residualv, residualu); end itr itr1;endout v;endfunction y afun(x,transp_flag,h,dim)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Example of the A matrix%% This example illustrates how to construct the A matrix% for deblurring problem. The function executes the operations of% A*x and A’*x%% Stanley Chan% Purdue University% Nov 24, 2016%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%rows dim(1);cols dim(2);if strcmp(transp_flag,‘transp’) % y A’xx reshape(x,[rows,cols]);y imfilter(x,rot90(h,2),‘circular’);y y(;elseif strcmp(transp_flag,‘notransp’) % y Axx reshape(x,[rows,cols]);y imfilter(x,h,‘circular’);y y(;endendfunction out wrapper_NLM(in,sigma)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% out wrapper_NLM(in,sigma)% performs non-local means denoising%% Require NLM package%% Download:% http://www.ipol.im/pub/art/2011/bcm_nlm/%% Xiran Wang and Stanley Chan% Copyright 2016% Purdue University, West Lafayette, In, USA.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Options.filterstrengthsigma;out NLMF(in,Options);end⛄三、运行结果⛄四、matlab版本及参考文献1 matlab版本2014a2 参考文献[1]刘卫东,李吉玉,张文博,李乐.基于Retinex和ADMM优化的水下光照不均匀图像增强算法[J].西北工业大学学报. 2021,39(04)3 备注简介此部分摘自互联网仅供参考若侵权联系删除 仿真咨询1 各类智能优化算法改进及应用生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化、公交排班优化、充电桩布局优化、车间布局优化、集装箱船配载优化、水泵组合优化、解医疗资源分配优化、设施布局优化、可视域基站和无人机选址优化2 机器学习和深度学习方面卷积神经网络CNN、LSTM、支持向量机SVM、最小二乘支持向量机LSSVM、极限学习机ELM、核极限学习机KELM、BP、RBF、宽度学习、DBN、RF、RBF、DELM、XGBOOST、TCN实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断3 图像处理方面图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知4 路径规划方面旅行商问题TSP、车辆路径问题VRP、MVRP、CVRP、VRPTW等、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划、天线线性阵列分布优化、车间布局优化5 无人机应用方面无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配6 无线传感器定位及布局方面传感器部署优化、通信协议优化、路由优化、目标定位优化、Dv-Hop定位优化、Leach协议优化、WSN覆盖优化、组播优化、RSSI定位优化7 信号处理方面信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号、信号配时优化8 电力系统方面微电网优化、无功优化、配电网重构、储能配置9 元胞自动机方面交通流 人群疏散 病毒扩散 晶体生长10 雷达方面卡尔曼滤波跟踪、航迹关联、航迹融合
返回列表