Hi,
>can anyone describe the method that is used in arGetTransMat function?
>I don't know what does the function arGetInitRot do and I am confused about
>the method used in arGetTransMatSub function.
Basic idea about that is written in:
Hirokazu Kato, Mark Billinghurst:Marker Tracking and HMD Calibration for a
Video-based Augmented Reality Conferencing System, Proc. of 2nd Int. Workshop
on Augmented Reality, pp.85-94 (1999)
http://www.sys.im.hiroshima-cu.ac.jp/people/kato/publications/c-99.IWAR99.pdf
arGetInitRot calculates pose of the marker in camera coordinates
by geometric constraints of square shape and perspective projection
model.
But this result is not good. Because it sometimes include much error.
arGetTransMatSub calculates final pose and position information of the
marker in camera coordinates from initial pose information from
arGetInitRot by minimizing error between detected vertices from image
processing and calculated vertices from transformation matrix as a result.
There are two simmilar function:
double arGetTransMat( ARMarkerInfo *marker_info,
double center[2], double width, double conv[3][4] );
double arGetTransMatCont( ARMarkerInfo *marker_info, double prev_conv[3][4],
double center[2], double width, double conv[3][4] );
conv[3][4] is an output from these function.
It represents transformationmatrix from marker coordinates to camera
coordinates. So for example, (conv[0][3], conv[1][3], conv[2][3]) means
position of the marker in camera coordinates.
arGetTransMat calculates initial pose information of the marker by using
arGetInitRot in it. arGetTransMatCont dose not do that. User can give the
function an initial pose information at prev_conv[3][4].
Usually image overlay is a realtime iterative process. So we can use pose
and position information of the marker from previous processing cycle
for current pose and position calculation. Then we may put transformation
matrix from marker to camera in previous processing cycle in prev_conv[3][4].
'simpleTest' uses arGetTransMat.
'simpleTest2' uses arGetTransMatCont.
--
------------------------------------------------------------------
Hirokazu Kato
Faculty of Information Sciences
Hiroshima City University Phone: 082-830-1705
Email: kato@s ........................ Fax: 082-830-1435
URL: http://www.sys.im.hiroshima-cu.ac.jp/people/kato/
|