I am currently attempting to write a program that acts as a sort of slit-scan mirror. The slit scan effect that I want to achieve looks similar to something like this:
The artist here, Daniel Crooks, takes a clip and edits the video in post processing. What I want to do is employ this effect on a live webcam stream. I have found other sketches that perform the slit scan effect on a live webcam stream, but they do it in a way that I have to tweak. I want to preserve the background, to a certain extent. In the video above, the slit scan effect has boundaries within the frame. Outside of these boundaries, the image is preserved. What I think I have to do is track the motion of the person moving in front of the webcam, and have the slit scan originate from the person at that point in the frame. I have run in to a few issues with this. I am able to track motion, but in the sense that I can detect it. It seems that I cannot find some sort of average position of this motion, the center of the motion, that I need to start the slit scan from. I know this is a semi confusing post and I will post some of my source code... and hopefully this can be a working processing that can eventually result in something. Thanks. Any suggestions on readings, code examples, anything, greatly appreciated.