the good old ARToolKit.. less performances, less features.. but known to work and to be cross-platform..
our goal is to build an external for pd embedding artoolkit and taking gem images as input and giving markers positions as output
at the moment the code for recognition is there and compiles without errors but actually doesn’t recognize anything. possible causes:
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.
important functions: