TP-traitement-audio-visuel/TP10/debruitage.m
2023-06-22 20:47:16 +02:00

19 lines
354 B
Matlab

function Y_debruite = debruitage(Y_sb, Y_b)
mu = mean(Y_b, 2);
sigma = std(Y_b, 1, 2);
alpha = 2;
masque = abs(Y_sb - mu) > abs(alpha * sigma);
masque = double(masque);
masque = imgaussfilt(masque, 5);
masque(masque == 0) = 0.01;
% imagesc(masque);
% axis xy;
% colorbar;
Y_debruite = Y_sb .* masque;
end