Using DCT filter as processing filter
Afficher commentaires plus anciens
Hello, I'm trying to implement this simple denoising filter (attached also): http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6877832
function output = dct_filter(I_bw) % import a double grayscale image
X = dct(I_bw); % apply DCT
Xs = sort(abs(X(:)),'ascend');
% Determine the 30% of the DCT coefficients are significant
low_band = Xs((1:ceil(length(Xs)*0.3)));
max_low = max(low_band);
sigcoeff = (abs(X) <= max_low);
% Reconstruct the signal using only the significant components.
X(~sigcoeff) = 0;
output = idct(X);
end
Has anyone ane idea why doesn't it work?
Réponses (0)
Catégories
En savoir plus sur Multirate Signal Processing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!