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

14 lines
236 B
Matlab

function AD = attache_donnees(I, moyennes, variances)
n = length(moyennes);
AD = zeros([size(I), n]);
for i=1:n
AD(:,:,i) = log(variances(i)) + (I - moyennes(i)) .^2 / variances(i);
end
AD = AD / 2;
end