Can any body tell me how to implement KSVD in matlab?
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Yuva Kishore Reddy Nayannagari
el 4 de Mzo. de 2016
Editada: Royi Avital
el 19 de Dic. de 2020
i am doing the project on "quaternion matrix analysis of color image using vector sparse model" so i need to implement ksvd so can please anynoe help me???
0 comentarios
Respuestas (2)
Royi Avital
el 4 de Mzo. de 2016
Editada: Royi Avital
el 19 de Dic. de 2020
Here is a function which implements the K-SVD algorithm.
function [ mD ] = DL_KSVD( mD, mX, paramCardinality )
numberOfAtoms = size(mD, 2);
for ii = 1:50
%<! Update the Representations
mA = Omp(mX, mD, paramCardinality);
%<! Update the Dictionary
for jj = 1:5
mE = mX - (mD * mA);
for kk = 1:numberOfAtoms
vP = find(mA(kk, :));
mEP = mE(:, vP) + mD(:, kk) * mA(kk, vP);
vA = mD(:, kk)' * mEP;
mA(kk, vP) = vA;
mD(:, kk) = mEP * vA' / (vA * vA');
end
end
mD = bsxfun(@rdivide, mD, sqrt(sum(mD .^ 2, 1)));
%%Progress (Debug):
% mA = omp(mD' * mX, mD' * mD, cardinality);
% mX_hat = mD * mA;
% A = mean(abs(mX(:) - mX_hat(:)))
end
end
The Omp() function mA = Omp(mX, mD, paramCardinality) solves mD * mX - mA_2 s.t. each column of mA has cardinality (L0 Pseudo Norm) less equal to paramCardinality. It uses the Orthogonal Matching Pursuit method.
1 comentario
RS SHARMA
el 29 de Abr. de 2018
can i have function omp(mX.mD,cardinality). cardinality means what value..give example.
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!