Camera tracking with ofxOpenCV

Could anyone give me some tips on how to analyze a video to track the camera’s motion in space? I’m posting this in the advanced forum because I assume it could be a little difficult, not because I’m approaching it from a wealth of knowledge. I should mention off the bat that this would be using stock footage, so I can’t fake it by putting sensors on the camera or whatnot.

I think this may be possible using WarpPerspective() as that seems to determine homography. I can’t find example code for it, although I hear a lot of people use it for tangible interfaces. I also can’t tell the difference between cvWarpPerspective() and cvFindHomography() (which is not wrapped by OF) in order to tell if one is better for camera tracking.

Finally, it would be great if someone could point me to a general reference on the use of homography matrices in computer vision that does not involve linear algebra, as I could probably use to develop a firmer understanding of this technique.

Thanks,
Zach

you mean track the camera position in 3d space?! doing that in a reliable way is truly advanced task. I did that once for a project and it worked somehow - but in the end we have switched the system and used http://www.digilab.uni-hannover.de/docs/manual.html for generating the tracking data and then we wrote a parser for openframeworks.

Too bad they don’t make that for Mac. Looks like there are two commercial camera tracking packages on Mac OS: PFhoe and SynthEyes. Both export to various VFX software formats for match moving. Anyone have experience with these? I’m thinking I could maybe use the After Effects SDK to interface with OF.

m9dfukc- is it possible for you to share the code you used to originally get this working or at least basically describe how it does it?

Thanks,
Zach

I have to look for the code - it’s somewhere fragmented over my backup disks and need to be extracted from the actual project code … could take a while as I’m bussy working at a project at the moment. In the meantime you could try the demo of Scenespector’s VooCat 1.x http://www.scenespector.com/ which is a commercial (around 100$) derivate of the voodoo tracker – and it’s crossplatform!

cheers andreas