17 lines
223 B
Matlab
Executable file
17 lines
223 B
Matlab
Executable file
|
|
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 |