artoolkit and camera math

Started by
0 comments, last by giugio 13 years, 11 months ago
Hy. Sorry for my english. I have created a project that display a plane with the texture that is grabbed from webcam via opencv. Every frame this texture is adjourned. Then i use marker tracking for detect the marker and get the modelviewmatrix every frame. After i have try to position a simple 3dobject on the marker. The modelviewmatrix return a rotation that work and a translation . My problem is the translation , in particulary the z translation. i read this excellent post: http://www.ogre3d.org/forums/viewtopic.php?f=5&t=22584&start=0. but i'm not understand at all. i see that can be a camera problem , im understand this: camera---------------object----------------->plane with grabbed camera haw i can set and interpretate the camera and the plane. I'm not must move the plane , right ? then how convert the modelview matrix values for fitting it in this solution for simulate the back and away of the marker. Thansk.
Advertisement
How i can calculate the aspect ratio?
For ex:
at 20cm of the plane 8cm in the world are equal to near 6cm on the monitor, I can do this egualiance?
But if i resize the viewport all is different , i can calculate the aspect ratio on the event onresize?
but how?

This topic is closed to new replies.

Advertisement