function [Dictionary]=train(D,n)
param.L = 3; % number of elements in each linear combination.
param.K = n; % number of dictionary elements
param.numIteration = 6; % number of iteration to execute the K-SVD algorithm.
param.errorFlag = 0; % decompose signals until a certain error is reached. do not use fix number of coefficients.
%param.errorGoal = sigma;
param.preserveDCAtom = 0;
param.InitializationMethod = 'DataElements';
param.displayProgress = 1;
disp('Starting to train the dictionary');
[Dictionary,output] = KSVD(D,param);
end
压缩感知字典训练
最新推荐文章于 2024-03-05 12:46:57 发布