This project was inspired by an appreciation for glitch art and an acknowledgement that very few people produce it in video form. It also seemed to fit the general theme of "hacking" in the sense of corrupting something "pure."

What it does

The final version of GlitchGen takes a video input from the command line (or, should the user fail to supply a video input, uses a default video), applies 1-3 random filters (from 5 that we have written) to it, and periodically switches to a different set of filters. It produces a .png image of each frame, stored in the "temp" folder, then stores an animated .gif with a unique filename in the "output" folder.

How we built it

We built GlitchGen using OpenCV, a computer vision and image manipulation library, and Python 2.7. OpenCV enables the majority of GlitchGen's functionality by allowing us to interact with each frame of a video, but it unfortunately does not support the .gif file format. Because of this, ImageIO was used to string together our final .gif.

Challenges we ran into

We had initially wished to use OpenCV with C++ because we are both more familiar with it than Python, but after around 6 hours of effort we were forced to switch to another language. We also had many difficulties with syntax due to a combination of lack of Python experience and lacking documentation for OpenCV (which was often both incomplete and out of date). We also accidentally installed the 32-bit versions of everything and didn't have time to change to 64-bit, which frequently results in errors thrown when processing sufficiently long or high resolution videos.

Accomplishments that we're proud of

We are proud of the fact that we managed to complete a project before the deadline despite our initial complications and inexperience and that we were able to become proficient enough in Python to make use of two third party libraries in GlitchGen.

What we learned

Some of the more significant things we learned about were the importance of properly configured environment variables, the general syntax and data structures used in OpenCV, and the flexibility of python.

What's next for GlitchGen

Given that GlitchGen has only 5 filters at its disposal, the most obvious direction to take it in is to add more filters and to use filters that go beyond the capabilities of OpenCV functions. We attempted to write some of our own filters, but we simply didn't have enough time to complete anything terribly complex. We had also planned to create some means of cleanly transitioning between filters as well as some ability to consider the elements of the video itself when selecting filters, so those things would be interesting to experiment with in the future. The nature of this program is that it could never be considered truly "complete" because one could always add more features.

Built With

Share this project: