[artoolkit-commits] artoolkit/examples/twoView twoView.c,1.12,1.13
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: Philip L. <phi...@us...> - 2006-04-21 08:33:09
|
Update of /cvsroot/artoolkit/artoolkit/examples/twoView In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15432 Modified Files: twoView.c Log Message: Remove ugly function names. Index: twoView.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/twoView/twoView.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** twoView.c 6 Apr 2006 05:33:48 -0000 1.12 --- twoView.c 21 Apr 2006 08:33:03 -0000 1.13 *************** *** 192,196 **** // Sets up fields ARTVideo, ARTCparam of gContextsActive[0] through gContextsActive[cameraCount - 1]. ! static int demoARSetupCameras(const int cameraCount, const char *cparam_names[], char *vconfs[]) { int i; --- 192,196 ---- // Sets up fields ARTVideo, ARTCparam of gContextsActive[0] through gContextsActive[cameraCount - 1]. ! static int setupCameras(const int cameraCount, const char *cparam_names[], char *vconfs[]) { int i; *************** *** 202,206 **** // Open the video path. if ((gContextsActive[i].ARTVideo = ar2VideoOpen(vconfs[i])) == NULL) { ! fprintf(stderr, "demoARSetupCameras(): Unable to open connection to camera %d.\n", i + 1); return (FALSE); } --- 202,206 ---- // Open the video path. if ((gContextsActive[i].ARTVideo = ar2VideoOpen(vconfs[i])) == NULL) { ! fprintf(stderr, "setupCameras(): Unable to open connection to camera %d.\n", i + 1); return (FALSE); } *************** *** 208,216 **** // Find the size of the window. if (ar2VideoInqSize(gContextsActive[i].ARTVideo, &xsize, &ysize) < 0) return (FALSE); ! fprintf(stderr, "demoARSetupCameras(): Camera %d image size (x,y) = (%d,%d)\n", i + 1, xsize, ysize); // Load the camera parameters, resize for the window and init. if (arParamLoad(cparam_names[i], 1, &wparam) < 0) { ! fprintf(stderr, "demoARSetupCameras(): Error loading parameter file %s for camera %d.\n", cparam_names[i], i + 1); return (FALSE); } --- 208,216 ---- // Find the size of the window. if (ar2VideoInqSize(gContextsActive[i].ARTVideo, &xsize, &ysize) < 0) return (FALSE); ! fprintf(stderr, "setupCameras(): Camera %d image size (x,y) = (%d,%d)\n", i + 1, xsize, ysize); // Load the camera parameters, resize for the window and init. if (arParamLoad(cparam_names[i], 1, &wparam) < 0) { ! fprintf(stderr, "setupCameras(): Error loading parameter file %s for camera %d.\n", cparam_names[i], i + 1); return (FALSE); } *************** *** 223,227 **** // Start the video capture for this camera. if (ar2VideoCapStart(gContextsActive[i].ARTVideo) != 0) { ! fprintf(stderr, "demoARSetupCameras(): Unable to begin camera data capture for camera %d.\n", i + 1); return (FALSE); } --- 223,227 ---- // Start the video capture for this camera. if (ar2VideoCapStart(gContextsActive[i].ARTVideo) != 0) { ! fprintf(stderr, "setupCameras(): Unable to begin camera data capture for camera %d.\n", i + 1); return (FALSE); } *************** *** 231,239 **** } ! static int demoARSetupMarker(const char *patt_name, int *patt_id) { if((*patt_id = arLoadPatt(patt_name)) < 0) { ! fprintf(stderr, "demoARSetupMarker(): pattern load error !!\n"); return (FALSE); } --- 231,239 ---- } ! static int setupMarker(const char *patt_name, int *patt_id) { if((*patt_id = arLoadPatt(patt_name)) < 0) { ! fprintf(stderr, "setupMarker(): pattern load error !!\n"); return (FALSE); } *************** *** 244,248 **** // Report state of ARToolKit global variables arFittingMode, // arImageProcMode, arglDrawMode, arTemplateMatchingMode, arMatchingPCAMode. ! static void demoARDebugReportMode(ARGL_CONTEXT_SETTINGS_REF arglSettings) { if (arFittingMode == AR_FITTING_TO_INPUT) { --- 244,248 ---- // Report state of ARToolKit global variables arFittingMode, // arImageProcMode, arglDrawMode, arTemplateMatchingMode, arMatchingPCAMode. ! static void debugReportMode(ARGL_CONTEXT_SETTINGS_REF arglSettings) { if (arFittingMode == AR_FITTING_TO_INPUT) { *************** *** 354,358 **** fprintf(stderr, "*** Camera %2d - %f (frame/sec)\n", i + 1, (double)(gContextsActive[i].callCountMarkerDetect)/arUtilTimer()); gContextsActive[i].callCountMarkerDetect = 0; ! demoARDebugReportMode(gContextsActive[i].arglSettings); } arUtilTimerReset(); --- 354,358 ---- fprintf(stderr, "*** Camera %2d - %f (frame/sec)\n", i + 1, (double)(gContextsActive[i].callCountMarkerDetect)/arUtilTimer()); gContextsActive[i].callCountMarkerDetect = 0; ! debugReportMode(gContextsActive[i].arglSettings); } arUtilTimerReset(); *************** *** 580,590 **** if ((gContextsActive = (CONTEXT_INFO *)calloc(CONTEXTSACTIVECOUNTMAX, sizeof(CONTEXT_INFO))) == NULL) exit(-1); ! if (!demoARSetupCameras(CONTEXTSACTIVECOUNT, cparam_names, vconfs)) { fprintf(stderr, "main(): Unable to set up %d AR cameras.\n", CONTEXTSACTIVECOUNT); exit(-1); } gContextsActiveCount = CONTEXTSACTIVECOUNT; ! for (i = 0; i < gContextsActiveCount; i++) demoARDebugReportMode(gContextsActive[i].arglSettings); ! if (!demoARSetupMarker(patt_name, &gPatt_id)) { fprintf(stderr, "main(): Unable to set up AR marker.\n"); exit(-1); --- 580,590 ---- if ((gContextsActive = (CONTEXT_INFO *)calloc(CONTEXTSACTIVECOUNTMAX, sizeof(CONTEXT_INFO))) == NULL) exit(-1); ! if (!setupCameras(CONTEXTSACTIVECOUNT, cparam_names, vconfs)) { fprintf(stderr, "main(): Unable to set up %d AR cameras.\n", CONTEXTSACTIVECOUNT); exit(-1); } gContextsActiveCount = CONTEXTSACTIVECOUNT; ! for (i = 0; i < gContextsActiveCount; i++) debugReportMode(gContextsActive[i].arglSettings); ! if (!setupMarker(patt_name, &gPatt_id)) { fprintf(stderr, "main(): Unable to set up AR marker.\n"); exit(-1); |