Photo by Sean Foley on Unsplash

Computer Vision for Vaporwave Art

Using modern tech for artistic pursuits

Reading through publications and implementing practical algorithms is exciting, of course. I enjoy finding clever ways to segment images, detect people being jerks, or even help a robot get through a farm. Yet, there are weeks in which I don’t want to use computer vision for anything meaningful. On days when the brain is feeling especially smooth, it’s relaxing to let the code pour from the fingers and use the field for a benign purpose.

This week was one of those weeks. In addition to my involvement in technology, I enjoy fashion and art. I recently discovered a fringe art form known as Vaporwave. The form adopts elements of popular internet era art forms such as glitch art and chillwave. Vaporwave differs from these other forms with its emphasis on nostalgic topics, often using 1980’s style pop art from American and Japanese culture. Graphical user interfaces (GUIs) of the 90’s and early 2000’s are also common gimmicks. Such objects illicit feelings of simplicity, when personal computers were still nascent and the tech industry was considerably more tame.

Vaporwave has many forms and is seen in digital media and fashion!

Growing up during the cross of the millennia, I felt these pieces paid homage to my upbringing. Being an active image processing programmer, I decided to partake in the art form. I developed a short Python script that Vaporwaved any given photo.

Glitch Art - Method

In image processing and computer vision, it’s common to use digital operations to clean noise and isolate items of interest. This project did the complete opposite. The goal was to add noise and destroy the image, but in a tasteful manner.

One of the features of Vaporwave art I wanted to include was glitch art. This is when digital errors are purposely used to make artistic patterns. This art form has an especially powerful sense when applied to the human face.

Useful libraries, such as OpenCV, make facial recognition fairly simple. OpenCV has models that can be used to detect different facial poses and features. I specifically wanted to develop functions that would manipulate the whole face or just the eyes. Using Haar cascades and some parameter tweaking, faces and eyes where picked up in the majority of images.

Facial detection results. Images by demegree

Knowing the location of the face, there were two primary facial glitches I wanted to perform, face dragging and static glitching. Face dragging is the effect of selecting a region on the face and pulling a line of pixels in the region across the image. This effect is reminiscent of GUI’s on old computers that lagged when dragged or moved. Static glitching is a more common effect. This is often seen when a television’s connection is poor. The pixels on the screen will appear to jitter laterally.

Ah, good old days.

Both of these elements were fairly straight forward to implement. The face glitch was performed by randomly selecting a direction to drag the face. A random x-axis or y-axis position on the face was selected as the line that would be dragged. The pixels in this line were then copied along a set of rows or columns

For the static glitching, the face was divided into a random number of strips. Each strip was moved either left or right by a random distance.

Face Dragging (Left) and Glitch Static (Right)

“The eyes are a window to the soul” is a common artistic platitude and Vaporwave often places emphasis on the feature. Eyes are often occluded by a black bar, a reference to how broadcasting stations used to censor individuals. A earlier displayed piece in this article includes this. Occasionally pupils are completely removed in images, to mimic Greco-Roman statues.

Eye Glitch Drag, Source

A more rare, yet fascinating effect I’ve seen is the glitch drag of just the eyes. This is similar to the face drag effect, however, only portions of the eye are dragged to create a crying and sullen appearance. I find this style either absolutely captivates viewers or makes their skin crawl.

The censor bar required a moderate use of geometry. After finding the centers of both eyes, I found the vector that connected the two points. I then used the perpendicular unit vector multiplied by some scalar magnitude to find the corners of the censor bar relative to the both eye centers.

The eye drag effect was similar to the face drag. Instead of pulling the whole eye down as a single column or row, I descritized the eye into strips and pulled them down individually by a random length.

Eye Drag (Left) and Censor bar (Right)

Vaporwave Art — The Final Touch

As I mentioned previously, Vaporwave art is more than just distorting an image horrendously. My pieces didn’t quite feel complete without those 80’s and 90’s references. So I took a bunch of images and symbols of the zeitgeist, combined them with a couple of random generators and threw them in there.

To top it off, I added a high contrast filter and blasted the image with Gaussian noise to give the picture an old cathode ray tube television and computer aesthetic.

Gallery & Results

I’m incredibly pleased with the results of this project. When I started writing the script, I didn’t have incredibly high expectations. However, due to the complete randomness of the program, some tasteful results were occasionally generated.

Furthermore, as someone in the technical field, I didn’t expect to use my skillset to generate art. This program is a fairly good demonstration of an artistic application of the burgeoning field of computer vision. For those that demand a practical application, such a program is similar to what Snapchat, the social media application, does with its facial filters.

As fun as this program was, I do not see myself committing too much more time to it. That being said, the program does have a few incomplete features that I welcome the interested to develop. I wanted to add random “edgy” text on top of the censor bars, another cliche in Vaporwave art. A link to the code is at the end of the gallery.

Yours Truly

The above images were originally taken by Demegree (except of the one of me).

Honorable Mention

As great as some of these pictures are, it’s important to acknowledge that this script is incredibly random. I picked out some of my favorite in the selection. Occasionally, some generated pieces are absolutely bonkers.

Houston, we have lift off

We get it…

Code