PDA

View Full Version : Overlaying graphics onto camera image



thomap
08-14-2003, 03:27 AM
How can configure OGL so that computer generated graphical objects are correctly registered with an image coming from a camera?

The question is related to an augmented reality system where camera position and orientation are known, along with the real world "positions" of the virtual graphics. With correct registration, the virtual objects will seem to be attached to real objects when the camera moves.

Thanks!

Relic
08-14-2003, 03:33 AM
Set your projection matrix with glFrustum or gluPerspective to match the camera's lens.
Position your modelview matrix to have the same position and orientation as your camera.