Everyone loves multitouch tables
ofcourse yes! it is so exciting! But what if you dont have one. I was thinking of how can I archive similar (or any kind of) expierence without such table. The first thing I though was to use a web camera to track motion behaviours and then to use them in application. Ofcource you only can track moving in different directions but this is cool too
There are tons of motion tracker examples around the web. But I didn’t find any that could track separate objects moving at once. And also there are no examples showing direction of the detected motion.
No surprise I decided to create one. Here is a small example of motion tracker that can handle more then one moving object and also detects its direction.
Camera Motion Tracker
You will need flash player 10 and web camera
And I also found it interesting to use this tracker for Fluid Solver iterations:
Camera controled Fluids
Hight Quality video (160Mb)

wow!absolutely cool!
Reminds me of “Minority Report”!
Webcam Gesture recognition~~
160 MB and no streaming?? rright.
any way, there is this guy, check it out: http://animateme.wordpress.com/2009/02/22/its-a-boy/
@makc There are two links for the video. one is to vimeo and one for high quality.
Also the link that you provide is tracking color objects on mans hands and head. Look at him on the video he has black (or some other color) rectangles on his hands and on the head! It is not the same as I’m showing here…
Hey Eugene. Looks great. Always wanted to try this but could never think of an approach that didn’t involve a huge amount of pixel analysis. Perhaps there is a lot of processing in the background.
Any explanation on how you tackled this? I guess you are using Guy Watson’s motion capture code, blurring the result with another threshold applied then using a grid of getPixels to find the edges of the resulting blobs? Am I close?
@James First of all thanx for the comment.
To tell the truth I’ve not seen Watson’s code… In my example there are folowing steps:
1. Convert image to grayscale and apply blur. I’m using 4×4 blur
2. Then I’m loop through blue channel of the previous and current image pixels to compute difference and threshold (I’m doing this on one loop th maximise speed) All results I’m saving to Vector object. Basicly it contains only 0xFF and 0×00 colors as result.
3. Then I run border extending operations on this Vector array. (kinda dilatation analogue but it could be skiped)
4. Blob detection is pixel by pixel but though Vector array of black and white colors. I’m looking for neightbor white pixels and attach them in to groups. Then some sorting…
Pretty simple I suppose. Sure you dont need big image for that so you can reduce its size to 320×240 before computations.
Hi Eugene! Great stuff, it worked with my head for the very first time! And I love the way you indicate direction with an arrow. Check my blog post about very fast blob detection, it may be handy if you want to optimise your routine: http://play.blog2t.net/fast-blob-detection
@Og2t I’ve already seen you post and I am going to try this algorithm to improve speed, but now it works pretty fast for me. the worst part is to detect direction of every blob. It takes lots of CPU. As for my example I’m using Region Growing algorithm
How about comparing the difference between the position of the same blob in two frames?
@Og2t thats what I do. But I dont see the way to store blobs from frame to frame. What if motion of frame will have such strength that you cant know what blob moved to new detected position? You will need to find the closest to this position from known blobs but what if this one none of available but new one?.. lotsa things that moved me to detect blobs on every frame and then track the difference between frames in particular blob area.
Hey this is really cool. I love your fluid solver and had been hoping to do something like this, but hadn’t gotten around to it yet.
I think you are going to have a problem of nowing which blob is which anytime the motion is very great or anytime there is a high concentration of blobs in any small area.
Here are some things I found that might be helpful to you.
nuigroup.com
http://www.sakri.net/blog/2009/05/28/detecting-edge-pixels-with-marching-squares-algorithm/
I’ve also seen somewhere that is using k-nearest neighbor algorithm to track the motion of blobs between frames.
hi!
we saw your work and its amazing! we are looking for that kind of code for long
time now, and we couldn’t find anything on the web. we are two student for interaction design and we will really need your help. we have a one object tracker, and we want to develop it to a multiple objects tracker. we really hope that you can give us some tips, or even let us look at the code. any way, it is an impressive work.
cheers Noga&Orly.