Info

此问题已关闭。 请重新打开它进行编辑或回答。

please explain the following code

1 次查看(过去 30 天)
D Joseph
D Joseph 2015-7-27
关闭: Stephen23 2015-7-27
function [y] = DTV(I,lamda,theta)
h=[1 -1]; g=[-1 1];
R = exp(1i*theta); vx = zeros(size(I)); % the vector fields vy = zeros(size(I)); MAX_ITER= 100;
%wb = waitbar(0,'Please wait,DTV...'); for iter = 1:MAX_ITER, %waitbar(iter/MAX_ITER,wb) ux = vx; uy = vy; u = R*(ux + 1i*uy); ux = conv2(real(u),g,'same'); uy = conv2(imag(u),g','same'); % subtract from I u = I - lamda*(ux + uy);
ux = conv2(u,h,'same');
uy = conv2(u,h','same');
u = lamda*conj(R)*(ux + 1i*uy);
vx = vx + real(u);
vy = vy + imag(u);
% now apply the threshold
m = abs(vx + 1i*vy);
ind = (m > 10^(-10));
m = max(1,m);
vx(ind) = vx(ind)./m(ind);
vy(ind) = vy(ind)./m(ind);
end
%close(wb);
u = R*(vx + 1i*vy); ux = conv2(real(u),g,'same'); uy = conv2(imag(u),g','same'); u1=ux+uy; % subtract from x y = I - lamda*(u1);

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by