Webcam Depth

Jul 14, 2013 at 7:14am

Webcam Depth

Hi guys.

Below is a segment of a patch I am working on which is working towards gestural recognition, very simple stuff atm. However, I am just curious to know a bit more about tracking depth (z axis) with webcams.

Tutorial 25 states “By comparing an object’s apparent size from one frame to the next, we can even make some crude guesses about its movement toward or away from the camera in the “z axis” (depth).” but is this the only method of doing so? If so, I am a bit disheartened by the “crude guesses”, which suggests further inaccuracies.

I understand ms kinect produces much higher accuracy regarding depth and tracking in general but I am keen to promote my patch via webcam due to its accessibility.

Anyway, any info regarding depth would be appreciated

– Pasted Max Patch, click to expand. –
#255977
Jul 14, 2013 at 7:17am

One idea I just got thinking about was to split the matrix into much smaller grids, kind of like the approach I took in that patch using ’200′ for example. But if the tracked colour is in 1 grid then its far away, the more it enters (producing a bang and counting them) the closer it gets.

Is that what the quoted tutorial method implies?

J

#255978
Jul 15, 2013 at 3:37am

I started testing this idea of splitting the webcam image into a grid, however it does track the gesture and produces a bang & toggle on when the gesture enters but it is only understanding when it is one grid. Has anybody worked with this idea before that could clarify if my theory can work because I have spent some time now trying to get the system to work so when the tracked gesture is very close to the camera it spills into the other squares..

I have attached my example.

It understands when the tracked gesture is in the area but not when it should be in both areas.

– Pasted Max Patch, click to expand. –
#256038
Nov 3, 2013 at 7:40pm

Thanks for this Joel, i’ve been exploring the same thing for a project – will take a look at your patches when I get a moment and compare.

Determined to be able to use webcams better for z-axis functionality!

#270062

You must be logged in to reply to this topic.