59 int main(
int argc,
char** argv)
61 const int width = 320, height = 240, bpp = 1;
62 size_t numPixels = width*height*bpp;
64 const char *fName =
"data/markerboard_480-499.raw";
65 unsigned char *cameraBuffer =
new unsigned char[numPixels];
73 if(FILE* fp = fopen(fName,
"rb"))
75 numBytesRead = fread(cameraBuffer, 1, numPixels, fp);
80 printf(
"Failed to open %s\n", fName);
85 if(numBytesRead != numPixels)
87 printf(
"Failed to read %s\n", fName);
101 printf(
"ARToolKitPlus compile-time information:\n%s\n\n", description);
111 if(!tracker->
init(
"data/LogitechPro4000.dat",
"data/markerboard_480-499.cfg", 1.0f, 1000.0f))
113 printf(
"ERROR: init() failed\n");
141 int numDetected = tracker->
calc(cameraBuffer);
147 printf(
"\n%d good Markers found and used for pose estimation.\nPose-Matrix:\n ", numDetected);
148 for(
int i=0; i<16; i++)
151 bool showConfig =
false;
156 printf(
"%d markers defined in multi marker cfg\n", artkpConfig->
marker_num);
158 printf(
"marker matrices:\n");
159 for(
int multiMarkerCounter = 0; multiMarkerCounter < artkpConfig->
marker_num; multiMarkerCounter++)
161 printf(
"marker %d, id %d:\n", multiMarkerCounter, artkpConfig->
marker[multiMarkerCounter].
patt_id);
162 for(
int row = 0; row < 3; row++)
164 for(
int column = 0; column < 4; column++)
165 printf(
"%.2f ", artkpConfig->
marker[multiMarkerCounter].
trans[row][column]);
171 delete [] cameraBuffer;
int main(int argc, char **argv)
void artLog(const char *nStr)
Passes a simple string to the implementing instance.