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;
end
rvin_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)])
end
figure
subplot(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代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。