Table of Contents

using ARToolkit

the good old ARToolKit.. less performances, less features.. but known to work and to be cross-platform..

goal

our goal is to build an external for pd embedding artoolkit and taking gem images as input and giving markers positions as output

status (dummy)

  1. compiled a dummy gem external with artoolkit code: ok
  2. using gem images as input: maybe (nothing recognized)
  3. loading markers: maybe (nothing recognized)
  4. detecting markers: maybe (nothing recognized yet)
  5. detecting multiple markers: maybe (nothing recognized yet)
  6. decided a outlet policy: no (todo)
  7. implemented outputs: no (todo)
  8. external working: no (todo)

files

problems

at the moment the code for recognition is there and compiles without errors but actually doesn’t recognize anything. possible causes:

  • wrong image format ( what kind of data doesarDetectMarker want?)
  • wrong pattern loading procedure
  • ??

about the image format: look in ARToolkit/include/AR/config.h you’ll see this:

/*------------------------------------------------------------*/
/*                                                            */
/*  For Linux, you should define one of below 3 input method  */
/*    AR_INPUT_V4L:     use of standard Video4Linux Library   */
/*    AR_INPUT_DV:      use of DV Camera                      */
/*    AR_INPUT_1394CAM: use of 1394 Digital Camara            */
/*                                                            */
/*------------------------------------------------------------*/
#ifdef __linux
#undef  AR_INPUT_V4L
#undef  AR_INPUT_DV
#undef  AR_INPUT_1394CAM

#ifdef AR_INPUT_V4L
#define  AR_PIX_FORMAT_BGR
#undef   AR_PIX_FORMAT_BGRA
#endif

#ifdef AR_INPUT_DV
#define  AR_PIX_FORMAT_RGB
#undef   AR_PIX_FORMAT_BGRA
#endif

#ifdef AR_INPUT_1394CAM
#define  AR_PIX_FORMAT_RGB
#endif

#undef   AR_BIG_ENDIAN
#define  AR_LITTLE_ENDIAN
#endif


/*------------------------------------------------------------*/
/*  For SGI                                                   */
/*------------------------------------------------------------*/
#ifdef __sgi
#define  AR_BIG_ENDIAN
#undef   AR_LITTLE_ENDIAN
#define  AR_PIX_FORMAT_ABGR
#endif

/*------------------------------------------------------------*/
/*  For Windows                                               */
/*------------------------------------------------------------*/
#ifdef _WIN32
#undef   AR_BIG_ENDIAN
#define  AR_LITTLE_ENDIAN
#define  AR_PIX_FORMAT_BGRA
//#define  AR_PIX_FORMAT_RGBA
#endif

/*------------------------------------------------------------*/
/*  For Mac OS X                                              */
/*------------------------------------------------------------*/
#if __APPLE_CC__
#define  AR_BIG_ENDIAN
#undef   AR_LITTLE_ENDIAN
#define  AR_PIX_FORMAT_RGBA
#endif

image format is a total mess!

however, arDetectMarker only really needs to know where the alpha channel is.. RGB=BGR?


ARToolkit/lib/src/AR/arGetTransMat2.c does not initialize some variables, i had to initialize them to 0. now i am able to call arGetTransMatCont.

links

implementation notes

important functions:

 
AR\artoolkit.txt · Last modified: 2010/02/16 19:08
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki