【图像去噪】基于ALOHA算法实现图像去噪附matlab代码

简介: 【图像去噪】基于ALOHA算法实现图像去噪附matlab代码

1 简介

Recently, the annihilating filter-based low-rank Hankel matrix (ALOHA) approach was proposed as a powerful image inpainting method. Based on the observation that smoothness or textures within an image patch correspond to sparse spectral components in the frequency domain, ALOHA exploits the existence of annihilating filters and the associated rank-deficient Hankel matrices in an image domain to estimate any missing pixels. By extending this idea, we propose a novel impulse-noise removal algorithm that uses the sparse and low-rank decomposition of a Hankel structured matrix. This method, referred to as the robust ALOHA, is based on the observation that an image corrupted with the impulse noise has intact pixels; consequently, the impulse noise can be modeled as sparse components, whereas the underlying image can still be modeled using a low-rank Hankel structured matrix. To solve the sparse and low-rank matrix decomposition problem, we propose an alternating direction method of multiplier approach, with initial factorized matrices coming from a low-rank matrix-fitting algorithm. To adapt local image statistics that have distinct spectral distributions, the robust ALOHA is applied in a patch-by-patch manner. Experimental results from impulse noise for both single-channel and multichannel color images demonstrate that the robust ALOHA is superior to existing approaches, especially during the reconstruction of complex texture patterns.

2 部分代码

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GPU version !!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%restoredefaultpath;clear;close all;home;% gpuDevice(1);addpath('./bin/');if ~exist('./bin/hank2patch_single.ptx','file') || ~exist('./bin/patch2hank_single.ptx','file')    compile_gpu;endrvin_density=[0.25 0.4];tolE_set=[2e-1 3e-1];tau=1e-1;diter=2;for iter=2    %% reading images & adaptive hyper params    switch iter        case 1            img=double(imread('./test_images/baboon512.jpg'));dname='baboon';            Nfir=13;Nimg=45;if diter==2,tau=0.75e-1;end        case 2            img=double(imread('./test_images/barbara.png'));dname='barbara';            Nfir=11;Nimg=25;        case 3            img=double(imread('./test_images/boat.png'));dname='boat';            Nfir=11;Nimg=25;        case 4            img=double(imread('./test_images/cameraman.tif'));dname='cameraman';            Nfir=13;Nimg=31;if diter==2,tau=0.75e-1;end        case 5            img=double(imread('./test_images/house.png'));dname='house';            if diter==1                Nfir=11;Nimg=25;            else                Nfir=13;Nimg=45;            end            if diter==2,tau=0.75e-1;end        case 6            img=double(imread('./test_images/lena.png'));dname='lena';            Nfir=11;Nimg=25;        case 7            img=double(imread('./test_images/peppers256.png'));img=img(2:end-1,2:end-1);dname='peppers';            if diter==2,tau=0.75e-1;end    end            %% insertion of RVIN    maxval=255;    img = img/maxval;    d=rvin_density(diter); % noise density    id=randperm(length(img(:)),fix(d*length(img(:))));    map=zeros(size(img));    map(id)=1;    dimg=img;    dimg(map==1)=rand(fix(d*length(img(:))),1);            %% hyper parameters    tolE=tolE_set(diter);    mask=ones(size(dimg));    param=struct('iname',dname,'mask',mask,'dimg',dimg,...        'mu',1e0,'beta',1e0,'tau',tau,...        'tolE',tolE,'tolE_stop',1e-4,...        'muiter',50,'Nimg',Nimg,'Nfir',Nfir,'d',d,'Nc',1,...        'maxval',255,'opt_inc','inc');            %% rALOHA    [recon,reconE,t_pro] = aloha_sl(param);    error = img - recon;    psnr_aloha = 10*log10(1/mean((error(:)).^2));    display(['PSNR (ALOHA) : ' num2str(psnr_aloha,4)])    endfiguresubplot(121)imshow(img);title('原图')subplot(122)imshow(recon);title('ALOHA去噪图')

3 仿真结果

4 参考文献

[1] Jin, K. H. , and  J. C. Ye . "Sparse and Low-Rank Decomposition of a Hankel Structured Matrix for Impulse Noise Removal." IEEE Transactions on Image Processing PP.99(2017):1-1.

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

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


