Using DCT filter as processing filter
Show older comments
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?
Answers (0)
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!