59 int main(
int argc,
char** argv)
64 const bool useBCH =
false;
66 const int width = 320, height = 240, bpp = 1;
67 size_t numPixels = width*height*bpp;
69 const char *fName = useBCH ?
"data/image_320_240_8_marker_id_bch_nr0100.raw" :
70 "data/image_320_240_8_marker_id_simple_nr031.raw";
71 unsigned char *cameraBuffer =
new unsigned char[numPixels];
79 if(FILE* fp = fopen(fName,
"rb"))
81 numBytesRead = fread(cameraBuffer, 1, numPixels, fp);
86 printf(
"Failed to open %s\n", fName);
91 if(numBytesRead != numPixels)
93 printf(
"Failed to read %s\n", fName);
107 printf(
"ARToolKitPlus compile-time information:\n%s\n\n", description);
118 if(!tracker->
init(
"data/LogitechPro4000.dat", 1.0f, 1000.0f))
121 printf(
"ERROR: init() failed\n");
153 int markerId = tracker->
calc(cameraBuffer);
161 printf(
"\n\nFound marker %d (confidence %d%%)\n\nPose-Matrix:\n ", markerId, (
int(conf*100.0f)));
162 for(
int i=0; i<16; i++)
165 delete [] cameraBuffer;
int main(int argc, char **argv)
void artLog(const char *nStr)
Passes a simple string to the implementing instance.