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

empty H matrix #13

Open
offirk opened this issue Nov 5, 2019 · 2 comments
Open

empty H matrix #13

offirk opened this issue Nov 5, 2019 · 2 comments

Comments

@offirk
Copy link

offirk commented Nov 5, 2019

Hi,
when I run './data/shaky-5.avi', i get the following error:
File "/home/ubuntu/Video_Stabilization/Mesh-Flow-Video-Stabilization/src/MeshFlow.py", line 21, in point_transform
a = H[0,0]*pt[0] + H[0,1]*pt[1] + H[0,2]
TypeError: 'NoneType' object is not subscriptable
it seems that openCV doesn't always manage to find a homography matrix, due to a very small number of features found. this, of course, can be fixed by changing the 'feature_params', but I was wondering if anyone encountered this with the original code.
I run with Python 3.

thanks, Offir

@stalestar
Copy link

@offirk Hi, i encounter the same error, have you fix it ?

@offirk
Copy link
Author

offirk commented Feb 27, 2021

I changed the way I search for features (to decrease the probability for not finding enough features) and added a check for the case where no homography was found, to use the last homography (from the previous frame) as the current homography.

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