资源简介
TV正则化对图像去噪。 matlab代码,导入图片直接可以运行。TV正则化对图像去噪。 matlab代码,导入图片直接可以运行
代码片段和文件信息
clear all;clc;
%--------------------------------------------------------------------------
% Total Variation Regularization Method
%--------------------------------------------------------------------------
I = imread(‘0.tif‘);
% load(‘C:\Users\admin\Desktop\matlab.mat‘)
% I=matrix;
figureimagesc(I);
title(‘Original Image‘);
xlabel(‘No:of pixels‘);
ylabel(‘No:of pixels‘);
N = 32; % Image Size
I_res = reshape(IN^21); % Image Vector
% Computing the PSF
b = 10; % Band
s = 7; % Sigma value
Z = [exp(-([0:b-1].^2)/(2*s^2))zeros(1N-b)];
A = toeplitz(Z);
A = (1/(2*pi*s^2))*kron(AA); % Point Spread Function
% Addition of Gaussina Noise
% noise = imnoise(I‘gaussian‘00.005);
for n=1:32
noise(:n)=awgn(I(:n)10*log10(1/(0.05)^2)‘measured‘);
end
figureimagesc(noise);
title(‘Noise added to the image‘);
xlabel(‘No:of pixels‘);
ylabel(‘No:of pixels‘);
% Creating Noise Image.
x = zeros(NN);
noisex = imnoise(x‘gaussian‘00.005);
figureimagesc(x);
figureimagesc(noisex);
title(‘Noise‘);
% Lexicographic Arrangement of Noisy image
Nr = reshape(noise32^21);
lg_Nr = double(Nr);
% g is the blurred image
% I_res is the resized image to 32*1
% I_org is the image restored back to original size of 32*32
g = A*lg_Nr;
I_blur = reshape(g3232);
figureimagesc(I_blur);
title(‘Blurred and Noisy Image‘);
xlabel(‘No:of pixels‘);
ylabel(‘No:of pixels‘);
% Computing the Least square method
% using in-built command
lsinbuilt = lsqr(Ag);
imagesc(reshape(lsinbuilt3232));
title(‘Least Square Output using the inbuilt Matlab command‘);
xlabel(‘No:of pixels‘);
ylabel(‘No:of pixels‘);
% Least suqares using formulation
inverse = (transpose(A)*A)^-1*transpose(A)*g;
lsrest = reshape(inverse3232);
figureimagesc(lsrest);
title(‘Least Square Output using the formulation‘);
xlabel(‘No:of pixels‘);
ylabel(‘No:of pixels‘);
fixed_iter = 512; % fixed point iteration
% fixed_iter = 10; % fixed point iteration
beta = 0.1; % Smoothing factor
lamda = 1.5e-05; % Regularization parameter
% Non-Linear Equation
% Computation of Regularization operator:
n = 32;
nsq = n^2;
Delta_x = 1 / n;
Delta_y = Delta_x;
D = spdiags([-ones(n1) ones(n1)] [0 1] nn) / Delta_x;
I_trunc1 = spdiags(ones(n1) 0 nn);
Dx1 = kron(DI_trunc1); % Forward (upwind) differencing in x
Dy1 =
相关资源
- 基于matlab的路面裂缝检测识别系统设
- 基于matlab的DCT变换对灰度图像进行压
- 基于MATLAB图像处理的汽车牌照识别系
- matlab读取并显示遥感img图像,包含单
- 动物图像多分类识别MATLAB可运行
- 图像匹配matlab程序设计
- OMP算法对图像恢复
- 基于灰度投影的图像配准MATLAB
- 红外图像的处理及其MATLAB实现.zip
- 基于matlab的图像篡改检测2
- Matlab基于阈值的图像分割直方图算法
- 基于差值法的图像变化检测代码MATL
- 图像放大缩小Matlab-带GUI线性插值-最邻
- 均值滤波MATLAB代码实现
- 图像分割分水岭算法MATLAB源代码
- 图像边缘提取和周长计算
- 分形图像压缩源代码
- 图像lbp特征提取的MATLAB实现源码
- 求sena.IMG的一阶熵,二阶熵和差分熵的
- 利用聚类技术实现纹理图像分割
- 图像变化检测MATLAB
- 图像加噪声后进行分割
- 彩色图像两种方法实现matlab滤波
- 基于MATLAB的小波图像去噪
- 2015数学建模A题matla视频提取图像帧
- MATLAB-图像灰度化处理
- 区域生长图像分割-MATLAB程序,注释比
- 计算两幅图像的psnr值matlab
- 基于互信息的图像配准程序
- MATLAB多视点图像合成GUI
评论
共有 条评论