This is both an investigative and artistic exercise that converts all the frames in a video into low poly frames and sees if it improves compression in native H.264. An extension to this will create a custom encoding algorithm that compresses low poly frames and benchmarks that against the native H.264 compression.
Screenshot from low poly version of matches video
Screenshot from low poly version of trains video
Please download the sample videos in the demo folder to see the low poly compression of various media.
They look pretty cool, so you should check it out!
- Waves scene from interstellar
- A burning match
- A train going over a bridge
- Great Waves off Kanagawa
- Soccer ball
- Clone git repository
pip3 install -r requirements.txt
Run the following command on terminal, in the same folder as the python scripts:
python3 gen_vid.py [INSERT_IMAGE_OR_VIDEO_FILE_HERE]
If you want to increase the number of nodes (triangles) in the frame, in the gen_vid.py file, in lines 15, 34 decrease the node_factor to a value between 0 and 1. If you want to decrease the number of nodes, increase the node factor. (The default is 1.)
-
Improve compression algorithm and utilize the videos polygon composition to optimize video storage and program runtime.
-
Run various tests to measure utility.
Loosely adapted and improved upon some algorithms from:
Qian, Crystal J. Generating Low-Poly Abstractions. Princeton University, 2016.