Borrar filtros
Borrar filtros

I want to remove noise using multi resolution SVD.

1 visualización (últimos 30 días)
sufian ahmed
sufian ahmed el 6 de Jun. de 2017
Here is my code . i want to remove noise using this multi resolution SVD. but it not works. After execution noise still exists. please someone modify this code so that it will remove noise Thanks.
Here is the algorithm which i want to implement.i got it from a research paper. i also include the paper here.
ference image (ground truth)
imt = imread('eight.tif');
imt= im2double(imt);
imt=imresize(imt,[256,256]);
figure; imshow(imt);
J = imnoise(imt,'salt & pepper',0.1);
figure, imshow(J);
%apply MSVD
[X1, U1] = MSVD(J);
%apply IMSVD
imf = IMSVD(X1,U1);
%%%%%%MSVD %%%%
function [Y,U] = MSVD(x)
% multiresolution SVD (MSVD)
% input-> x: image (spatial domain)
% outputs-> Y: one level MSVD decomposition of x
% U: the unitary matrix (U in SVD)
% x=imresize(x,[256,256]);
[m,n] = size(x);
m = m/2; n = n/2;
A = zeros(4,m*n);
for j = 1:n
for i = 1:m
A(:,i + (j-1)*m) = reshape(x((i-1)*2+(1:2),(j-1)*2+(1:2)),4,1);
end
end
[U,S] = svd(A);
U
S
T = U'*A;
Y.LL = reshape(T(1,:),m,n);
Y.LH = reshape(T(2,:),m,n);
Y.HL = reshape(T(3,:),m,n);
Y.HH = reshape(T(4,:),m,n);
%%%%IMSVD %%%%%
function[x1] = IMSVD(Y,U)
% inverse MSVD (IMSVD)
% Inputs-> Y: MSVD coefficients & U: unitary matrix (U in SVD)
% output-> x: image (spaitial domain)
[m,n] = size(Y.LL);
mn = m*n;
T1 = zeros(4,mn);
T1(1,:) = reshape((Y.LL),1,mn);
T1(2,:) = reshape((Y.LH),1,mn);
T1(3,:) = reshape((Y.HL),1,mn);
T1(4,:) = reshape((Y.HH),1,mn);
% figure,imshow(Y.LL,[]);
A1 = U * T1;
x1 = zeros(m*2,n*2);
for j = 1:n
for i = 1:m
x1((i-1)*2+(1:2), (j-1)*2+(1:2)) = reshape(A1(:,i+(j-1)*m),2,2);
end
end
figure,imshow(x1,[]);

Respuestas (0)

Categorías

Más información sobre Denoising and Compression en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by