相关文章
|
1天前
|
算法 数据安全/隐私保护 计算机视觉
基于二维CS-SCHT变换和LABS方法的水印嵌入和提取算法matlab仿真
该内容包括一个算法的运行展示和详细步骤,使用了MATLAB2022a。算法涉及水印嵌入和提取,利用LAB色彩空间可能用于隐藏水印。水印通过二维CS-SCHT变换、低频系数处理和特定解码策略来提取。代码段展示了水印置乱、图像处理(如噪声、旋转、剪切等攻击)以及水印的逆置乱和提取过程。最后,计算并保存了比特率,用于评估水印的稳健性。
|
1天前
|
算法 计算机视觉
基于高斯混合模型的视频背景提取和人员跟踪算法matlab仿真
该内容是关于使用MATLAB2013B实现基于高斯混合模型(GMM)的视频背景提取和人员跟踪算法。算法通过GMM建立背景模型,新帧与模型比较,提取前景并进行人员跟踪。文章附有程序代码示例,展示从读取视频到结果显示的流程。最后,结果保存在Result.mat文件中。
|
1天前
|
资源调度 算法 块存储
m基于遗传优化的LDPC码OMS译码算法最优偏移参数计算和误码率matlab仿真
MATLAB2022a仿真实现了遗传优化的LDPC码OSD译码算法,通过自动搜索最佳偏移参数ΔΔ以提升纠错性能。该算法结合了低密度奇偶校验码和有序统计译码理论,利用遗传算法进行全局优化,避免手动调整,提高译码效率。核心程序包括编码、调制、AWGN信道模拟及软输入软输出译码等步骤,通过仿真曲线展示了不同SNR下的误码率性能。
9 1
|
1天前
|
存储 算法 数据可视化
基于harris角点和RANSAC算法的图像拼接matlab仿真
本文介绍了使用MATLAB2022a进行图像拼接的流程,涉及Harris角点检测和RANSAC算法。Harris角点检测寻找图像中局部曲率变化显著的点,RANSAC则用于排除噪声和异常点,找到最佳匹配。核心程序包括自定义的Harris角点计算函数,RANSAC参数设置,以及匹配点的可视化和仿射变换矩阵计算,最终生成全景图像。
|
1天前
|
算法 Serverless
m基于遗传优化的LDPC码NMS译码算法最优归一化参数计算和误码率matlab仿真
MATLAB 2022a仿真实现了遗传优化的归一化最小和(NMS)译码算法,应用于低密度奇偶校验(LDPC)码。结果显示了遗传优化的迭代过程和误码率对比。遗传算法通过选择、交叉和变异操作寻找最佳归一化因子,以提升NMS译码性能。核心程序包括迭代优化、目标函数计算及性能绘图。最终,展示了SNR与误码率的关系,并保存了关键数据。
15 1
|
1天前
|
数据安全/隐私保护
地震波功率谱密度函数、功率谱密度曲线,反应谱转功率谱,matlab代码
地震波格式转换、时程转换、峰值调整、规范反应谱、计算反应谱、计算持时、生成人工波、时频域转换、数据滤波、基线校正、Arias截波、傅里叶变换、耐震时程曲线、脉冲波合成与提取、三联反应谱、地震动参数、延性反应谱、地震波缩尺、功率谱密度
|
1天前
|
数据安全/隐私保护
耐震时程曲线,matlab代码,自定义反应谱与地震波,优化源代码,地震波耐震时程曲线
地震波格式转换、时程转换、峰值调整、规范反应谱、计算反应谱、计算持时、生成人工波、时频域转换、数据滤波、基线校正、Arias截波、傅里叶变换、耐震时程曲线、脉冲波合成与提取、三联反应谱、地震动参数、延性反应谱、地震波缩尺、功率谱密度
基于混合整数规划的微网储能电池容量规划(matlab代码)
基于混合整数规划的微网储能电池容量规划(matlab代码)
|
1天前
|
算法 调度
面向配电网韧性提升的移动储能预布局与动态调度策略(matlab代码)
面向配电网韧性提升的移动储能预布局与动态调度策略(matlab代码)
|
1天前
|
算法 调度
含多微网租赁共享储能的配电网博弈优化调度(含matlab代码)
含多微网租赁共享储能的配电网博弈优化调度(含matlab代码)

热门文章

最新文章