Hi,
I'm trying to use the AR-toolkit within an MFC application.
So far, what I have been able to do is to initialise the camera, load the patterns description, grab the camera, display it in an MFC window (just for control because I don't really need it).
But then when I try to detect the markers, the answer is always: no pattern !
Here is approx. the sequence of AR function I'm calling:
CoInitialize
arParamLoad
arParamChangeSize
arInitCparam
arParamDisp
argInitWithoutGlut // which is exactly argInit() -from gsub.c- without
// the last call ArgInit2() that initialises GLUT
camera.Init(0,m_xsize,m_ysize);
camera.DisplayProperties();
camera.SetFlippedImage(true);
In the main loop:
GrabFrame
GetBuffer
wglMakeCurrent // select the correct drawing area in my application
argDrawMode2D
argDispImage
arDetectMarker(dataPtr, thresh, &marker_info, &marker_num)
and marker_num is always = 0 !!!
When running Simple.exe in exactly the same settings (same camera param file, same object_data file, same pattern description files, same lighting conditions) ... patterns are correctly detected !!
Any idea where I could have a look to try to solve that out ?
Thanks in advance.
E.D.
Emmanuel DUBOIS ! Emmanuel.Dubois@i ......
UPS - IRIT - LIIHS ! www.irit.fr/recherches/LIIHS/dubois
118, route de Narbonne ! Phone: +33 (0)5 61 55 63 59
F - 31 062 Toulouse Cedex 4 ! Fax: +33 (0)5 61 55 62 58
|