当前位置:网站首页>[image denoising] image denoising based on regularization with matlab code

[image denoising] image denoising based on regularization with matlab code

2022-06-12 18:56:00 Matlab scientific research studio

1 brief introduction

Image denoising has always been an important issue in image processing , Degraded images have great limitations on the further application of images . Mathematically speaking , Image denoising is an inverse problem , For image processing with fuzzy kernel, it is an ill posed inverse problem , At present, the most important and effective method to solve the inverse problem is the regularization method . The main idea of the regularization method is to introduce a regularization operator that approximates the operator of the original ill posed problem and then approximates the solution of the original ill posed problem , That is, the solution obtained by the regularization method is unique , It is a good approximation of the original and inverse problem .

2 Part of the code

%%%% The gradient of 0 Directly solve four kinds of regularities %%%%%%clear all;close all;x0 = double(imread('groundtruth\monarch.tif'));     % Import groundtruthg0 = double(imread('degraded\monarch_n_0.1.tif')); % Import noisy image g0k = fspecial('gaussian',19,2);% Given Gaussian fuzzy kernel  lamda = 0.8;   % Regularization coefficient 0.8[row column] = size(g0); % Get image dimension % Image 2-D Fourier transform discretization K = fft2(k,row,column); % Gaussian kernel G = fft2(g0);           % Noisy image % Difference matrix l1=[0 0 0;       -1 1 0;    0 0 0];l2=[0 -1 0;    0 1 0;    0 0 0]; % Fourier transform to frequency domain 530*530 Matrix Lx = fft2(l1,row,column);  Ly = fft2(l2,row,column);%%%%%%%%%% Using two-dimensional Fourier transform and zero gradient, the four regularities are solved directly %%%%%%%%%%%L1 Regular : %x_iteration = ifft2((K'.*G-lamda)./(K'.*K));%L2 Regular :%x_iteration = ifft2(((K'.*G)./(K'.*K+2*lamda));%TV Regular :%x_iteration = ifft2((K'.*G-lamda*Lx'-lamba*Ly')./(K'.*K));%TV-L2 Regular : x_iteration = ifft2((K'.*G)./(K'.*K-2*lamda*(Lx.^2)-2*lamda*(Ly.^2)));%%%%%%%%%%% Show reconstructed picture %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%figure; colormap gray;    % Graying subplot(221); image(x0); title('GroundTruth');subplot(222); imagesc(g0); title('Degrade:0.1');subplot(224);imagesc(x_iteration); title('TV denoising:0.1');%%%%%%%%%%%% Index calculation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%[aa,bb] = size(x0);d_p = 9; % Avoid boundary effect impact assessment , Get rid of the reconstructed outer circle img1 = x_iteration(d_p:aa-d_p+1,d_p:bb-d_p+1);  % Rebuild picture img2 = x0(d_p:aa-d_p+1,d_p:bb-d_p+1);           %groundtruthpsnr_result = psnr(img1,img2)[mssim, ~] = ssim_index(img1,img2)

3 Simulation results

4 reference

[1] Li Qingqing . Research on image denoising model based on regularization method [D]. Wuhan University of technology , 2013.​

About bloggers : Good at intelligent optimization algorithms 、 Neural networks predict 、 signal processing 、 Cellular automata 、 The image processing 、 Path planning 、 UAV and other fields Matlab Simulation , relevant matlab Code problems can be exchanged by private letter .

Some theories cite network literature , If there is infringement, contact the blogger to delete .

原网站

版权声明
本文为[Matlab scientific research studio]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206121848335697.html