TP-traitement-audio-visuel/TP9/kaczmarz.asv

25 lines
339 B
Plaintext
Raw Normal View History

2023-06-22 18:47:16 +00:00
function f = kaczmarz(p, W, n_boucles)
% n_pixels = size(W, 2);
% n_mesures = size(p, 1);
[n_mesures, n_pixels] = size(W);
W = W';
f = zeros(n, 2);
for k = 1:n_boucles
for i = 1:n_mesures
Wi = W(:,i);
f = f + (p(i) - (Wi * f) / norm(Wi) * Wi';
end
end
end