optimization
To run code you need OpenCV 3 library, good tutorials of how to install it you could find here pyimagesearch.com
Python version is 2.7.12
Not to compile this code use: ./compile.sh
To run from python import mainpy mainpy.run('226.mp4')