how4rd/meshflow

About the speed?

Closed this issue · 1 comments

Hi, thanks for your great work.

I am not an expert in video stabilization. I wonder what the speed should be of the algorithm. I try to run the given video1, but takes nearly 10 minutes. In my opinion, the algorithm should have been computationally cheap. Is that because of the python language itself?

Thank you!

I'm no expert either. My main goal with this implementation was to learn, so whenever I had to decide between making the code faster or more readable, I made it more readable. As a result, the code runs rather slowly. 10 minutes sounds about right.

Yeah, I think Python the main reason the code is slow. The implementation uses lots of for loops, which are much slower in Python than in C/C++. I don't think the matrix math is the bottleneck, since it's done through NumPy and OpenCV functions, which are wrappers for C/C++ code.