TP-probleme-inverse-3D/TP7/correction.m

14 lines
280 B
Mathematica
Raw Permalink Normal View History

2023-06-25 14:38:01 +00:00
function I_bar = correction(I, masque)
masque2 = find(masque);
[U, Sigma, V] = svds(I(:, masque2(:)));
U_bar = U(:,1:3);
Sigma_bar = Sigma(1:3, 1:3);
V_bar = V(:, 1:3);
I_bar = zeros(size(I));
I_bar(:, masque2(:)) = U_bar * Sigma_bar * V_bar';
end