Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homography Matrix for optical flow #25

Open
skylineagle opened this issue Nov 3, 2020 · 1 comment
Open

Homography Matrix for optical flow #25

skylineagle opened this issue Nov 3, 2020 · 1 comment

Comments

@skylineagle
Copy link

Im trying to use the output of the net (H -> homography matrix) to create an optical flow map
the pred_full is correct and the interpolate returns the correct frame, however when is use the formula the create the map from the matrix i get worng flow values

code use to calc the map:

  • new cord is the cord for frame 2
  • H is homo matrix
 newCord = np.matmul(**H**,oldCord)                      
 newCord[0,:] = newCord[0,:]/newCord[2,:]                                 
 newCord[1,:] = newCord[1,:]/newCord[2,:]
 newX = np.reshape(newCord[0,:],(rows,cols))
 newY = np.reshape(newCord[1,:],(rows,cols))
 dX = newCord[0,:] - X.flatten()
 dY = newCord[1,:] - Y.flatten()```


What am i doing wrong???
@CallMeFrozenBanana
Copy link

May I have a look on your optical-flow and warped img?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants