TP-analyse-donnees/TP3/moyenne.m

17 lines
223 B
Mathematica
Raw Permalink Normal View History

2023-05-29 14:43:44 +00:00
function X = moyenne(im)
I = single(im);
R = I(:,:,1);
V = I(:,:,2);
B = I(:,:,3);
M = max(1, R + V + B);
r = R ./ M;
v = V ./ M;
X = [ mean(r(:)) mean(v(:)) ];
end