TP-traitement-audio-visuel/TP4/attache_donnees.m

14 lines
236 B
Mathematica
Raw Normal View History

2023-06-22 18:47:16 +00:00
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