inverse vector fields obtained by optical flow

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 Kommentar

Yash
Yash am 27 Sep. 2013
if you can post the code using the code posting method in this forum then this will be good.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Gefragt:

am 27 Sep. 2013

Kommentiert:

am 27 Sep. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by