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
stromotion diy? a real nutcracker! (Read 1510 times)
stromotion diy? a real nutcracker!
Apr 17th, 2007, 1:33pm
 
Hi dear Processing guru's

I've got a real nutcracker here! I want to know whether it is possible to create a sort of realtime stromotion effect with the videocapture tool in processing? This capturemethod is used a lot in sports and I want to adapt it for a study project. To give you an idea what stromotion is here are two links:

http://www.dartfish.com/data/document/document/18.jpg
a still image(would it be able to get an image like this, for instance 4 seconds after you press a button?)

http://www.dartfish.com/data/document/document/558.wmv
or a movie (realtime?)

Would it be possible by using transparency? Please give me some ideas on how to do this!

regards
janalleman
Re: stromotion diy? a real nutcracker!
Reply #1 - Apr 17th, 2007, 2:18pm
 
Taht looks an awful lot more complicated than just using transparency.

If the camera and background were fixed, you might be able to use a blob-detection library, and cut out moving objects ocasionally and superimpose them (with a suitable mask) onto a copy of the background. But that's not simple.

If the camera is moving as well, then it gets a whole order of magniture more complex. You need to motion track the background as well as extracting the region of interest, and then moving the captures parts correctly with the background.
Re: stromotion diy? a real nutcracker!
Reply #2 - Apr 17th, 2007, 3:12pm
 
Ok than I'm in luck cause the camera and the background are fixed. I want to film squash players during a game, and get a life feed of the action like the stromotion or like a stroboscoop photograph. I can't however use that since a flash is rather annoying during a game.

With a fixed camera, could I use different layers (like in photoshop, and let the top layer be the most recent one and change the transparancy according to the hierarchy? This way the different positions will be more or less transparant depending on the time they were taken.... Is this possible to do realtime in processing? I made a mockup of this in photshop with 3 stills of a video. It shows where the players are moving. www.student.tue.nl/n/c.j.p.g.megens/1.jpg

However transparancy has it's limits to show the action and more than 4 images are hard to see, because each image is blocking for about 50% the underlying image. Is there a better way? I'm relatively new to processing, but have some experience with arduino. blob-detection seems hard to me though, any other ideas? or ideas how I could implement blob-detection?
Re: stromotion diy? a real nutcracker!
Reply #3 - Apr 17th, 2007, 5:31pm
 
Assuming a rock-solid camera - What you might try is first grabbing the plain background, that'll be your "chroma key" field.  Then for each frame of interest, pixel by pixel compute the rgb difference with your key frame.  Use that difference (or some alteration of it, as needed to change the response curve, for example use the sqrt of the difference) as the alpha value to determine how much that new pixel should contribute to your accumulation image.  So that in theory only pixels that changed significantly (the athlete) are copied with any opacity.
Re: stromotion diy? a real nutcracker!
Reply #4 - Apr 17th, 2007, 6:58pm
 
Ok, that sounds great and complex at the same time Smiley Is processing able to do this? and if so, will it be able to do this realtime?

and how should i start with scripting this? sorry I'm just starting...
Re: stromotion diy? a real nutcracker!
Reply #5 - Oct 9th, 2008, 4:14pm
 
I did something similar: http://blog.datasingularity.com/?p=72 . It only works for a still camera. In the example movie, the algorithm is done every frame. It could be, however, done whenever you want like when you hit a button or every X seconds.
Page Index Toggle Pages: 1