intérprétation Fonction matlab
Bonjour
est ce que quelqu'un pourra m'aider à écrire cette fonction
[IMG]D:\Users\Hichem\Desktop\s[/IMG]
Citation:
(NormeGrad(im, x, y) = racine carré(Dx(im, x, y)2 + Dy(im, x, y)2)
(la traduire en langage matlab) j'ai pas su comment l’écrire. et voila l'algorithme ou je veut la mettre
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| function debruit (im,dt,alpha,iteration)
%variation(Image im, R´eel pos dt, R´eel pos alpha, Entier pos iteration)
%-> Image
sortie = I
tempo = I
for n = 0:500
for y = 0 :499
for x = 0 :499
grad = NormeGrad(tempo, x, y);
if (grad> epsilon)
cnt = 1/(2 * grad);
dnt = Dntnt(sortie, x, y);
imwrite (tempo, x, y, dt * (alpha * (dnt * cnt) - 2* (imread (sortie, x, y)) - imread(I, x, y))+ imread (sortie, x, y))
end;
end;
end;
end;
sortie = tempo; |