We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
movement vector from video (Read 587 times)
movement vector from video
Apr 10th, 2008, 7:24pm
 
hi,

i need to do a project something like in this video. http://www.youtube.com/watch?v=y6izXII54Qc

this is a project they are screening on theaters before the movie, and the audience participates with the game (simple arkanoid game) via changing their position or their hands position.

i've accomplished this with tracking changing blobs, and if the blobs are on the right half side of the screen, i would consider a right move, if they are on the left side of the screen, i would consider it a left move. however, this would be a cheat and not the best way to do it.

any suggestions?

Best Regards,
Alp
Re: movement vector from video
Reply #1 - Apr 22nd, 2008, 7:53am
 
Hello Ungaro,

I am new to processing and have been playing with it since a few days.

I am interested by something similar: I would like to analyze the captured video in real-time and determine if people are, in average, walking to the left or to the right.

I am currently getting familiar with video capture, and playing with pixels, but this takes time (on my evenings).

My first idea for movement detection was to re-use the example script of "frame differencing" (see examples received with processing). I would like to try to compute 2 differences:
d1 = the current frame - (the previous frame with horizontal offset to the left)
d2 = the current frame - (the previous frame with horizontal offset to the right)
I imagine that the smallest difference indicates the direction of movement.. but this is just an intuition. I will have to check that..

Of course, instead of computing the whole frame difference, one could imagine to work on a few areas distributed in the image (as an autofocus would do).

I can put some feedback here in the next days (or only this week-end) if you are interested...
Page Index Toggle Pages: 1