inverse vector fields obtained by optical flow
11 次查看(过去 30 天)
显示 更早的评论
How can I invert a vector field(vf)?vf's inverse is not unique and need to be estimated in an optimal manner like fixed point iteration or any other iteration techniques. I wrote a code and want you to check it if it's correct or not. if true function p=testfixpointt(v) [N,M]=size(v); p(1:N,1:M,1)=0; conv=1e-5; err=1; n=1; while err>conv for i=1:N for j=1:M if (i+p(i,j,n)==0 j+p(i,j,n)==0) continue end if (abs(i+p(i,j,n))>N ||abs(j+p(i,j,n))>M) continue end p(i,j,n+1)=-v(ceil(abs(i+p(i,j,n))),ceil(abs(j+p(i,j,n)))); end end err=abs(p(:,:,n+1)-p(:,:,n)); n=n+1; end end
1 个评论
Yash
2013-9-27
if you can post the code using the code posting method in this forum then this will be good.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Accelerators & Beams 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!