TP-probleme-inverse-3D/TP2/estimation_E.m

20 lines
422 B
Mathematica
Raw Normal View History

2023-06-25 14:38:01 +00:00
function E = estimation_E(w1, w2)
A = zeros(size(w1, 1), 9);
for i=1:size(w1, 1)
A(i, :) = kron(w1(i,:), w2(i,:));
end
% on chope e à partir des valeurs propres de A'A
[V, D] = eig(A' * A);
e = V(:, 1);
% on obtient E à partir de e
E = reshape(e, 3, 3);
% on force les valeurs singulières de E
[U, S, V] = svd(E);
E = U * [1 0 0; 0 1 0; 0 0 0] * V';
end