Porting C++ to Python

I’m trying to write a Python version of this project (written in C++).

I believe I used the same OpenCV functions and procedure, but I couldn’t get it write.

Any help is appreciated!

please understand, that noone here will just go and translate the whole thing for you.

so, please, start on your own, and come back with small, isolated problems, where your attempt failed.

The algorithm is quite simple, there shouldn’t be serious problems rewriting it in Python…

BUT… using for loops in Python is VERY slow. So you must find a way to write this algorithm using matrix operations.

or use numba, but that’s a task for after the code works. get it working first.