artoolkit-commits Mailing List for ARToolKit (Page 18)
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(65) |
Dec
(32) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(5) |
Mar
(15) |
Apr
(22) |
May
|
Jun
(9) |
Jul
(108) |
Aug
(42) |
Sep
(62) |
Oct
(5) |
Nov
|
Dec
(4) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
(38) |
May
(27) |
Jun
(58) |
Jul
(8) |
Aug
(11) |
Sep
(51) |
Oct
(15) |
Nov
(12) |
Dec
(3) |
2007 |
Jan
(25) |
Feb
(6) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
|
2008 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(20) |
Sep
(5) |
Oct
|
Nov
|
Dec
(2) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Philip L. <phi...@us...> - 2005-08-12 21:55:54
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_distortion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14874 Added Files: calib_dist-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: calib_dist-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>calib_dist</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.calib_dist</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2005-08-12 21:48:53
|
Update of /cvsroot/artoolkit/artoolkit/util/mk_patt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13625 Added Files: mk_patt-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: mk_patt-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>mk_patt</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.mk_patt</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2005-08-12 21:41:18
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_distortion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12351 Modified Files: calib_dist.c Log Message: Step 1 of cleanup. Index: calib_dist.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_distortion/calib_dist.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** calib_dist.c 28 Jul 2005 21:58:38 -0000 1.5 --- calib_dist.c 12 Aug 2005 21:41:10 -0000 1.6 *************** *** 76,80 **** --- 76,85 ---- int check_num; + #ifdef _WIN32 + static int drawMode = AR_DRAW_BY_GL_DRAW_PIXELS; + #else static int drawMode = DEFAULT_DRAW_MODE; + #endif + static GLuint glid[2]; static int tex1Xsize1 = 1; |
From: Philip L. <phi...@us...> - 2005-08-12 21:41:14
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_cparam In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12323 Modified Files: calib_cparam.c Log Message: Step 1 of cleanup. Index: calib_cparam.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_cparam/calib_cparam.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** calib_cparam.c 28 Jul 2005 21:58:20 -0000 1.5 --- calib_cparam.c 12 Aug 2005 21:41:03 -0000 1.6 *************** *** 84,88 **** --- 84,92 ---- double sx, sy, ex, ey; + #ifdef _WIN32 + static int drawMode = AR_DRAW_BY_GL_DRAW_PIXELS; + #else static int drawMode = DEFAULT_DRAW_MODE; + #endif static GLuint glid[2]; static int tex1Xsize1 = 1; |
From: Philip L. <phi...@us...> - 2005-08-10 18:18:29
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_camera2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14759 Modified Files: calib_camera.h Log Message: Step 1 of cleanup. Index: calib_camera.h =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_camera2/calib_camera.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** calib_camera.h 4 Nov 2004 08:52:01 -0000 1.1.1.1 --- calib_camera.h 10 Aug 2005 18:18:21 -0000 1.2 *************** *** 16,22 **** CALIB_COORD_T *world_coord; CALIB_COORD_T *point[LOOP_MAX]; ! int h_num; ! int v_num; ! int loop_num; } CALIB_PATT_T; --- 16,22 ---- CALIB_COORD_T *world_coord; CALIB_COORD_T *point[LOOP_MAX]; ! int h_num; // Number of dots horizontally in the calibration pattern. ! int v_num; // Number of dots vertically in the calibration pattern. ! int loop_num; // How many images of the complete calibration patterns we have completed. } CALIB_PATT_T; *************** *** 24,26 **** int calc_inp( CALIB_PATT_T *patt, double dist_factor[4], int xsize, int ysize, double mat[3][4] ); ! #endif --- 24,26 ---- int calc_inp( CALIB_PATT_T *patt, double dist_factor[4], int xsize, int ysize, double mat[3][4] ); ! #endif // CALIB_DIST_H |
From: Philip L. <phi...@us...> - 2005-08-10 18:17:05
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_camera2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14396 Modified Files: main.c Log Message: Step 1 of cleanup. Index: main.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_camera2/main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** main.c 23 Jul 2005 00:02:32 -0000 1.4 --- main.c 10 Aug 2005 18:16:51 -0000 1.5 *************** *** 20,24 **** #include "calib_camera.h" ! #define USE_TEXMAP #ifndef GL_ABGR --- 20,24 ---- #include "calib_camera.h" ! //#define USE_TEXMAP #ifndef GL_ABGR *************** *** 38,41 **** --- 38,43 ---- #endif + /* set up the video format globals */ + #if defined(__sgi) char *vconf = "-size=FULL"; *************** *** 53,57 **** # endif #elif defined(_WIN32) ! char *vconf = "WDM_camera_flipV.xml"; #elif defined(__APPLE__) char *vconf = "-width=640 -height=480"; --- 55,59 ---- # endif #elif defined(_WIN32) ! char *vconf = "Data\\WDM_camera_flipV.xml"; #elif defined(__APPLE__) char *vconf = "-width=640 -height=480"; *************** *** 59,64 **** char *vconf = ""; #endif - /*****************************************************************************/ int win; --- 61,66 ---- char *vconf = ""; #endif + static ARUint8 *gARTImage = NULL; int win; *************** *** 73,79 **** int point_num; ! int sx, sy, ex, ey; ! int status; int check_num; --- 75,81 ---- int point_num; ! int sx, sy, ex, ey; // x and y coordinates of start and end of mouse drag. ! int gStatus; // 0 = , 1 = , 2 = . int check_num; *************** *** 87,91 **** #endif ! static void init( int argc, char *argv[] ); static void mouseEvent(int button, int state, int x, int y); static void motionEvent( int x, int y ); --- 89,93 ---- #endif ! static int init( int argc, char *argv[] ); static void mouseEvent(int button, int state, int x, int y); static void motionEvent( int x, int y ); *************** *** 127,140 **** { glutInit(&argc, argv); ! init( argc, argv ); glutKeyboardFunc(keyEvent); glutMouseFunc(mouseEvent); glutMotionFunc(motionEvent); ! glutIdleFunc(dispImage); glutDisplayFunc(dispImage); print_comment(0); ! status = 0; point_num = 0; arVideoCapStart(); --- 129,142 ---- { glutInit(&argc, argv); ! if (!init(argc, argv)) exit(-1); glutKeyboardFunc(keyEvent); glutMouseFunc(mouseEvent); glutMotionFunc(motionEvent); ! glutIdleFunc(Idle); glutDisplayFunc(dispImage); print_comment(0); ! gStatus = 0; point_num = 0; arVideoCapStart(); *************** *** 143,147 **** } ! static void init(int argc, char *argv[]) { double length; --- 145,149 ---- } ! static int init(int argc, char *argv[]) { double length; *************** *** 154,158 **** if (patt.h_num < 3 || patt.v_num < 3) exit(0); ! printf("Input the length between each markers: "); scanf("%lf", &length); while (getchar() != '\n'); --- 156,160 ---- if (patt.h_num < 3 || patt.v_num < 3) exit(0); ! printf("Input the distance between each marker dot, in millimeters: "); scanf("%lf", &length); while (getchar() != '\n'); *************** *** 164,168 **** } } ! strcpy(line, vconf); for (i = 1; i < argc; i++) { --- 166,171 ---- } } ! ! // Add command-line arguments to vconf string. strcpy(line, vconf); for (i = 1; i < argc; i++) { *************** *** 170,176 **** strcat(line, argv[i]); } ! if (arVideoOpen(line) < 0) exit(0); ! if (arVideoInqSize(&xsize, &ysize) < 0) exit(0); ! printf("Image size (x,y) = (%d,%d)\n", xsize, ysize); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); --- 173,185 ---- strcat(line, argv[i]); } ! ! // Open the video path. ! if (arVideoOpen(line) < 0) { ! fprintf(stderr, "init(): Unable to open connection to camera.\n"); ! return (FALSE); ! } ! // Find the size of the window. ! if (arVideoInqSize(&xsize, &ysize) < 0) return (FALSE); ! fprintf(stdout, "Camera image size (x,y) = (%d,%d)\n", xsize, ysize); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); *************** *** 224,228 **** int i, j, k; ! if( status == 1 && sx != -1 && sy != -1 ) { ex = x; ey = y; --- 233,237 ---- int i, j, k; ! if( gStatus == 1 && sx != -1 && sy != -1 ) { ex = x; ey = y; *************** *** 293,297 **** if( button == GLUT_RIGHT_BUTTON && state == GLUT_UP ) { ! if( status == 0 ) { arVideoCapStop(); arVideoClose(); --- 302,306 ---- if( button == GLUT_RIGHT_BUTTON && state == GLUT_UP ) { ! if( gStatus == 0 ) { arVideoCapStop(); arVideoClose(); *************** *** 305,309 **** printf("Size Adjust: %f\n", dist_factor[3]); printf("--------------\n"); ! status = 2; check_num = 0; print_comment(5); --- 314,318 ---- printf("Size Adjust: %f\n", dist_factor[3]); printf("--------------\n"); ! gStatus = 2; check_num = 0; print_comment(5); *************** *** 314,323 **** } } ! else if( status == 1 ) { if( patt.loop_num == 0 ) {printf("error!!\n"); exit(0);} patt.loop_num--; free( patt.point[patt.loop_num] ); free( patt.savedImage[patt.loop_num] ); ! status = 0; point_num = 0; arVideoCapStart(); --- 323,332 ---- } } ! else if( gStatus == 1 ) { if( patt.loop_num == 0 ) {printf("error!!\n"); exit(0);} patt.loop_num--; free( patt.point[patt.loop_num] ); free( patt.savedImage[patt.loop_num] ); ! gStatus = 0; point_num = 0; arVideoCapStart(); *************** *** 329,333 **** if( button == GLUT_LEFT_BUTTON && state == GLUT_DOWN ) { ! if( status == 1 && point_num < patt.h_num*patt.v_num ) { sx = ex = x; sy = ey = y; --- 338,342 ---- if( button == GLUT_LEFT_BUTTON && state == GLUT_DOWN ) { ! if( gStatus == 1 && point_num < patt.h_num*patt.v_num ) { sx = ex = x; sy = ey = y; *************** *** 382,386 **** if( button == GLUT_LEFT_BUTTON && state == GLUT_UP ) { ! if( status == 0 && patt.loop_num < LOOP_MAX ) { while( (p = (unsigned char *)arVideoGetImage()) == NULL ) { arUtilSleep(2); --- 391,395 ---- if( button == GLUT_LEFT_BUTTON && state == GLUT_UP ) { ! if( gStatus == 0 && patt.loop_num < LOOP_MAX ) { while( (p = (unsigned char *)arVideoGetImage()) == NULL ) { arUtilSleep(2); *************** *** 401,411 **** patt.loop_num++; ! status = 1; sx = sy = ex= ey = -1; print_comment(1); } ! else if( status == 1 && point_num == patt.h_num*patt.v_num ) { ! status = 0; point_num = 0; arVideoCapStart(); --- 410,420 ---- patt.loop_num++; ! gStatus = 1; sx = sy = ex= ey = -1; print_comment(1); } ! else if( gStatus == 1 && point_num == patt.h_num*patt.v_num ) { ! gStatus = 0; point_num = 0; arVideoCapStart(); *************** *** 423,427 **** else print_comment(6); } ! else if( status == 1 ) { if( sx < ex ) { ssx = sx; eex = ex; } else { ssx = ex; eex = sx; } --- 432,436 ---- else print_comment(6); } ! else if( gStatus == 1 ) { if( sx < ex ) { ssx = sx; eex = ex; } else { ssx = ex; eex = sx; } *************** *** 453,457 **** if( point_num == patt.h_num*patt.v_num ) print_comment(2); } ! else if( status == 2 ) { check_num++; if( check_num == patt.loop_num ) { --- 462,466 ---- if( point_num == patt.h_num*patt.v_num ) print_comment(2); } ! else if( gStatus == 2 ) { check_num++; if( check_num == patt.loop_num ) { *************** *** 492,514 **** } static void dispImage(void) { - unsigned char *dataPtr; double x, y; int ssx, eex, ssy, eey; int i; ! if( status == 0 ) { ! if( (dataPtr = (unsigned char *)arVideoGetImage()) == NULL ) { ! arUtilSleep(2); ! return; ! } ! dispImage2( dataPtr ); arVideoCapNext(); ! } ! ! else if( status == 1 ) { dispImage2( patt.savedImage[patt.loop_num-1] ); for( i = 0; i < point_num; i++ ) { x = patt.point[patt.loop_num-1][i].x_coord; --- 501,538 ---- } + static void Idle(void) + { + static int ms_prev; + int ms; + float s_elapsed; + ARUint8 *image; + + // Find out how long since Idle() last ran. + ms = glutGet(GLUT_ELAPSED_TIME); + s_elapsed = (float)(ms - ms_prev) * 0.001; + if (s_elapsed < 0.01f) return; // Don't update more often than 100 Hz. + ms_prev = ms; + + // Grab a video frame. + if ((image = arVideoGetImage()) != NULL) { + gARTImage = image; + // Tell GLUT the display has changed. + glutPostRedisplay(); + } + } + static void dispImage(void) { double x, y; int ssx, eex, ssy, eey; int i; ! if( gStatus == 0 ) { ! dispImage2(gARTImage); arVideoCapNext(); ! } else if( gStatus == 1 ) { dispImage2( patt.savedImage[patt.loop_num-1] ); + // Draw red crosses on the points in the image. for( i = 0; i < point_num; i++ ) { x = patt.point[patt.loop_num-1][i].x_coord; *************** *** 522,526 **** glEnd(); } ! if( sx != -1 && sy != -1 ) { if( sx < ex ) { ssx = sx; eex = ex; } --- 546,551 ---- glEnd(); } ! ! // Draw the current mouse drag clipping area. if( sx != -1 && sy != -1 ) { if( sx < ex ) { ssx = sx; eex = ex; } *************** *** 541,545 **** } ! else if( status == 2 ) { dispImage2( patt.savedImage[check_num] ); for( i = 0; i < patt.h_num*patt.v_num; i++ ) { --- 566,570 ---- } ! else if( gStatus == 2 ) { dispImage2( patt.savedImage[check_num] ); for( i = 0; i < patt.h_num*patt.v_num; i++ ) { *************** *** 789,794 **** } ! free( x ); ! free( y ); } --- 814,819 ---- } ! free(x); ! free(y); } *************** *** 800,821 **** int i; ! ev = arVecAlloc( 2 ); ! mean = arVecAlloc( 2 ); ! evec = arMatrixAlloc( 2, 2 ); ! input = arMatrixAlloc( num, 2 ); ! for( i = 0; i < num; i++ ) { ! arParamObserv2Ideal( dist_factor, x[i], y[i], ! &(input->m[i*2+0]), &(input->m[i*2+1]) ); } ! if( arMatrixPCA(input, evec, ev, mean) < 0 ) exit(0); a = evec->m[1]; b = -evec->m[0]; c = -(a*mean->v[0] + b*mean->v[1]); ! arMatrixFree( input ); ! arMatrixFree( evec ); ! arVecFree( mean ); ! arVecFree( ev ); draw_warp_line(a, b, c); --- 825,846 ---- int i; ! ev = arVecAlloc(2); ! mean = arVecAlloc(2); ! evec = arMatrixAlloc(2, 2); ! input = arMatrixAlloc(num, 2); ! for (i = 0; i < num; i++) { ! arParamObserv2Ideal(dist_factor, x[i], y[i], ! &(input->m[i*2+0]), &(input->m[i*2+1])); } ! if (arMatrixPCA(input, evec, ev, mean) < 0) exit(0); a = evec->m[1]; b = -evec->m[0]; c = -(a*mean->v[0] + b*mean->v[1]); ! arMatrixFree(input); ! arMatrixFree(evec); ! arVecFree(mean); ! arVecFree(ev); draw_warp_line(a, b, c); *************** *** 826,850 **** double x, y; double x1, y1; - // double d; // unreferenced int i; glLineWidth( 1.0 ); glBegin(GL_LINE_STRIP); ! if( a*a >= b*b ) { ! for( i = -20; i <= ysize+20; i+=10 ) { x = -(b*i + c)/a; y = i; ! arParamIdeal2Observ( dist_factor, x, y, &x1, &y1 ); ! glVertex2f( x1, ysize-1-y1 ); } ! } ! else { ! for( i = -20; i <= xsize+20; i+=10 ) { x = i; y = -(a*i + c)/b; ! arParamIdeal2Observ( dist_factor, x, y, &x1, &y1 ); ! glVertex2f( x1, ysize-1-y1 ); } } --- 851,873 ---- double x, y; double x1, y1; int i; glLineWidth( 1.0 ); glBegin(GL_LINE_STRIP); ! if (a*a >= b*b) { ! for (i = -20; i <= ysize+20; i+=10) { x = -(b*i + c)/a; y = i; ! arParamIdeal2Observ(dist_factor, x, y, &x1, &y1); ! glVertex2f(x1, ysize-1-y1); } ! } else { ! for(i = -20; i <= xsize+20; i+=10) { x = i; y = -(a*i + c)/b; ! arParamIdeal2Observ(dist_factor, x, y, &x1, &y1); ! glVertex2f(x1, ysize-1-y1); } } *************** *** 864,878 **** printf("Mouse Button\n"); printf(" Left : Rubber-bounding of feature. (%d x %d)\n", patt.h_num, patt.v_num); ! printf(" Right : Cansel rubber-bounding & Retry grabbing.\n"); break; case 2: printf("Mouse Button\n"); printf(" Left : Save feature position.\n"); ! printf(" Right : Discard & Retry grabbing.\n"); break; case 4: printf("Mouse Button\n"); printf(" Left : Grab next image.\n"); ! printf(" Right : Calc parameter.\n"); break; case 5: --- 887,901 ---- printf("Mouse Button\n"); printf(" Left : Rubber-bounding of feature. (%d x %d)\n", patt.h_num, patt.v_num); ! printf(" Right : Cancel rubber-bounding & retry grabbing.\n"); break; case 2: printf("Mouse Button\n"); printf(" Left : Save feature position.\n"); ! printf(" Right : Discard & retry grabbing.\n"); break; case 4: printf("Mouse Button\n"); printf(" Left : Grab next image.\n"); ! printf(" Right : Calculate parameter.\n"); break; case 5: *************** *** 885,889 **** printf("Mouse Button\n"); printf(" Left :\n"); ! printf(" Right : Calc parameter.\n"); printf(" %d/%d.\n", check_num+1, patt.loop_num); break; --- 908,912 ---- printf("Mouse Button\n"); printf(" Left :\n"); ! printf(" Right : Calculate parameter.\n"); printf(" %d/%d.\n", check_num+1, patt.loop_num); break; |
From: Philip L. <phi...@us...> - 2005-08-10 18:11:10
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12892 Modified Files: README.txt Log Message: Update for 2.71 release. Index: README.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/README.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** README.txt 13 Apr 2005 06:13:26 -0000 1.14 --- README.txt 10 Aug 2005 18:11:00 -0000 1.15 *************** *** 1,3 **** ! Read me for ARToolKit-2.70.1. ============================= --- 1,3 ---- ! Read me for ARToolKit-2.71. ============================= *************** *** 15,19 **** About this archive. ------------------- ! This archive contains the ARToolKit libraries, utilities and examples, version 2.70.1. ARToolKit is released under the GNU General Public License (GPL). Please read the file COPYING.txt. --- 15,19 ---- About this archive. ------------------- ! This archive contains the ARToolKit libraries, utilities and examples, version 2.71. ARToolKit is released under the GNU General Public License (GPL). Please read the file COPYING.txt. *************** *** 27,31 **** HIT Lab NZ http://www.hitlabnz.org ! 2005-03-14 --- 27,31 ---- HIT Lab NZ http://www.hitlabnz.org ! 2005-07-27 *************** *** 35,60 **** Prerequisites: * Microsoft Visual Studio .NET 2003 or Visual Studio 6. ! * DSVideoLib-0.0.4-win32. Download from http://sf.net/projects/artoolkit. * GLUT. Download from http://www.opengl.org/resources/libraries/glut.html. - * DirectX 9.0b or later SDK. If you are using VS6, you must use 9.0b as DirectX 9.0c no longer includes support for VS6. Download from http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp. - * (DirectX 9.0c October 2004 or later only) DirectX SDK Extras package. Once downloaded and unzipped, move the "Samples" folder into the top-level of the installed SDK path. * (Optional, for VRML renderer only) OpenVRML-0.14.3-win32. Download from http://sf.net/projects/artoolkit. Build steps: (1) Unpack the ARToolKit zip to a convenient location. This location will be referred to below as {ARToolKit}. ! (2) Unpack the DSVideoLib zip into {ARToolKit}. ! (3) Copy the files DSVideoLib.dll and DSVideoLibd.dll from {ARToolKit}\DSVideoLib\bin.vc70 into {ARToolKit}\bin. ! (4) Run the script {ARToolKit}\DSVideoLib\bin.vc70\register_filter.bat. ! (5) Install the GLUT DLL into the Windows System32 folder, and the library and headers into the VS platform SDK folders. ! (6) Run the script {ARToolKit}\Configure.win32.bat to create include/AR/config.h. ! (7) Open the ARToolKit.sln file (VS.NET) or ARToolkit.dsw file (VS6). ! (8) Open the Visual Studio search paths settings (Tools->Options->Directories for VS6, or Tools->Options->Projects->VC++ Directories for VS.NET) and add the DirectX SDK Includes\ path and the DirectX Samples\C++\DirectShow\BaseClasses\ path to the top of the search path for headers, and the DirectX SDK Lib\ path to the top of the search path for libraries. ! (9) (Optional, only if rebuilding DSVideoLib). Build the DirectShow base classes strmbase.lib and strmbasd.lib. (More information can be found at Thomas Pintarics homepage for DSVideoLib (http://www.ims.tuwien.ac.at/~thomas/dsvideolib.php)). ! (10) Build the toolkit. The VRML renderering library and example (libARvrml & simpleVRML) are optional builds: ! (11) Unpack the OpenVRML zip into {ARToolKit}. ! (12) Copy js32.dll from {ARToolKit}\OpenVRML\bin into {ARToolKit}\bin. ! (13) Enable the libARvrml and simpleVRML projects in the VS configuration manager and build. --- 35,55 ---- Prerequisites: * Microsoft Visual Studio .NET 2003 or Visual Studio 6. ! * DSVideoLib-0.0.8b-win32. Download from http://sf.net/projects/artoolkit. * GLUT. Download from http://www.opengl.org/resources/libraries/glut.html. * (Optional, for VRML renderer only) OpenVRML-0.14.3-win32. Download from http://sf.net/projects/artoolkit. Build steps: (1) Unpack the ARToolKit zip to a convenient location. This location will be referred to below as {ARToolKit}. ! (2) Unpack the DSVideoLib zip into {ARToolKit}. Make sure that the directory is named "DSVL". ! (3) Copy the files DSVL.dll and DSVLd.dll from {ARToolKit}\DSVL\bin into {ARToolKit}\bin. ! (4) Install the GLUT DLL into the Windows System32 folder, and the library and headers into the VS platform SDK folders. ! (5) Run the script {ARToolKit}\Configure.win32.bat to create include/AR/config.h. ! (6) Open the ARToolKit.sln file (VS.NET) or ARToolkit.dsw file (VS6). ! (7) Build the toolkit. The VRML renderering library and example (libARvrml & simpleVRML) are optional builds: ! (8) Unpack the OpenVRML zip into {ARToolKit}. ! (9) Copy js32.dll from {ARToolKit}\OpenVRML\bin into {ARToolKit}\bin. ! (10) Enable the libARvrml and simpleVRML projects in the VS configuration manager and build. *************** *** 66,70 **** Unpack the ARToolKit to a convenient location. The root of this location will be referred to below as {ARToolKit}: ! tar zxvf ARToolKit-2.70.1.tgz Configure and build. The Linux builds support video input using either Video4Linux, an IIDC-compliant or DV camera connected via IEEE-1394, or a Sony EyeToy camera connected via USB. You will be prompted as to which of the four Linux video drivers you wish to use at the Configure step. cd {ARToolKit} --- 61,65 ---- Unpack the ARToolKit to a convenient location. The root of this location will be referred to below as {ARToolKit}: ! tar zxvf ARToolKit-2.71.tgz Configure and build. The Linux builds support video input using either Video4Linux, an IIDC-compliant or DV camera connected via IEEE-1394, or a Sony EyeToy camera connected via USB. You will be prompted as to which of the four Linux video drivers you wish to use at the Configure step. cd {ARToolKit} *************** *** 104,108 **** Drop the ARToolKit into a convenient location, e.g. your Desktop, then open a Terminal window and type: cd ~/Desktop ! tar zxvf ARToolKit-2.70.1.tgz Configure and build cd ~/ARToolKit --- 99,103 ---- Drop the ARToolKit into a convenient location, e.g. your Desktop, then open a Terminal window and type: cd ~/Desktop ! tar zxvf ARToolKit-2.71.tgz Configure and build cd ~/ARToolKit *************** *** 128,131 **** --- 123,128 ---- - Mac OS X video driver: QuickTime 6.4 is now required by default. (Support for earlier versions can be enabled at compile-time). - Mac OS X libARgsub and binaries which call it: fix for bug "GLUT Warning: glutInit being called a second time" by moving glutInit to main so that it is called before calling arVideoOpen. + - Linux V4L video driver: Apply patch by Wayne Piekarski to auto-adjust video resolution. + - Windows video driver: Uses updated (0.0.8b) DSVideoLib. Install of DirectX SDK, registering of filter no longer required. Changes in earlier releases. |
From: Philip L. <phi...@us...> - 2005-07-30 01:10:38
|
Update of /cvsroot/artoolkit/artoolkit/doc/gsub_lite/DataTypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10340 Modified Files: DataTypes.html Log Message: Added distortion compensation enabling/disabling. Index: DataTypes.html =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/doc/gsub_lite/DataTypes/DataTypes.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DataTypes.html 23 Jun 2005 06:48:23 -0000 1.2 --- DataTypes.html 30 Jul 2005 01:10:29 -0000 1.3 *************** *** 34,38 **** </dd> </dl> ! <p><p>© 2003-2004 Philip Lamb ! (Last Updated August 02, 2004) </p></body></html> --- 34,38 ---- </dd> </dl> ! <p><p>© 2003-2005 Philip Lamb ! (Last Updated August 29, 2005) </p></body></html> |
From: Philip L. <phi...@us...> - 2005-07-30 01:10:38
|
Update of /cvsroot/artoolkit/artoolkit/doc/gsub_lite/Vars In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10320 Modified Files: Vars.html Log Message: Added distortion compensation enabling/disabling. Index: Vars.html =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/doc/gsub_lite/Vars/Vars.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Vars.html 23 Jun 2005 06:49:25 -0000 1.2 --- Vars.html 30 Jul 2005 01:10:25 -0000 1.3 *************** *** 71,75 **** </dd> </dl> ! <p><p>© 2003-2004 Philip Lamb ! (Last Updated August 02, 2004) </p></body></html> --- 71,75 ---- </dd> </dl> ! <p><p>© 2003-2005 Philip Lamb ! (Last Updated August 29, 2005) </p></body></html> |
From: Philip L. <phi...@us...> - 2005-07-30 01:10:35
|
Update of /cvsroot/artoolkit/artoolkit/doc/gsub_lite/Functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10305 Modified Files: Functions.html Log Message: Added distortion compensation enabling/disabling. Index: Functions.html =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/doc/gsub_lite/Functions/Functions.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Functions.html 23 Jun 2005 06:48:42 -0000 1.2 --- Functions.html 30 Jul 2005 01:10:20 -0000 1.3 *************** *** 24,27 **** --- 24,33 ---- <dd>Display an ARVideo image, by drawing it using OpenGL, using and modifying current OpenGL state. </dd> + <dt><tt><a href="Functions.html#//apple_ref/c/func/arglDistortionCompensationGet" target="doc">arglDistortionCompensationGet</a></tt></dt> + <dd>Enquire as to the enable state of camera lens distortion compensation in arglDispImage. + </dd> + <dt><tt><a href="Functions.html#//apple_ref/c/func/arglDistortionCompensationSet" target="doc">arglDistortionCompensationSet</a></tt></dt> + <dd>Set compensation for camera lens distortion in arglDispImage to off or on. + </dd> <dt><tt><a href="Functions.html#//apple_ref/c/func/arglSetupForCurrentContext" target="doc">arglSetupForCurrentContext</a></tt></dt> <dd>Initialise the gsub_lite library for the current OpenGL context. *************** *** 222,225 **** --- 228,288 ---- </dd> </dl> + <hr><!-- headerDoc=func; uid=//apple_ref/c/func/arglDistortionCompensationGet; name=arglDistortionCompensationGet --> + <a name="//apple_ref/c/func/arglDistortionCompensationGet"></a> + <table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDistortionCompensationGet">arglDistortionCompensationGet</a></h3> + </td></tr></table><hr><dl></dl><p>Enquire as to the enable state of camera lens distortion compensation in arglDispImage. + </p> + <blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDistortionCompensationGet //apple_ref/c/clm/arglDistortionCompensationGet //apple_ref/c/intfcm/arglDistortionCompensationGet //apple_ref/c/func/arglDistortionCompensationGet //apple_ref/c/ftmplt/arglDistortionCompensationGet //apple_ref/c/defn/arglDistortionCompensationGet //apple_ref/c/macro/arglDistortionCompensationGet" --><font class="function">arglDistortionCompensationGet</font><!-- /a -->( + <!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF</font><!-- /a --> <font class="param">contextSettings</font>, + <!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int</font><!-- /a --> *<font class="param">enable</font>); </pre></blockquote> + <h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions</font></h5> + <blockquote> + <dl> + <dt><code><i>contextSettings</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL + context, as returned by arglSetupForCurrentContext() for this context.</dd> + <dt><code><i>enable</i></code></dt><dd>Pointer to an integer value which will be set to TRUE if distortion + compensation is enabled in the specified context, or FALSE if it is disabled.</dd> + </dl> + </blockquote> + <dl><dt><i>function result</i></dt><dd>TRUE if the distortion value was set, FALSE if an error occurred. + </dd> + <h5><font face="Lucida Grande,Helvetica,Arial">Discussion</font></h5><p>By default, arglDispImage compensates for the distortion of the camera's + acquired image caused by the lens when it draws. This function enquires + as to whether arglDispImage is currently doing compensation or not. + </p> + <dt><i>Availability</i></dt><dd>First appeared in ARToolKit 2.71. + </dd> + </dl> + <hr><!-- headerDoc=func; uid=//apple_ref/c/func/arglDistortionCompensationSet; name=arglDistortionCompensationSet --> + <a name="//apple_ref/c/func/arglDistortionCompensationSet"></a> + <table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDistortionCompensationSet">arglDistortionCompensationSet</a></h3> + </td></tr></table><hr><dl></dl><p>Set compensation for camera lens distortion in arglDispImage to off or on. + </p> + <blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDistortionCompensationSet //apple_ref/c/clm/arglDistortionCompensationSet //apple_ref/c/intfcm/arglDistortionCompensationSet //apple_ref/c/func/arglDistortionCompensationSet //apple_ref/c/ftmplt/arglDistortionCompensationSet //apple_ref/c/defn/arglDistortionCompensationSet //apple_ref/c/macro/arglDistortionCompensationSet" --><font class="function">arglDistortionCompensationSet</font><!-- /a -->( + <!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF</font><!-- /a --> <font class="param">contextSettings</font>, + <!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int</font><!-- /a --> <font class="param">enable</font>); </pre></blockquote> + <h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions</font></h5> + <blockquote> + <dl> + <dt><code><i>contextSettings</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL + context, as returned by arglSetupForCurrentContext() for this context.</dd> + <dt><code><i>enable</i></code></dt><dd>TRUE to enabled distortion compensation, FALSE to disable it. + The default state for new contexts is enable = TRUE.</dd> + </dl> + </blockquote> + <dl><dt><i>function result</i></dt><dd>TRUE if the distortion value was set, FALSE if an error occurred. + </dd> + <h5><font face="Lucida Grande,Helvetica,Arial">Discussion</font></h5><p>By default, arglDispImage compensates for the distortion of the camera's + acquired image caused by the lens when it draws. By calling this function + with enabled = FALSE, this compensation will be disabled in the specified + drawing context. It may be re-enabled at any time. + This function is useful if you need to draw an image, but do not know the + extent of the camera's lens distortion (such as during distortion calibration). + While distortion compensation is disabled, the dist_factor[] array in a + the camera cparam structure passed to arglDispImage is ignored. + </p> + <dt><i>Availability</i></dt><dd>First appeared in ARToolKit 2.71. + </dd> + </dl> <hr><!-- headerDoc=func; uid=//apple_ref/c/func/arglSetupForCurrentContext; name=arglSetupForCurrentContext --> <a name="//apple_ref/c/func/arglSetupForCurrentContext"></a> *************** *** 249,253 **** </dd> </dl> ! <p><p>© 2003-2004 Philip Lamb ! (Last Updated August 02, 2004) </p></body></html> --- 312,316 ---- </dd> </dl> ! <p><p>© 2003-2005 Philip Lamb ! (Last Updated August 29, 2005) </p></body></html> |
From: Philip L. <phi...@us...> - 2005-07-30 01:10:25
|
Update of /cvsroot/artoolkit/artoolkit/doc/gsub_lite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10289 Modified Files: toc.html gsub_lite.html Log Message: Added distortion compensation enabling/disabling. Index: gsub_lite.html =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/doc/gsub_lite/gsub_lite.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gsub_lite.html 23 Jun 2005 06:48:16 -0000 1.2 --- gsub_lite.html 30 Jul 2005 01:10:16 -0000 1.3 *************** *** 12,16 **** <br> <p></p> ! <b>Updated:</b> August 02, 2004<br> <b>Includes:</b> <!-- a logicalPath="//apple_ref/doc/header/config.h" --><AR/config.h><!-- /a -->, <!-- a logicalPath="//apple_ref/doc/header/ar.h" --><AR/ar.h><!-- /a -->, --- 12,16 ---- <br> <p></p> ! <b>Updated:</b> August 29, 2005<br> <b>Includes:</b> <!-- a logicalPath="//apple_ref/doc/header/config.h" --><AR/config.h><!-- /a -->, <!-- a logicalPath="//apple_ref/doc/header/ar.h" --><AR/ar.h><!-- /a -->, *************** *** 57,62 **** <br><br> ! <hr><br><center>© 2003-2004 Philip Lamb ! (Last Updated August 02, 2004) <br><font size="-1">HTML documentation generated by <a href="http://www.opensource.apple.com/projects" target="_blank">HeaderDoc</a></font> </center> --- 57,62 ---- <br><br> ! <hr><br><center>© 2003-2005 Philip Lamb ! (Last Updated August 29, 2005) <br><font size="-1">HTML documentation generated by <a href="http://www.opensource.apple.com/projects" target="_blank">HeaderDoc</a></font> </center> Index: toc.html =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/doc/gsub_lite/toc.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** toc.html 23 Jun 2005 06:48:16 -0000 1.2 --- toc.html 30 Jul 2005 01:10:16 -0000 1.3 *************** *** 22,25 **** --- 22,27 ---- <nobr> <a href="Functions/Functions.html#//apple_ref/c/func/arglDispImage" target="doc">arglDispImage</a></nobr><br> <nobr> <a href="Functions/Functions.html#//apple_ref/c/func/arglDispImageStateful" target="doc">arglDispImageStateful</a></nobr><br> + <nobr> <a href="Functions/Functions.html#//apple_ref/c/func/arglDistortionCompensationGet" target="doc">arglDistortionCompensationGet</a></nobr><br> + <nobr> <a href="Functions/Functions.html#//apple_ref/c/func/arglDistortionCompensationSet" target="doc">arglDistortionCompensationSet</a></nobr><br> <nobr> <a href="Functions/Functions.html#//apple_ref/c/func/arglSetupForCurrentContext" target="doc">arglSetupForCurrentContext</a></nobr><br> <h4><a href="DataTypes/DataTypes.html" target="doc">Defined Types *************** *** 33,37 **** <nobr> <a href="Vars/Vars.html#//apple_ref/c/data/arglTexRectangle" target="doc">arglTexRectangle</a></nobr><br> <br><hr><a href="CompositePage.html" target="_blank">[Printable HTML Page]</a> ! <p><i>Updated: August 02, 2004</i><p></td></tr> </table><p> <p> </body></html> --- 35,39 ---- <nobr> <a href="Vars/Vars.html#//apple_ref/c/data/arglTexRectangle" target="doc">arglTexRectangle</a></nobr><br> <br><hr><a href="CompositePage.html" target="_blank">[Printable HTML Page]</a> ! <p><i>Updated: August 29, 2005</i><p></td></tr> </table><p> <p> </body></html> |
From: Philip L. <phi...@us...> - 2005-07-30 01:09:57
|
Update of /cvsroot/artoolkit/artoolkit/doc/gsub_lite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10200 Modified Files: CompositePage.html Log Message: Added distortion compensation enabling/disabling. Index: CompositePage.html =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/doc/gsub_lite/CompositePage.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CompositePage.html 23 Jun 2005 06:48:16 -0000 1.2 --- CompositePage.html 30 Jul 2005 01:09:48 -0000 1.3 *************** *** 66,69 **** --- 66,75 ---- <dd>Display an ARVideo image, by drawing it using OpenGL, using and modifying current OpenGL state. </dd> + <dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglDistortionCompensationGet" target="_top">arglDistortionCompensationGet</a></tt></dt> + <dd>Enquire as to the enable state of camera lens distortion compensation in arglDispImage. + </dd> + <dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglDistortionCompensationSet" target="_top">arglDistortionCompensationSet</a></tt></dt> + <dd>Set compensation for camera lens distortion in arglDispImage to off or on. + </dd> <dt><tt><a href="CompositePage.html#//apple_ref/doc/compositePage/c/func/arglSetupForCurrentContext" target="_top">arglSetupForCurrentContext</a></tt></dt> <dd>Initialise the gsub_lite library for the current OpenGL context. *************** *** 264,267 **** --- 270,330 ---- </dd> </dl> + <hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglDistortionCompensationGet; name=arglDistortionCompensationGet --> + <a name="//apple_ref/doc/compositePage/c/func/arglDistortionCompensationGet"></a> + <table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDistortionCompensationGet">arglDistortionCompensationGet</a></h3> + </td></tr></table><hr><dl></dl><p>Enquire as to the enable state of camera lens distortion compensation in arglDispImage. + </p> + <blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDistortionCompensationGet //apple_ref/c/clm/arglDistortionCompensationGet //apple_ref/c/intfcm/arglDistortionCompensationGet //apple_ref/c/func/arglDistortionCompensationGet //apple_ref/c/ftmplt/arglDistortionCompensationGet //apple_ref/c/defn/arglDistortionCompensationGet //apple_ref/c/macro/arglDistortionCompensationGet" --><font class="function">arglDistortionCompensationGet</font><!-- /a -->( + <!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF</font><!-- /a --> <font class="param">contextSettings</font>, + <!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int</font><!-- /a --> *<font class="param">enable</font>); </pre></blockquote> + <h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions</font></h5> + <blockquote> + <dl> + <dt><code><i>contextSettings</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL + context, as returned by arglSetupForCurrentContext() for this context.</dd> + <dt><code><i>enable</i></code></dt><dd>Pointer to an integer value which will be set to TRUE if distortion + compensation is enabled in the specified context, or FALSE if it is disabled.</dd> + </dl> + </blockquote> + <dl><dt><i>function result</i></dt><dd>TRUE if the distortion value was set, FALSE if an error occurred. + </dd> + <h5><font face="Lucida Grande,Helvetica,Arial">Discussion</font></h5><p>By default, arglDispImage compensates for the distortion of the camera's + acquired image caused by the lens when it draws. This function enquires + as to whether arglDispImage is currently doing compensation or not. + </p> + <dt><i>Availability</i></dt><dd>First appeared in ARToolKit 2.71. + </dd> + </dl> + <hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglDistortionCompensationSet; name=arglDistortionCompensationSet --> + <a name="//apple_ref/doc/compositePage/c/func/arglDistortionCompensationSet"></a> + <table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5"><h3><a name="arglDistortionCompensationSet">arglDistortionCompensationSet</a></h3> + </td></tr></table><hr><dl></dl><p>Set compensation for camera lens distortion in arglDispImage to off or on. + </p> + <blockquote><pre><!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int</font><!-- /a --> <!-- a logicalPath="//apple_ref/c/instm/arglDistortionCompensationSet //apple_ref/c/clm/arglDistortionCompensationSet //apple_ref/c/intfcm/arglDistortionCompensationSet //apple_ref/c/func/arglDistortionCompensationSet //apple_ref/c/ftmplt/arglDistortionCompensationSet //apple_ref/c/defn/arglDistortionCompensationSet //apple_ref/c/macro/arglDistortionCompensationSet" --><font class="function">arglDistortionCompensationSet</font><!-- /a -->( + <!-- a logicalPath="//apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/cl/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tdef/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/tag/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/econst/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/struct/ARGL_CONTEXT_SETTINGS_REF //apple_ref/c/clconst/ARGL_CONTEXT_SETTINGS_REF" --><font class="type">ARGL_CONTEXT_SETTINGS_REF</font><!-- /a --> <font class="param">contextSettings</font>, + <!-- a logicalPath="//apple_ref/c/cl/int //apple_ref/c/cl/int //apple_ref/c/tdef/int //apple_ref/c/tag/int //apple_ref/c/econst/int //apple_ref/c/struct/int //apple_ref/c/clconst/int" --><font class="type">int</font><!-- /a --> <font class="param">enable</font>); </pre></blockquote> + <h5><font face="Lucida Grande,Helvetica,Arial">Parameter Descriptions</font></h5> + <blockquote> + <dl> + <dt><code><i>contextSettings</i></code></dt><dd>A reference to ARGL's settings for the current OpenGL + context, as returned by arglSetupForCurrentContext() for this context.</dd> + <dt><code><i>enable</i></code></dt><dd>TRUE to enabled distortion compensation, FALSE to disable it. + The default state for new contexts is enable = TRUE.</dd> + </dl> + </blockquote> + <dl><dt><i>function result</i></dt><dd>TRUE if the distortion value was set, FALSE if an error occurred. + </dd> + <h5><font face="Lucida Grande,Helvetica,Arial">Discussion</font></h5><p>By default, arglDispImage compensates for the distortion of the camera's + acquired image caused by the lens when it draws. By calling this function + with enabled = FALSE, this compensation will be disabled in the specified + drawing context. It may be re-enabled at any time. + This function is useful if you need to draw an image, but do not know the + extent of the camera's lens distortion (such as during distortion calibration). + While distortion compensation is disabled, the dist_factor[] array in a + the camera cparam structure passed to arglDispImage is ignored. + </p> + <dt><i>Availability</i></dt><dd>First appeared in ARToolKit 2.71. + </dd> + </dl> <hr><!-- headerDoc=func; uid=//apple_ref/doc/compositePage/c/func/arglSetupForCurrentContext; name=arglSetupForCurrentContext --> <a name="//apple_ref/doc/compositePage/c/func/arglSetupForCurrentContext"></a> *************** *** 384,388 **** </dd> </dl> ! <p><p>© 2003-2004 Philip Lamb ! (Last Updated August 02, 2004) </p></body></html> --- 447,451 ---- </dd> </dl> ! <p><p>© 2003-2005 Philip Lamb ! (Last Updated August 29, 2005) </p></body></html> |
From: Philip L. <phi...@us...> - 2005-07-30 01:06:20
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/Gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9464 Modified Files: gsub_lite.c Log Message: Added distortion compensation enabling/disabling. Index: gsub_lite.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/Gl/gsub_lite.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gsub_lite.c 18 Feb 2005 04:18:51 -0000 1.3 --- gsub_lite.c 30 Jul 2005 01:06:06 -0000 1.4 *************** *** 4,8 **** * Graphics Subroutines (Lite) for ARToolKit. * ! * Copyright (c) 2003-2004 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes --- 4,8 ---- * Graphics Subroutines (Lite) for ARToolKit. * ! * Copyright (c) 2003-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes *************** *** 16,19 **** --- 16,21 ---- * 2.7.5 2004-07-15 PRL Added arglDispImageStateful(); removed extraneous glPixelStorei(GL_UNPACK_IMAGE_HEIGHT,...) calls. * 2.7.6 2005-02-18 PRL Go back to using int rather than BOOL, to avoid conflict with Objective-C. + * 2.7.7 2005-07-26 PRL Added cleanup routines for texture stuff. + * 2.7.8 2005-07-29 PRL Added distortion compensation enabling/disabling. * */ *************** *** 140,154 **** int textureRectangleCapabilitiesChecked; int texturePow2CapabilitiesChecked; ! GLuint textureRectangle; ! GLuint texturePow2; ! GLuint listRectangle; ! GLuint listPow2; int initedRectangle; - int initedRectangleTexmapScaleFactor; int initedPow2; ! int initedPow2TexmapScaleFactor; ! GLsizei texturePow2SizeX; ! GLsizei texturePow2SizeY; ! GLenum texturePow2WrapMode; }; typedef struct _ARGL_CONTEXT_SETTINGS ARGL_CONTEXT_SETTINGS; --- 142,160 ---- int textureRectangleCapabilitiesChecked; int texturePow2CapabilitiesChecked; ! GLuint textureRectangle; ! GLuint texturePow2; ! GLuint listRectangle; ! GLuint listPow2; int initedRectangle; int initedPow2; ! int initPlease; // Set to TRUE to request re-init of texture etc. ! int asInited_texmapScaleFactor; ! float asInited_zoom; ! int asInited_xsize; ! int asInited_ysize; ! GLsizei texturePow2SizeX; ! GLsizei texturePow2SizeY; ! GLenum texturePow2WrapMode; ! int disableDistortionCompensation; }; typedef struct _ARGL_CONTEXT_SETTINGS ARGL_CONTEXT_SETTINGS; *************** *** 281,285 **** // Returns: TRUE If either of the tests passes, or FALSE if both fail. // ! static int arglGLCapabilityCheck(const unsigned short minVersion, const char *extension) { const GLubyte * strRenderer; --- 287,291 ---- // Returns: TRUE If either of the tests passes, or FALSE if both fail. // ! static int arglGLCapabilityCheck(const unsigned short minVersion, const unsigned char *extension) { const GLubyte * strRenderer; *************** *** 316,321 **** GLint format; ! if (!arglGLCapabilityCheck(0, "GL_NV_texture_rectangle")) { ! if (!arglGLCapabilityCheck(0, "GL_EXT_texture_rectangle")) { // Alternate name. return (FALSE); } --- 322,327 ---- GLint format; ! if (!arglGLCapabilityCheck(0, (unsigned char *)"GL_NV_texture_rectangle")) { ! if (!arglGLCapabilityCheck(0, (unsigned char *)"GL_EXT_texture_rectangle")) { // Alternate name. return (FALSE); } *************** *** 338,344 **** } // // Blit an image to the screen using OpenGL rectangle texturing. - // TODO: a cleanup routine to delete texture name, display list. // static void arglDispImageTexRectangle(ARUint8 *image, const ARParam *cparam, const float zoom, ARGL_CONTEXT_SETTINGS_REF contextSettings, const int texmapScaleFactor) --- 344,360 ---- } + static int arglCleanupTexRectangle(ARGL_CONTEXT_SETTINGS_REF contextSettings) + { + if (!contextSettings->initedRectangle) return (FALSE); + + glDeleteTextures(1, &(contextSettings->textureRectangle)); + glDeleteLists(contextSettings->listRectangle, 1); + contextSettings->textureRectangleCapabilitiesChecked = FALSE; + contextSettings->initedRectangle = FALSE; + return (TRUE); + } + // // Blit an image to the screen using OpenGL rectangle texturing. // static void arglDispImageTexRectangle(ARUint8 *image, const ARParam *cparam, const float zoom, ARGL_CONTEXT_SETTINGS_REF contextSettings, const int texmapScaleFactor) *************** *** 349,359 **** int i, j; ! if(!contextSettings->initedRectangle || (texmapScaleFactor != contextSettings->initedRectangleTexmapScaleFactor)) { // If it was texmapScaleFactor that changed, delete texture and list first. ! if (contextSettings->initedRectangle) { ! glDeleteTextures(1, &(contextSettings->textureRectangle)); ! glDeleteLists(contextSettings->listRectangle, 1); ! } // Check texturing capabilities. --- 365,373 ---- int i, j; ! if(!contextSettings->initedRectangle || contextSettings->initPlease) { + contextSettings->initPlease = FALSE; // If it was texmapScaleFactor that changed, delete texture and list first. ! if (contextSettings->initedRectangle) arglCleanupTexRectangle(contextSettings); // Check texturing capabilities. *************** *** 407,436 **** glMatrixMode(GL_MODELVIEW); ! py_prev = 0.0f; ! for(j = 1; j <= 20; j++) { // Do 20 rows. ! py = py_prev; ! py_prev = cparam->ysize * j / 20.0f; ! ! glBegin(GL_QUAD_STRIP); ! for(i = 0; i <= 20; i++) { // Draw 21 pairs of vertices per row to make 20 columns. ! px = cparam->xsize * i / 20.0f; ! ! arParamObserv2Ideal(cparam->dist_factor, (double)px, (double)py, &x1, &y1); ! arParamObserv2Ideal(cparam->dist_factor, (double)px, (double)py_prev, &x2, &y2); ! ! xx1 = (float)x1 * zoom; ! yy1 = (cparam->ysize - (float)y1) * zoom; ! xx2 = (float)x2 * zoom; ! yy2 = (cparam->ysize - (float)y2) * zoom; ! ! glTexCoord2f(px, py/texmapScaleFactor); glVertex2f(xx1, yy1); ! glTexCoord2f(px, py_prev/texmapScaleFactor); glVertex2f(xx2, yy2); ! } glEnd(); } glDisable(GL_TEXTURE_RECTANGLE); glEndList(); ! contextSettings->initedRectangleTexmapScaleFactor = texmapScaleFactor; contextSettings->initedRectangle = TRUE; } --- 421,462 ---- glMatrixMode(GL_MODELVIEW); ! if (contextSettings->disableDistortionCompensation) { ! glBegin(GL_QUADS); ! glTexCoord2f(0.0f, cparam->ysize/texmapScaleFactor); glVertex2f(0.0f, 0.0f); ! glTexCoord2f(cparam->xsize, cparam->ysize/texmapScaleFactor); glVertex2f(cparam->xsize * zoom, 0.0f); ! glTexCoord2f(cparam->xsize, 0.0f); glVertex2f(cparam->xsize * zoom, cparam->ysize * zoom); ! glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f, cparam->ysize * zoom); glEnd(); + } else { + py_prev = 0.0f; + for(j = 1; j <= 20; j++) { // Do 20 rows. + py = py_prev; + py_prev = cparam->ysize * j / 20.0f; + + glBegin(GL_QUAD_STRIP); + for(i = 0; i <= 20; i++) { // Draw 21 pairs of vertices per row to make 20 columns. + px = cparam->xsize * i / 20.0f; + + arParamObserv2Ideal(cparam->dist_factor, (double)px, (double)py, &x1, &y1); + arParamObserv2Ideal(cparam->dist_factor, (double)px, (double)py_prev, &x2, &y2); + + xx1 = (float)x1 * zoom; + yy1 = (cparam->ysize - (float)y1) * zoom; + xx2 = (float)x2 * zoom; + yy2 = (cparam->ysize - (float)y2) * zoom; + + glTexCoord2f(px, py/texmapScaleFactor); glVertex2f(xx1, yy1); + glTexCoord2f(px, py_prev/texmapScaleFactor); glVertex2f(xx2, yy2); + } + glEnd(); + } } glDisable(GL_TEXTURE_RECTANGLE); glEndList(); ! contextSettings->asInited_ysize = cparam->ysize; ! contextSettings->asInited_xsize = cparam->xsize; ! contextSettings->asInited_zoom = zoom; ! contextSettings->asInited_texmapScaleFactor = texmapScaleFactor; contextSettings->initedRectangle = TRUE; } *************** *** 503,507 **** // Decide whether we can use GL_CLAMP_TO_EDGE. ! if (arglGLCapabilityCheck(0x0120, "GL_SGIS_texture_edge_clamp")) { contextSettings->texturePow2WrapMode = GL_CLAMP_TO_EDGE; } else { --- 529,533 ---- // Decide whether we can use GL_CLAMP_TO_EDGE. ! if (arglGLCapabilityCheck(0x0120, (unsigned char *)"GL_SGIS_texture_edge_clamp")) { contextSettings->texturePow2WrapMode = GL_CLAMP_TO_EDGE; } else { *************** *** 514,520 **** } // // Blit an image to the screen using OpenGL power-of-two texturing. - // TODO: a cleanup routine to delete texture name, display list. // static void arglDispImageTexPow2(ARUint8 *image, const ARParam *cparam, const float zoom, ARGL_CONTEXT_SETTINGS_REF contextSettings, const int texmapScaleFactor) --- 540,556 ---- } + static int arglCleanupTexPow2(ARGL_CONTEXT_SETTINGS_REF contextSettings) + { + if (!contextSettings->initedPow2) return (FALSE); + + glDeleteTextures(1, &(contextSettings->texturePow2)); + glDeleteLists(contextSettings->listPow2, 1); + contextSettings->texturePow2CapabilitiesChecked = FALSE; + contextSettings->initedPow2 = FALSE; + return (TRUE); + } + // // Blit an image to the screen using OpenGL power-of-two texturing. // static void arglDispImageTexPow2(ARUint8 *image, const ARParam *cparam, const float zoom, ARGL_CONTEXT_SETTINGS_REF contextSettings, const int texmapScaleFactor) *************** *** 526,536 **** int i, j; ! if(!contextSettings->initedPow2 || (texmapScaleFactor != contextSettings->initedPow2TexmapScaleFactor)) { // If it was texmapScaleFactor that changed, delete texture and list first. ! if (contextSettings->initedPow2) { ! glDeleteTextures(1, &(contextSettings->texturePow2)); ! glDeleteLists(contextSettings->listPow2, 1); ! } // Check texturing capabilities. --- 562,570 ---- int i, j; ! if(!contextSettings->initedPow2 || contextSettings->initPlease) { + contextSettings->initPlease = FALSE; // If it was texmapScaleFactor that changed, delete texture and list first. ! if (contextSettings->initedPow2) arglCleanupTexPow2(contextSettings); // Check texturing capabilities. *************** *** 571,616 **** glMatrixMode(GL_MODELVIEW); ! qy = 0.0f; ! tey = 0.0f; ! for(j = 1; j <= 20; j++) { // Do 20 rows. ! py = qy; ! tsy = tey; ! qy = cparam->ysize * j / 20.0f; ! tey = qy / contextSettings->texturePow2SizeY; ! ! qx = 0.0f; ! tex = 0.0f; ! for(i = 1; i <= 20; i++) { // Draw 20 columns. ! px = qx; ! tsx = tex; ! qx = cparam->xsize * i / 20.0f; ! tex = qx / contextSettings->texturePow2SizeX; ! ! arParamObserv2Ideal(cparam->dist_factor, (double)px, (double)py, &x1, &y1); ! arParamObserv2Ideal(cparam->dist_factor, (double)qx, (double)py, &x2, &y2); ! arParamObserv2Ideal(cparam->dist_factor, (double)qx, (double)qy, &x3, &y3); ! arParamObserv2Ideal(cparam->dist_factor, (double)px, (double)qy, &x4, &y4); ! ! xx1 = (float)x1 * zoom; ! yy1 = (cparam->ysize - (float)y1) * zoom; ! xx2 = (float)x2 * zoom; ! yy2 = (cparam->ysize - (float)y2) * zoom; ! xx3 = (float)x3 * zoom; ! yy3 = (cparam->ysize - (float)y3) * zoom; ! xx4 = (float)x4 * zoom; ! yy4 = (cparam->ysize - (float)y4) * zoom; ! ! glBegin(GL_QUADS); ! glTexCoord2f(tsx, tsy); glVertex2f(xx1, yy1); ! glTexCoord2f(tex, tsy); glVertex2f(xx2, yy2); ! glTexCoord2f(tex, tey); glVertex2f(xx3, yy3); ! glTexCoord2f(tsx, tey); glVertex2f(xx4, yy4); ! glEnd(); ! } // columns. ! } // rows. glDisable(GL_TEXTURE_2D); glEndList(); ! contextSettings->initedPow2TexmapScaleFactor = texmapScaleFactor; contextSettings->initedPow2 = TRUE; } --- 605,666 ---- glMatrixMode(GL_MODELVIEW); ! if (contextSettings->disableDistortionCompensation) { ! glBegin(GL_QUADS); ! glTexCoord2f(0.0f, (float)cparam->ysize/(float)contextSettings->texturePow2SizeY); ! glVertex2f(0.0f, 0.0f); ! glTexCoord2f((float)cparam->xsize/(float)contextSettings->texturePow2SizeX, (float)cparam->ysize/(float)contextSettings->texturePow2SizeY); ! glVertex2f((float)cparam->xsize * zoom, 0.0f); ! glTexCoord2f((float)cparam->xsize/(float)contextSettings->texturePow2SizeX, 0.0f); ! glVertex2f((float)cparam->xsize * zoom, (float)cparam->ysize * zoom); ! glTexCoord2f(0.0f, 0.0f); ! glVertex2f(0.0f, (float)cparam->ysize * zoom); ! glEnd(); ! } else { ! qy = 0.0f; ! tey = 0.0f; ! for(j = 1; j <= 20; j++) { // Do 20 rows. ! py = qy; ! tsy = tey; ! qy = cparam->ysize * j / 20.0f; ! tey = qy / contextSettings->texturePow2SizeY; ! ! qx = 0.0f; ! tex = 0.0f; ! for(i = 1; i <= 20; i++) { // Draw 20 columns. ! px = qx; ! tsx = tex; ! qx = cparam->xsize * i / 20.0f; ! tex = qx / contextSettings->texturePow2SizeX; ! ! arParamObserv2Ideal(cparam->dist_factor, (double)px, (double)py, &x1, &y1); ! arParamObserv2Ideal(cparam->dist_factor, (double)qx, (double)py, &x2, &y2); ! arParamObserv2Ideal(cparam->dist_factor, (double)qx, (double)qy, &x3, &y3); ! arParamObserv2Ideal(cparam->dist_factor, (double)px, (double)qy, &x4, &y4); ! ! xx1 = (float)x1 * zoom; ! yy1 = (cparam->ysize - (float)y1) * zoom; ! xx2 = (float)x2 * zoom; ! yy2 = (cparam->ysize - (float)y2) * zoom; ! xx3 = (float)x3 * zoom; ! yy3 = (cparam->ysize - (float)y3) * zoom; ! xx4 = (float)x4 * zoom; ! yy4 = (cparam->ysize - (float)y4) * zoom; ! ! glBegin(GL_QUADS); ! glTexCoord2f(tsx, tsy); glVertex2f(xx1, yy1); ! glTexCoord2f(tex, tsy); glVertex2f(xx2, yy2); ! glTexCoord2f(tex, tey); glVertex2f(xx3, yy3); ! glTexCoord2f(tsx, tey); glVertex2f(xx4, yy4); ! glEnd(); ! } // columns. ! } // rows. ! } glDisable(GL_TEXTURE_2D); glEndList(); ! contextSettings->asInited_ysize = cparam->ysize; ! contextSettings->asInited_xsize = cparam->xsize; ! contextSettings->asInited_zoom = zoom; ! contextSettings->asInited_texmapScaleFactor = texmapScaleFactor; contextSettings->initedPow2 = TRUE; } *************** *** 655,658 **** --- 705,710 ---- void arglCleanup(ARGL_CONTEXT_SETTINGS_REF contextSettings) { + arglCleanupTexRectangle(contextSettings); + arglCleanupTexPow2(contextSettings); free(contextSettings); } *************** *** 740,745 **** --- 792,799 ---- { float zoomf; + int texmapScaleFactor; zoomf = (float)zoom; + texmapScaleFactor = arglTexmapMode + 1; if (arglDrawMode == AR_DRAW_BY_GL_DRAW_PIXELS) { glDisable(GL_TEXTURE_2D); *************** *** 748,760 **** glDrawPixels(cparam->xsize, cparam->ysize, AR_PIX_FORMAT, AR_PIX_TYPE, image); } else { #ifdef AR_OPENGL_TEXTURE_RECTANGLE if (!arglTexRectangle) { #endif // AR_OPENGL_TEXTURE_RECTANGLE ! arglDispImageTexPow2(image, cparam, zoomf, contextSettings, arglTexmapMode + 1); #ifdef AR_OPENGL_TEXTURE_RECTANGLE } else { ! arglDispImageTexRectangle(image, cparam, zoomf, contextSettings, arglTexmapMode + 1); } #endif // AR_OPENGL_TEXTURE_RECTANGLE } } --- 802,838 ---- glDrawPixels(cparam->xsize, cparam->ysize, AR_PIX_FORMAT, AR_PIX_TYPE, image); } else { + // Check whether any settings in globals/parameters have changed. + // N.B. We don't check cparam->dist_factor[], but this is unlikely to change! + if ((texmapScaleFactor != contextSettings->asInited_texmapScaleFactor) || + (zoomf != contextSettings->asInited_zoom) || + (cparam->xsize != contextSettings->asInited_xsize) || + (cparam->ysize != contextSettings->asInited_ysize)) { + contextSettings->initPlease = TRUE; + } + #ifdef AR_OPENGL_TEXTURE_RECTANGLE if (!arglTexRectangle) { #endif // AR_OPENGL_TEXTURE_RECTANGLE ! arglDispImageTexPow2(image, cparam, zoomf, contextSettings, texmapScaleFactor); #ifdef AR_OPENGL_TEXTURE_RECTANGLE } else { ! arglDispImageTexRectangle(image, cparam, zoomf, contextSettings, texmapScaleFactor); } #endif // AR_OPENGL_TEXTURE_RECTANGLE } } + + int arglDistortionCompensationSet(ARGL_CONTEXT_SETTINGS_REF contextSettings, int enable) + { + if (!contextSettings) return (FALSE); + contextSettings->disableDistortionCompensation = !enable; + contextSettings->initPlease = TRUE; + return (TRUE); + } + + int arglDistortionCompensationGet(ARGL_CONTEXT_SETTINGS_REF contextSettings, int *enable) + { + if (!contextSettings) return (FALSE); + *enable = !contextSettings->disableDistortionCompensation; + return (TRUE); + } |
From: Philip L. <phi...@us...> - 2005-07-30 01:06:01
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9427 Modified Files: gsub_lite.h Log Message: Added distortion compensation enabling/disabling. Index: gsub_lite.h =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/gsub_lite.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gsub_lite.h 18 Feb 2005 04:18:36 -0000 1.2 --- gsub_lite.h 30 Jul 2005 01:05:52 -0000 1.3 *************** *** 4,8 **** * Graphics Subroutines (Lite) for ARToolKit. * ! * Copyright (c) 2003-2004 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes --- 4,8 ---- * Graphics Subroutines (Lite) for ARToolKit. * ! * Copyright (c) 2003-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes *************** *** 16,19 **** --- 16,21 ---- * 2.7.5 2004-07-15 PRL Added arglDispImageStateful(); removed extraneous glPixelStorei(GL_UNPACK_IMAGE_HEIGHT,...) calls. * 2.7.6 2005-02-18 PRL Go back to using int rather than BOOL, to avoid conflict with Objective-C. + * 2.7.7 2005-07-26 PRL Added cleanup routines for texture stuff. + * 2.7.8 2005-07-29 PRL Added distortion compensation enabling/disabling. * */ *************** *** 79,84 **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! @copyright 2003-2004 Philip Lamb ! @updated 2004-07-02 */ --- 81,86 ---- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! @copyright 2003-2005 Philip Lamb ! @updated 2005-07-29 */ *************** *** 388,391 **** --- 390,430 ---- void arglDispImageStateful(ARUint8 *image, const ARParam *cparam, const double zoom, ARGL_CONTEXT_SETTINGS_REF contextSettings); + /*! + @function arglDistortionCompensationSet + @abstract Set compensation for camera lens distortion in arglDispImage to off or on. + @discussion + By default, arglDispImage compensates for the distortion of the camera's + acquired image caused by the lens when it draws. By calling this function + with enabled = FALSE, this compensation will be disabled in the specified + drawing context. It may be re-enabled at any time. + This function is useful if you need to draw an image, but do not know the + extent of the camera's lens distortion (such as during distortion calibration). + While distortion compensation is disabled, the dist_factor[] array in a + the camera cparam structure passed to arglDispImage is ignored. + @param contextSettings A reference to ARGL's settings for the current OpenGL + context, as returned by arglSetupForCurrentContext() for this context. + @param enable TRUE to enabled distortion compensation, FALSE to disable it. + The default state for new contexts is enable = TRUE. + @result TRUE if the distortion value was set, FALSE if an error occurred. + @availability First appeared in ARToolKit 2.71. + */ + int arglDistortionCompensationSet(ARGL_CONTEXT_SETTINGS_REF contextSettings, int enable); + + /*! + @function arglDistortionCompensationGet + @abstract Enquire as to the enable state of camera lens distortion compensation in arglDispImage. + @discussion + By default, arglDispImage compensates for the distortion of the camera's + acquired image caused by the lens when it draws. This function enquires + as to whether arglDispImage is currently doing compensation or not. + @param contextSettings A reference to ARGL's settings for the current OpenGL + context, as returned by arglSetupForCurrentContext() for this context. + @param enable Pointer to an integer value which will be set to TRUE if distortion + compensation is enabled in the specified context, or FALSE if it is disabled. + @result TRUE if the distortion value was set, FALSE if an error occurred. + @availability First appeared in ARToolKit 2.71. + */ + int arglDistortionCompensationGet(ARGL_CONTEXT_SETTINGS_REF contextSettings, int *enable); + #ifdef __cplusplus } |
From: Philip L. <phi...@us...> - 2005-07-30 01:02:06
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8686 Modified Files: param.h Log Message: Spelling corrections. Index: param.h =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/param.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** param.h 28 Jul 2005 00:00:40 -0000 1.5 --- param.h 30 Jul 2005 01:01:56 -0000 1.6 *************** *** 48,65 **** * \brief camera intrinsic parameters. * ! * this structure contains the main parameters for * the intrinsic parameters of the camera * representation. The camera used is a pinhole ! * camera with standard parameters. User can ! * report on Computer Vision Book for more informations. ! * (like Three-Dimensional Computer Vision * (Artificial Intelligence) by Olivier Faugeras). * \param xsize length of the image (in pixels). * \param ysize height of the image (in pixels). * \param mat perspective matrix (K). ! * \param dist_factor radial distorsions factor ! * dist_factor[0]=x center of distorsion ! * dist_factor[1]=y center of distorsion ! * dist_factor[2]=distorsion factor * dist_factor[3]=scale factor */ --- 48,65 ---- * \brief camera intrinsic parameters. * ! * This structure contains the main parameters for * the intrinsic parameters of the camera * representation. The camera used is a pinhole ! * camera with standard parameters. User should ! * consult a computer vision reference for more ! * information. (e.g. Three-Dimensional Computer Vision * (Artificial Intelligence) by Olivier Faugeras). * \param xsize length of the image (in pixels). * \param ysize height of the image (in pixels). * \param mat perspective matrix (K). ! * \param dist_factor radial distortions factor ! * dist_factor[0]=x center of distortion ! * dist_factor[1]=y center of distortion ! * dist_factor[2]=distortion factor * dist_factor[3]=scale factor */ |
From: Philip L. <phi...@us...> - 2005-07-29 23:23:18
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleLite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23918 Modified Files: simpleLite.c Log Message: Cleanup drawing code. Index: simpleLite.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simpleLite/simpleLite.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** simpleLite.c 28 Jul 2005 20:30:13 -0000 1.6 --- simpleLite.c 29 Jul 2005 23:23:08 -0000 1.7 *************** *** 8,12 **** * Press '?' while running for help on available key commands. * ! * Copyright (c) 2001-2004 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes --- 8,12 ---- * Press '?' while running for help on available key commands. * ! * Copyright (c) 2001-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes *************** *** 73,88 **** // ARToolKit globals. - static long gCallCountMarkerDetect = 0; - static int gARTThreshhold = 100; - static int gPatt_id; - static double gPatt_width = 80.0; - static double gPatt_centre[2] = {0.0, 0.0}; - static ARParam gARTCparam; static ARUint8 *gARTImage = NULL; static double gPatt_trans[3][4]; ! static int gPatt_found; static ARGL_CONTEXT_SETTINGS_REF gArglSettings = NULL; // Other globals. static int gDrawRotate = FALSE; --- 73,88 ---- // ARToolKit globals. static ARParam gARTCparam; static ARUint8 *gARTImage = NULL; + static int gARTThreshhold = 100; + static long gCallCountMarkerDetect = 0; static double gPatt_trans[3][4]; ! static int gPatt_found = FALSE; static ARGL_CONTEXT_SETTINGS_REF gArglSettings = NULL; + static int gPatt_id; + static double gPatt_width = 80.0; + static double gPatt_centre[2] = {0.0, 0.0}; + // Other globals. static int gDrawRotate = FALSE; *************** *** 148,152 **** // Sets up gARTCparam. ! static int demoARSetupCamera(const unsigned char *cparam_name, char *vconf) { ARParam wparam; --- 148,152 ---- // Sets up gARTCparam. ! static int demoARSetupCamera(const char *cparam_name, char *vconf) { ARParam wparam; *************** *** 181,185 **** } ! static int demoARSetupMarker(const unsigned char *patt_name, int *patt_id) { --- 181,185 ---- } ! static int demoARSetupMarker(const char *patt_name, int *patt_id) { *************** *** 229,232 **** --- 229,240 ---- } + static void Quit(void) + { + arglCleanup(gArglSettings); + arVideoCapStop(); + arVideoClose(); + exit(0); + } + static void Keyboard(unsigned char key, int x, int y) { *************** *** 235,242 **** case 'Q': case 'q': ! arglCleanup(gArglSettings); ! arVideoCapStop(); ! arVideoClose(); ! exit(0); break; case ' ': --- 243,247 ---- case 'Q': case 'q': ! Quit(); break; case ' ': *************** *** 258,262 **** demoARDebugReportMode(); break; - break; #ifdef AR_OPENGL_TEXTURE_RECTANGLE case 'R': --- 263,266 ---- *************** *** 289,293 **** float s_elapsed; ARUint8 *image; ! ARMarkerInfo *marker_info; // Pointer to array holding the details of detected markers. int marker_num; // Count of number of markers detected. --- 293,297 ---- float s_elapsed; ARUint8 *image; ! ARMarkerInfo *marker_info; // Pointer to array holding the details of detected markers. int marker_num; // Count of number of markers detected. *************** *** 305,309 **** // Grab a video frame. if ((image = arVideoGetImage()) != NULL) { ! gARTImage = image; gCallCountMarkerDetect++; // Increment ARToolKit FPS counter. --- 309,314 ---- // Grab a video frame. if ((image = arVideoGetImage()) != NULL) { ! gARTImage = image; // Save the fetched image. ! gPatt_found = FALSE; // Invalidate any previous detected markers. gCallCountMarkerDetect++; // Increment ARToolKit FPS counter. *************** *** 332,336 **** // Tell GLUT the display has changed. glutPostRedisplay(); ! } } --- 337,341 ---- // Tell GLUT the display has changed. glutPostRedisplay(); ! } } *************** *** 370,380 **** static void Display(void) { ! static GLdouble *p = NULL; ! GLdouble m[16]; ! // Context setup. glDrawBuffer(GL_BACK); arglDispImage(gARTImage, &gARTCparam, 1.0, gArglSettings); // zoom = 1.0. - arVideoCapNext(); --- 375,385 ---- static void Display(void) { ! GLdouble p[16]; ! GLdouble m[16]; ! // Select correct buffer for this context. glDrawBuffer(GL_BACK); + arglDispImage(gARTImage, &gARTCparam, 1.0, gArglSettings); // zoom = 1.0. arVideoCapNext(); *************** *** 383,390 **** // Projection transformation. ! if (p == NULL) { ! p = (GLdouble *)malloc(16 * (sizeof(GLdouble))); ! arglCameraFrustum(&gARTCparam, VIEW_DISTANCE_MIN, VIEW_DISTANCE_MAX, p); ! } glMatrixMode(GL_PROJECTION); glLoadMatrixd(p); --- 388,392 ---- // Projection transformation. ! arglCameraFrustum(&gARTCparam, VIEW_DISTANCE_MIN, VIEW_DISTANCE_MAX, p); glMatrixMode(GL_PROJECTION); glLoadMatrixd(p); *************** *** 397,401 **** //none ! // ARToolKit supplied distance in millimetres, but I want OpenGL to work in metres. arglCameraView(gPatt_trans, m, VIEW_SCALEFACTOR); glLoadMatrixd(m); --- 399,403 ---- //none ! // ARToolKit supplied distance in millimetres, but I want OpenGL to work in my units. arglCameraView(gPatt_trans, m, VIEW_SCALEFACTOR); glLoadMatrixd(m); *************** *** 403,408 **** // All other lighting and geometry goes here. DrawCube(); - - gPatt_found = FALSE; } // gPatt_found --- 405,408 ---- *************** *** 416,420 **** { char glutGamemode[32]; ! const unsigned char *cparam_name = "Data/camera_para.dat"; char *vconf = // Camera configuration. --- 416,420 ---- { char glutGamemode[32]; ! const char *cparam_name = "Data/camera_para.dat"; char *vconf = // Camera configuration. *************** *** 426,430 **** "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; #endif ! const unsigned char *patt_name = "Data/patt.hiro"; // ---------------------------------------------------------------------------- --- 426,430 ---- "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; #endif ! const char *patt_name = "Data/patt.hiro"; // ---------------------------------------------------------------------------- |
From: Philip L. <phi...@us...> - 2005-07-29 23:23:13
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleVRML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23886 Modified Files: simpleVRML.c Log Message: Cleanup drawing code. Index: simpleVRML.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simpleVRML/simpleVRML.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** simpleVRML.c 28 Jul 2005 21:57:44 -0000 1.5 --- simpleVRML.c 29 Jul 2005 23:23:03 -0000 1.6 *************** *** 8,12 **** * Copyright (c) 2002 Mark Billinghurst (MB) gr...@hi... * Copyright (c) 2004 Raphael Grasset (RG) rap...@hi.... ! * Copyright (c) 2004 Philip Lamb (PRL) ph...@ed.... * * Rev Date Who Changes --- 8,12 ---- * Copyright (c) 2002 Mark Billinghurst (MB) gr...@hi... * Copyright (c) 2004 Raphael Grasset (RG) rap...@hi.... ! * Copyright (c) 2004-2005 Philip Lamb (PRL) ph...@ed.... * * Rev Date Who Changes *************** *** 86,98 **** // ARToolKit globals. - static long gCallCountMarkerDetect = 0; - static int gARTThreshhold = 100; static ARParam gARTCparam; static ARUint8 *gARTImage = NULL; ! static int gPatt_found; static ARGL_CONTEXT_SETTINGS_REF gArglSettings = NULL; // Object Data. - static char *gObjectDataFilename = "Data/object_data_vrml"; static ObjectData_T *gObjectData; static int gObjectDataCount; --- 86,97 ---- // ARToolKit globals. static ARParam gARTCparam; static ARUint8 *gARTImage = NULL; ! static int gARTThreshhold = 100; ! static long gCallCountMarkerDetect = 0; ! static int gPatt_found = FALSE; static ARGL_CONTEXT_SETTINGS_REF gArglSettings = NULL; // Object Data. static ObjectData_T *gObjectData; static int gObjectDataCount; *************** *** 116,120 **** // Find the size of the window. if (arVideoInqSize(&xsize, &ysize) < 0) return (FALSE); ! fprintf(stderr, "demoARSetupCamera(): Camera image size (x,y) = (%d,%d)\n", xsize, ysize); // Load the camera parameters, resize for the window and init. --- 115,119 ---- // Find the size of the window. if (arVideoInqSize(&xsize, &ysize) < 0) return (FALSE); ! fprintf(stdout, "Camera image size (x,y) = (%d,%d)\n", xsize, ysize); // Load the camera parameters, resize for the window and init. *************** *** 125,129 **** arParamChangeSize(&wparam, xsize, ysize, &gARTCparam); arInitCparam(&gARTCparam); ! fprintf(stderr, "*** Camera Parameter ***\n"); arParamDisp(&gARTCparam); --- 124,128 ---- arParamChangeSize(&wparam, xsize, ysize, &gARTCparam); arInitCparam(&gARTCparam); ! fprintf(stdout, "*** Camera Parameter ***\n"); arParamDisp(&gARTCparam); *************** *** 136,143 **** } ! static int demoARSetupMarkersObjects(void) { // Load in the object data - trained markers and associated bitmap files. ! if ((gObjectData = read_VRMLdata(gObjectDataFilename, &gObjectDataCount)) == NULL) exit(0); printf("Object count = %d\n", gObjectDataCount); --- 135,146 ---- } ! static int demoARSetupMarkersObjects(char *objectDataFilename) { // Load in the object data - trained markers and associated bitmap files. ! if ((gObjectData = read_VRMLdata(objectDataFilename, &gObjectDataCount)) == NULL) { ! fprintf(stderr, "demoARSetupMarkersObjects(): read_VRMLdata returned error !!\n"); ! return (FALSE); ! } ! printf("Object count = %d\n", gObjectDataCount); *************** *** 217,221 **** demoARDebugReportMode(); break; - break; #ifdef AR_OPENGL_TEXTURE_RECTANGLE case 'R': --- 220,223 ---- *************** *** 248,252 **** float s_elapsed; ARUint8 *image; ! ARMarkerInfo *marker_info; // Pointer to array holding the details of detected markers. int marker_num; // Count of number of markers detected. --- 250,254 ---- float s_elapsed; ARUint8 *image; ! ARMarkerInfo *marker_info; // Pointer to array holding the details of detected markers. int marker_num; // Count of number of markers detected. *************** *** 264,268 **** // Grab a video frame. if ((image = arVideoGetImage()) != NULL) { ! gARTImage = image; gCallCountMarkerDetect++; // Increment ARToolKit FPS counter. --- 266,271 ---- // Grab a video frame. if ((image = arVideoGetImage()) != NULL) { ! gARTImage = image; // Save the fetched image. ! gPatt_found = FALSE; // Invalidate any previous detected markers. gCallCountMarkerDetect++; // Increment ARToolKit FPS counter. *************** *** 274,278 **** // Check for object visibility. - gPatt_found = FALSE; // At this stage, no patterns found. for (i = 0; i < gObjectDataCount; i++) { --- 277,280 ---- *************** *** 305,313 **** gPatt_found = TRUE; } ! } } - - // Tell GLUT to update the display. - glutPostRedisplay(); } --- 307,315 ---- gPatt_found = TRUE; } ! } ! ! // Tell GLUT to update the display. ! glutPostRedisplay(); } } *************** *** 338,342 **** glMatrixMode(GL_MODELVIEW); glLoadIdentity(); ! // Call through to anyone else who needs to know about window sizing here. } --- 340,344 ---- glMatrixMode(GL_MODELVIEW); glLoadIdentity(); ! // Call through to anyone else who needs to know about window sizing here. } *************** *** 348,372 **** { int i; ! static GLdouble *p = NULL; GLdouble m[16]; ! // Context setup. glDrawBuffer(GL_BACK); arglDispImage(gARTImage, &gARTCparam, 1.0, gArglSettings); // zoom = 1.0. - arVideoCapNext(); ! if (gPatt_found) { glClear(GL_DEPTH_BUFFER_BIT); // Clear the buffers for new frame. // Projection transformation. ! if (p == NULL) { ! p = (GLdouble *)malloc(16 * (sizeof(GLdouble))); ! arglCameraFrustum(&gARTCparam, VIEW_DISTANCE_MIN, VIEW_DISTANCE_MAX, p); ! } glMatrixMode(GL_PROJECTION); glLoadMatrixd(p); glMatrixMode(GL_MODELVIEW); ! // Viewing transformation. glLoadIdentity(); --- 350,371 ---- { int i; ! GLdouble p[16]; GLdouble m[16]; ! // Select correct buffer for this context. glDrawBuffer(GL_BACK); + arglDispImage(gARTImage, &gARTCparam, 1.0, gArglSettings); // zoom = 1.0. arVideoCapNext(); ! if (gPatt_found) { glClear(GL_DEPTH_BUFFER_BIT); // Clear the buffers for new frame. // Projection transformation. ! arglCameraFrustum(&gARTCparam, VIEW_DISTANCE_MIN, VIEW_DISTANCE_MAX, p); glMatrixMode(GL_PROJECTION); glLoadMatrixd(p); glMatrixMode(GL_MODELVIEW); ! // Viewing transformation. glLoadIdentity(); *************** *** 386,393 **** } } - - gPatt_found = FALSE; } // gPatt_found ! // Any 2D overlays go here. //none --- 385,390 ---- } } } // gPatt_found ! // Any 2D overlays go here. //none *************** *** 409,412 **** --- 406,410 ---- "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; #endif + static char objectDataFilename[] = "Data/object_data_vrml"; // ---------------------------------------------------------------------------- *************** *** 415,419 **** glutInit(&argc, argv); ! // ---------------------------------------------------------------------------- // Hardware setup. --- 413,417 ---- glutInit(&argc, argv); ! // ---------------------------------------------------------------------------- // Hardware setup. *************** *** 453,458 **** arUtilTimerReset(); ! if (!demoARSetupMarkersObjects()) { fprintf(stderr, "main(): Unable to set up AR objects and markers.\n"); } --- 451,457 ---- arUtilTimerReset(); ! if (!demoARSetupMarkersObjects(objectDataFilename)) { fprintf(stderr, "main(): Unable to set up AR objects and markers.\n"); + Quit(); } *************** *** 465,469 **** glutMainLoop(); ! return (0); ! } \ No newline at end of file --- 464,468 ---- glutMainLoop(); ! return (0); ! } |
From: Philip L. <phi...@us...> - 2005-07-29 23:23:07
|
Update of /cvsroot/artoolkit/artoolkit/examples/twoView In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23859 Modified Files: twoView.c Log Message: Cleanup drawing code. Index: twoView.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/twoView/twoView.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** twoView.c 28 Jul 2005 21:58:06 -0000 1.8 --- twoView.c 29 Jul 2005 23:22:59 -0000 1.9 *************** *** 5,9 **** * Press '?' while running for help. * ! * Copyright (c) 2004-2004 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes --- 5,9 ---- * Press '?' while running for help. * ! * Copyright (c) 2004-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes *************** *** 71,74 **** --- 71,75 ---- AR2VideoParamT *ARTVideo; // Video parameters ARUint8 *ARTImage; // Most recent image. + int ARTThreshhold; // Threshold for marker detection. long callCountMarkerDetect; // Frames received. double patt_trans[3][4]; // Marker transformation. *************** *** 88,92 **** // ARToolKit globals. static long gCallCountGetImage = 0; - static int gARTThreshhold = 100; static int gPatt_id; static double gPatt_width = 80.0; --- 89,92 ---- *************** *** 191,222 **** } - // Function to clean up and then exit. Will be - // installed by atexit() and called when program exit()s. - static void Quit(void) - { - int i; - - fprintf(stderr, "Quitting...\n"); - - // OpenGL per-context cleanup. - for (i = 0; i < gContextsActiveCount; i++) { - if (gContextsActive[i].apiContextIndex) { - glutSetWindow(gContextsActive[i].apiContextIndex); - arglCleanup(gContextsActive[i].arglSettings); - DrawCubeCleanup(i); - glutDestroyWindow(gContextsActive[i].apiContextIndex); - gContextsActive[i].apiContextIndex = 0; - } - ar2VideoCapStop(gContextsActive[i].ARTVideo); - ar2VideoClose(gContextsActive[i].ARTVideo); - } - gContextsActiveCount = 0; - - // Library finals (in reverse order to inits.) - DrawCubeFinal(); - } - // Sets up fields ARTVideo, ARTCparam of gContextsActive[0] through gContextsActive[cameraCount - 1]. ! static int demoARSetupCameras(const int cameraCount, const unsigned char *cparam_names[], char *vconfs[]) { int i; --- 191,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; *************** *** 245,248 **** --- 219,223 ---- fprintf(stderr, "*** Camera %d parameter ***\n", i + 1); arParamDisp(&(gContextsActive[i].ARTCparam)); + gContextsActive[i].ARTThreshhold = 100; // Start the video capture for this camera. *************** *** 256,260 **** } ! static int demoARSetupMarker(const unsigned char *patt_name, int *patt_id) { --- 231,235 ---- } ! static int demoARSetupMarker(const char *patt_name, int *patt_id) { *************** *** 325,328 **** --- 300,329 ---- } + // Function to clean up and then exit. Will be + // installed by atexit() and called when program exit()s. + static void Quit(void) + { + int i; + + fprintf(stdout, "Quitting...\n"); + + // OpenGL per-context cleanup. + for (i = 0; i < gContextsActiveCount; i++) { + if (gContextsActive[i].apiContextIndex) { + glutSetWindow(gContextsActive[i].apiContextIndex); + arglCleanup(gContextsActive[i].arglSettings); + DrawCubeCleanup(i); + glutDestroyWindow(gContextsActive[i].apiContextIndex); + gContextsActive[i].apiContextIndex = 0; + } + ar2VideoCapStop(gContextsActive[i].ARTVideo); + ar2VideoClose(gContextsActive[i].ARTVideo); + } + gContextsActiveCount = 0; + + // Library finals (in reverse order to inits.) + DrawCubeFinal(); + } + static void Keyboard(unsigned char key, int x, int y) { *************** *** 407,411 **** // Grab a video frame. if ((image = ar2VideoGetImage(gContextsActive[i].ARTVideo)) != NULL) { ! gContextsActive[i].ARTImage = image; gContextsActive[i].callCountMarkerDetect++; // Increment ARToolKit FPS counter. --- 408,413 ---- // Grab a video frame. if ((image = ar2VideoGetImage(gContextsActive[i].ARTVideo)) != NULL) { ! gContextsActive[i].ARTImage = image; // Save the fetched image. ! gContextsActive[i].patt_found = FALSE; // Invalidate any previous detected markers. gContextsActive[i].callCountMarkerDetect++; // Increment ARToolKit FPS counter. *************** *** 413,417 **** // Detect the markers in the video frame. ! if (arDetectMarkerLite(gContextsActive[i].ARTImage, gARTThreshhold, &marker_info, &marker_num) < 0) { exit(-1); } --- 415,419 ---- // Detect the markers in the video frame. ! if (arDetectMarkerLite(gContextsActive[i].ARTImage, gContextsActive[i].ARTThreshhold, &marker_info, &marker_num) < 0) { exit(-1); } *************** *** 469,472 **** --- 471,477 ---- } + // + // The function is called when a window needs redrawing. + // static void DisplayPerContext(const int drawContextIndex) { *************** *** 487,492 **** // Projection transformation. - glMatrixMode(GL_PROJECTION); arglCameraFrustum(&(gContextsActive[drawContextIndex].ARTCparam), VIEW_DISTANCE_MIN, VIEW_DISTANCE_MAX, p); glLoadMatrixd(p); glMatrixMode(GL_MODELVIEW); --- 492,497 ---- // Projection transformation. arglCameraFrustum(&(gContextsActive[drawContextIndex].ARTCparam), VIEW_DISTANCE_MIN, VIEW_DISTANCE_MAX, p); + glMatrixMode(GL_PROJECTION); glLoadMatrixd(p); glMatrixMode(GL_MODELVIEW); *************** *** 498,502 **** //none ! // ARToolKit supplied distance in millimetres, but I want OpenGL to work in metres. arglCameraView(gContextsActive[drawContextIndex].patt_trans, m, VIEW_SCALEFACTOR); glLoadMatrixd(m); --- 503,507 ---- //none ! // ARToolKit supplied distance in millimetres, but I want OpenGL to work in my units. arglCameraView(gContextsActive[drawContextIndex].patt_trans, m, VIEW_SCALEFACTOR); glLoadMatrixd(m); *************** *** 504,509 **** // All other lighting and geometry goes here. DrawCube(drawContextIndex); - - gContextsActive[drawContextIndex].patt_found = FALSE; } // patt_found --- 509,512 ---- *************** *** 541,545 **** int i; char windowTitle[32] = {0}; ! const unsigned char *cparam_names[] = { // Camera parameter names. "Data/camera_para.dat", "Data/camera_para.dat", --- 544,548 ---- int i; char windowTitle[32] = {0}; ! const char *cparam_names[] = { // Camera parameter names. "Data/camera_para.dat", "Data/camera_para.dat", *************** *** 557,561 **** #endif }; ! const unsigned char *patt_name = "Data/patt.hiro"; --- 560,564 ---- #endif }; ! const char *patt_name = "Data/patt.hiro"; |
From: Philip L. <phi...@us...> - 2005-07-29 19:56:38
|
Update of /cvsroot/artoolkit/artoolkit/util/graphicsTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16672 Added Files: graphicsTest-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: graphicsTest-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>graphicsTest</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.graphicsTest</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2005-07-29 19:56:34
|
Update of /cvsroot/artoolkit/artoolkit/util/videoTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16649 Added Files: videoTest-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: videoTest-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>videoTest</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.videoTest</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2005-07-29 19:32:23
|
Update of /cvsroot/artoolkit/artoolkit/examples/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11936 Added Files: simpleTest-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: simpleTest-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>simpleTest</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.simpleTest</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2005-07-29 19:32:19
|
Update of /cvsroot/artoolkit/artoolkit/examples/optical In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11918 Added Files: optical-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: optical-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>optical</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.optical</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2005-07-29 19:32:14
|
Update of /cvsroot/artoolkit/artoolkit/examples/relation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11901 Added Files: relationTest-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: relationTest-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>relationTest</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.relationTest</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2005-07-29 19:32:09
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleLite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11881 Added Files: simpleLite-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: simpleLite-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>simpleLite</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.simpleLite</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2005-07-29 19:32:01
|
Update of /cvsroot/artoolkit/artoolkit/examples/paddle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11861 Added Files: paddleTest-Info.plist Log Message: Necessary file for Mac application bundle. --- NEW FILE: paddleTest-Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>paddleTest</string> <key>CFBundleIdentifier</key> <string>org.hitlabnz.paddleTest</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.71</string> </dict> </plist> |