Ben Seco
P3 - Time-segment Images in Live Video

My project consists of a collection of video effects propagated on your live webcam feed. When I first decided to work with video, I was thinking about taking a premade video and combining all the frames into a single image as a sort of "4 dimensional image." But, as loading video into OpenCV is not particularly easy or fun, I decided, hey, let's do it live! So I adapted my idea to live video—now, taking a set of frames in the past (a segment of time) to combine and manipulate and produce the effects below in real time.

In the first set of functions (4D and 4D Delay), I use color as an "extra dimension" to show objects as they were in the past. I made two functions that do this slightly differently: one which captures the immediate past (the last X frames, seen in the leftmost image below), and one which displays past frames at a certain time delay (the other three images below).

Another function (Ghost) aims to remove moving elements (things that change over time) from the video feed. This is accomplished by calculating a running average and severely diminishing the effect of changing pixels on the average.

The Peek function uses the difference between frames (across a specific memory length - 10, by default) to create a mask. The mask is then used to combine the webcam frame and the provided image. The result: as you flail your arms, you “push away” the current reality and “peek” into a higher dimension!

I also wrote another function called "Naughty." It works like a haunted mirror! If you want to see how it works, please ask and I would be happy to show you. It's just not something that can be easily shown in images or video.