please correct TV-L2 inpainting code

조회 수: 7 (최근 30일)
yuya watabe
yuya watabe 2018년 6월 25일
편집: yuya watabe 2018년 6월 25일
i make image inpaint code with TV-L2. but this code dont show pic how can i chage to work code.
%
u=imread("pic.jpg")
lalambda = 0.5;
epsilon = 0.001;
p = 0.0005;
N = 2000;
u = ub;
for i = 1:N
[ux,uy] = grad(u);
normgrad = sqrt(ux.^2+uy.^2+epsilon^2);
u = u - p*(u-ub-lambda*div(ux./normgrad,uy./normgrad));
end
figure(3);imshow(u,[]);

답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by