Digital Matrix Rain

Python , OpenCV

One of the most famous movie franchises that has had a significant impact on the film industry and influenced the media arts world was ‘The Matrix’. It was a science fiction action film which is set in the dystopian future in which reality as perceived by most humans is actually a simulated reality called "the Matrix", created by sentient machines to subdue the human population, while their bodies' heat and electrical activity are used as an energy source.

It is widely regarded as one of the greatest science fiction films of all time.

 One of the most interesting features of the film was the green downward flowing code, which was a characteristic mark of the franchise.

In the film, the code that comprises the Matrix itself is frequently represented as downward-flowing green characters. This code utilizes a custom typeface designed by Simon Whiteley, which includes mirror images of half-width kana characters and Western Latin letters and numerals. The color green reflects the green tint commonly used on early monochrome computer monitors.

In the films, a few people can understand what happens inside the Matrix by looking at the code on computer monitors. Operators from Zion, unable to enter into the Matrix, concentrate on ways to read the scrolling code, or "rain", and infer data from it such as the location of a person in the City, possible exits, and so forth. As the character Cypher explains in the first film, the programming of the Matrix is so advanced that it is impractical to view an image translation, as "there's way too much information to decode the Matrix." The complex "Matrix code" of raining green characters and pictograms allows the Matrix program to be concisely represented and thus read more easily.

 

matrixcharacters-765438.jpeg

 

Implementation:


For my final project, I have attempted to recreate this effect using OpenCV & Python in the form of an installation. It gives you the opportunity to visualize your own reflection as Neo as depicted in the Matrix Reloaded poster. Till date, no one has been able to ‘decode’ the Matrix, hence it is impossible to correctly replicate it. However my motive is not to recreate the exact effect, but creating my own version through experimentation.

·       In my project, I have used image filters to convert the input video stream into a green & black frame using color manipulation, binary thresholding and motion blur.

·       I have also used face detection so the matrix emerges only when a face is detected in the space.

·       Using random digit generators, I have filled the background with downward scrolling digits, which due to the motion blur add the matrix effect. This is further highlighted in the long exposure image, as the digits get blurred further and are unrecognizable.

·       I have used the successive frames from the video capture to create a long exposure image of the video.

·       The image obtained isn’t equally distributed through the frames, as I have used a sinusoidal function to vary the contributions of each frame.

 

Screen Shot 2014-03-20 at 12.56.28 PM.png
Screen Shot 2014-03-20 at 12.56.08 PM.png

 

Screen Shot 2014-03-20 at 12.55.19 PM.png

 

http://en.wikipedia.org/wiki/Matrix_digital_rain

 

http://en.wikipedia.org/wiki/The_Matrix

 

http://maltaannon.com/articles/after-effects/the-matrix-raining-code/

 

My github gists can be found here:   https://gist.github.com/mohithingorani