Aruna
Aruna

Reputation: 701

How can I display video as an overlay on markers detected by ARToolKit?

I'm using ARToolKit to develop an iOS augmented reality application based on the detection of 2-D markers in the environment. I'd like to be able to overlay video on these markers, but I'm not sure how to do this.

How would I use ARToolKit to overlay video on specific markers within a live camera feed?

Upvotes: 1

Views: 2033

Answers (2)

bleater
bleater

Reputation: 5499

ARToolKit for iOS (from ARToolworks) includes an example of movie overlay since release 4 (released August 2011). The example is called ARAppMovie.

Upvotes: 1

Brad Larson
Brad Larson

Reputation: 170309

Benjamin Loulier has a sample VRToolKit application where he uses ARToolKitPlus (derived from ARToolKit) to use the iPhone camera to track markers, then place 3-D objects over them. He created a wrapper around ARToolKit's marker recognition code that provides a callback with the model view matrix that encodes information about position and orientation of this marker in the scene.

You could do something similar, only instead of overlaying a CAEAGLLayer like he does, you could place your video within a standard CALayer and transform that layer to match the rotation and placement of the object within the scene. Learning from his code (which is under GPL, so you probably can't use it directly), you should be able to overlay your video on the scene without requiring a lot of code of your own.

Upvotes: 1

Related Questions