artoolkit-commits Mailing List for ARToolKit (Page 10)
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...> - 2006-06-18 22:50:18
|
Update of /cvsroot/artoolkit/artoolkit/examples/paddle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5169 Modified Files: paddleTest-Info.plist Log Message: Update version for release. Index: paddleTest-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/paddle/paddleTest-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** paddleTest-Info.plist 29 Jul 2005 19:31:52 -0000 1.1 --- paddleTest-Info.plist 18 Jun 2006 22:50:16 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:50:07
|
Update of /cvsroot/artoolkit/artoolkit/examples/modeTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4858 Modified Files: modeTest-Info.plist Log Message: Update version for release. Index: modeTest-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/modeTest/modeTest-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** modeTest-Info.plist 29 Jul 2005 17:56:15 -0000 1.1 --- modeTest-Info.plist 18 Jun 2006 22:50:05 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:49:57
|
Update of /cvsroot/artoolkit/artoolkit/examples/range In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4763 Modified Files: rangeTest-Info.plist Log Message: Update version for release. Index: rangeTest-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/range/rangeTest-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rangeTest-Info.plist 29 Jul 2005 19:31:35 -0000 1.1 --- rangeTest-Info.plist 18 Jun 2006 22:49:55 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:49:50
|
Update of /cvsroot/artoolkit/artoolkit/examples/twoView In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4744 Modified Files: twoView-Info.plist Log Message: Update version for release. Index: twoView-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/twoView/twoView-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twoView-Info.plist 29 Jul 2005 19:31:43 -0000 1.1 --- twoView-Info.plist 18 Jun 2006 22:49:46 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:49:42
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleLite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4716 Modified Files: simpleLite-Info.plist Log Message: Update version for release. Index: simpleLite-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simpleLite/simpleLite-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpleLite-Info.plist 29 Jul 2005 19:32:01 -0000 1.1 --- simpleLite-Info.plist 18 Jun 2006 22:49:39 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:49:35
|
Update of /cvsroot/artoolkit/artoolkit/examples/relation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4692 Modified Files: relationTest-Info.plist Log Message: Update version for release. Index: relationTest-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/relation/relationTest-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** relationTest-Info.plist 29 Jul 2005 19:32:06 -0000 1.1 --- relationTest-Info.plist 18 Jun 2006 22:49:32 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:49:29
|
Update of /cvsroot/artoolkit/artoolkit/examples/simple2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4665 Modified Files: simpleTest2-Info.plist Log Message: Update version for release. Index: simpleTest2-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simple2/simpleTest2-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpleTest2-Info.plist 29 Jul 2005 19:31:48 -0000 1.1 --- simpleTest2-Info.plist 18 Jun 2006 22:49:25 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:49:20
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_cparam In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4646 Modified Files: calib_cparam-Info.plist Log Message: Update version for release. Index: calib_cparam-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_cparam/calib_cparam-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** calib_cparam-Info.plist 12 Aug 2005 23:11:29 -0000 1.1 --- calib_cparam-Info.plist 18 Jun 2006 22:49:17 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:49:13
|
Update of /cvsroot/artoolkit/artoolkit/examples/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4618 Modified Files: simpleTest-Info.plist Log Message: Update version for release. Index: simpleTest-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simple/simpleTest-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpleTest-Info.plist 29 Jul 2005 19:32:15 -0000 1.1 --- simpleTest-Info.plist 18 Jun 2006 22:49:11 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:49:07
|
Update of /cvsroot/artoolkit/artoolkit/examples/paddleDemo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4415 Modified Files: paddleDemo-Info.plist Log Message: Update version for release. Index: paddleDemo-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/paddleDemo/paddleDemo-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** paddleDemo-Info.plist 29 Jul 2005 19:31:39 -0000 1.1 --- paddleDemo-Info.plist 18 Jun 2006 22:49:04 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:48:59
|
Update of /cvsroot/artoolkit/artoolkit/examples/optical In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4249 Modified Files: optical-Info.plist Log Message: Update version for release. Index: optical-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/optical/optical-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** optical-Info.plist 29 Jul 2005 19:32:10 -0000 1.1 --- optical-Info.plist 18 Jun 2006 22:48:56 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:48:52
|
Update of /cvsroot/artoolkit/artoolkit/util/videoTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4229 Modified Files: videoTest-Info.plist Log Message: Update version for release. Index: videoTest-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/videoTest/videoTest-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** videoTest-Info.plist 29 Jul 2005 19:56:25 -0000 1.1 --- videoTest-Info.plist 18 Jun 2006 22:48:49 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:48:45
|
Update of /cvsroot/artoolkit/artoolkit/util/mk_patt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4206 Modified Files: mk_patt-Info.plist Log Message: Update version for release. Index: mk_patt-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/mk_patt/mk_patt-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mk_patt-Info.plist 12 Aug 2005 21:48:46 -0000 1.1 --- mk_patt-Info.plist 18 Jun 2006 22:48:43 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:48:38
|
Update of /cvsroot/artoolkit/artoolkit/examples/paddleInteraction In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4188 Modified Files: paddleInteractionTest-Info.plist Log Message: Update version for release. Index: paddleInteractionTest-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/paddleInteraction/paddleInteractionTest-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** paddleInteractionTest-Info.plist 29 Jul 2005 19:31:27 -0000 1.1 --- paddleInteractionTest-Info.plist 18 Jun 2006 22:48:36 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-18 22:48:31
|
Update of /cvsroot/artoolkit/artoolkit/examples/collide In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4169 Modified Files: collideTest-Info.plist Log Message: Update version for release. Index: collideTest-Info.plist =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/collide/collideTest-Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** collideTest-Info.plist 29 Jul 2005 00:44:32 -0000 1.1 --- collideTest-Info.plist 18 Jun 2006 22:48:27 -0000 1.2 *************** *** 16,20 **** <string>????</string> <key>CFBundleVersion</key> ! <string>2.71</string> </dict> </plist> --- 16,20 ---- <string>????</string> <key>CFBundleVersion</key> ! <string>2.71.3</string> </dict> </plist> |
From: Philip L. <phi...@us...> - 2006-06-15 04:46:45
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/Gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6448 Modified Files: gsub_lite.c Log Message: Fix long-standing bug when drawing to fullscreen windows in drawpixels mode. Index: gsub_lite.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/Gl/gsub_lite.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** gsub_lite.c 8 Jun 2006 21:34:41 -0000 1.17 --- gsub_lite.c 15 Jun 2006 04:46:37 -0000 1.18 *************** *** 20,23 **** --- 20,24 ---- * 2.8.0 2006-04-04 PRL Move pixel format constants into toolkit global namespace (in config.h). * 2.8.1 2006-04-06 PRL Move arglDrawMode, arglTexmapMode, arglTexRectangle out of global variables. + * 2.8.2 2006-06-12 PRL More stringent runtime GL caps checking. Fix zoom for DRAWPIXELS mode. * */ *************** *** 176,232 **** // - // Convert a camera parameter structure into an OpenGL projection matrix. - // - static void arglConvGLcpara(ARParam *param, double focalmin, double focalmax, double m[16]) - { - double icpara[3][4]; - double trans[3][4]; - double p[3][3], q[4][4]; - int i, j; - - if(arParamDecompMat(param->mat, icpara, trans) < 0) { - fprintf(stderr, "arglConvGLcpara(): arParamDecompMat() indicated parameter error.\n"); - return; - } - - for(i = 0; i < 3; i++) { - for(j = 0; j < 3; j++) { - p[i][j] = icpara[i][j] / icpara[2][2]; - } - } - q[0][0] = (2.0 * p[0][0] / param->xsize); - q[0][1] = (2.0 * p[0][1] / param->xsize); - q[0][2] = ((2.0 * p[0][2] / param->xsize) - 1.0); - q[0][3] = 0.0; - - q[1][0] = 0.0; - q[1][1] = (2.0 * p[1][1] / param->ysize); - q[1][2] = ((2.0 * p[1][2] / param->ysize) - 1.0); - q[1][3] = 0.0; - - q[2][0] = 0.0; - q[2][1] = 0.0; - q[2][2] = (focalmax + focalmin)/(focalmax - focalmin); - q[2][3] = -2.0 * focalmax * focalmin / (focalmax - focalmin); - - q[3][0] = 0.0; - q[3][1] = 0.0; - q[3][2] = 1.0; - q[3][3] = 0.0; - - for(i = 0; i < 4; i++) { - for(j = 0; j < 3; j++) { - m[i+j*4] = q[i][0] * trans[0][j] - + q[i][1] * trans[1][j] - + q[i][2] * trans[2][j]; - } - m[i+3*4] = q[i][0] * trans[0][3] - + q[i][1] * trans[1][3] - + q[i][2] * trans[2][3] - + q[i][3]; - } - } - - // // Provide a gluCheckExtension() function, since some platforms don't have GLU version 1.3 or later. // --- 177,180 ---- *************** *** 700,704 **** // Use default pixel format handed to us by <AR/config.h>. if (!arglPixelFormatSet(contextSettings, AR_DEFAULT_PIXEL_FORMAT)) { ! fprintf(stderr, "Unknown or unsupported default pixel format defined in config.h.\n"); return (NULL); } --- 648,652 ---- // Use default pixel format handed to us by <AR/config.h>. if (!arglPixelFormatSet(contextSettings, AR_DEFAULT_PIXEL_FORMAT)) { ! fprintf(stderr, "Unknown default pixel format defined in config.h.\n"); return (NULL); } *************** *** 717,730 **** } void arglCameraFrustum(const ARParam *cparam, const double focalmin, const double focalmax, GLdouble m_projection[16]) { ! int i; ! ARParam cparam_copy; ! cparam_copy = *cparam; for (i = 0; i < 4; i++) { ! cparam_copy.mat[1][i] = (cparam_copy.ysize - 1)*(cparam_copy.mat[2][i]) - cparam_copy.mat[1][i]; } ! arglConvGLcpara(&cparam_copy, focalmin, focalmax, m_projection); } --- 665,726 ---- } + // + // Convert a camera parameter structure into an OpenGL projection matrix. + // void arglCameraFrustum(const ARParam *cparam, const double focalmin, const double focalmax, GLdouble m_projection[16]) { ! double icpara[3][4]; ! double trans[3][4]; ! double p[3][3], q[4][4]; ! int width, height; ! int i, j; ! ! width = cparam->xsize; ! height = cparam->ysize; ! if (arParamDecompMat(cparam->mat, icpara, trans) < 0) { ! fprintf(stderr, "arglCameraFrustum(): arParamDecompMat() indicated parameter error.\n"); ! return; ! } for (i = 0; i < 4; i++) { ! icpara[1][i] = (height - 1)*(icpara[2][i]) - icpara[1][i]; } ! ! for(i = 0; i < 3; i++) { ! for(j = 0; j < 3; j++) { ! p[i][j] = icpara[i][j] / icpara[2][2]; ! } ! } ! q[0][0] = (2.0 * p[0][0] / (width - 1)); ! q[0][1] = (2.0 * p[0][1] / (width - 1)); ! q[0][2] = ((2.0 * p[0][2] / (width - 1)) - 1.0); ! q[0][3] = 0.0; ! ! q[1][0] = 0.0; ! q[1][1] = (2.0 * p[1][1] / (height - 1)); ! q[1][2] = ((2.0 * p[1][2] / (height - 1)) - 1.0); ! q[1][3] = 0.0; ! ! q[2][0] = 0.0; ! q[2][1] = 0.0; ! q[2][2] = (focalmax + focalmin)/(focalmax - focalmin); ! q[2][3] = -2.0 * focalmax * focalmin / (focalmax - focalmin); ! ! q[3][0] = 0.0; ! q[3][1] = 0.0; ! q[3][2] = 1.0; ! q[3][3] = 0.0; ! ! for (i = 0; i < 4; i++) { ! for (j = 0; j < 3; j++) { ! m_projection[i + j*4] = q[i][0] * trans[0][j] ! + q[i][1] * trans[1][j] ! + q[i][2] * trans[2][j]; ! } ! m_projection[i + 3*4] = q[i][0] * trans[0][3] ! + q[i][1] * trans[1][3] ! + q[i][2] * trans[2][3] ! + q[i][3]; ! } } *************** *** 798,802 **** { float zoomf; ! int texmapScaleFactor; zoomf = (float)zoom; --- 794,798 ---- { float zoomf; ! int texmapScaleFactor, params[4]; zoomf = (float)zoom; *************** *** 804,809 **** if (contextSettings->arglDrawMode == AR_DRAW_BY_GL_DRAW_PIXELS) { glDisable(GL_TEXTURE_2D); ! glPixelZoom(zoomf, -zoomf); ! glRasterPos2f(0.0f, cparam->ysize * zoomf); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glDrawPixels(cparam->xsize, cparam->ysize, contextSettings->pixFormat, contextSettings->pixType, image); --- 800,807 ---- if (contextSettings->arglDrawMode == AR_DRAW_BY_GL_DRAW_PIXELS) { glDisable(GL_TEXTURE_2D); ! glGetIntegerv(GL_VIEWPORT, params); ! glPixelZoom(zoomf * ((float)(params[2]) / (float)(cparam->xsize)), ! -zoomf * ((float)(params[3]) / (float)(cparam->ysize))); ! glRasterPos2f(0.0f, (float)(cparam->ysize)); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glDrawPixels(cparam->xsize, cparam->ysize, contextSettings->pixFormat, contextSettings->pixType, image); |
From: Philip L. <phi...@us...> - 2006-06-15 04:46:34
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6410 Modified Files: gsub_lite.h Log Message: Fix long-standing bug when drawing to fullscreen windows in drawpixels mode. Index: gsub_lite.h =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/gsub_lite.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gsub_lite.h 22 May 2006 22:17:53 -0000 1.11 --- gsub_lite.h 15 Jun 2006 04:46:30 -0000 1.12 *************** *** 20,23 **** --- 20,24 ---- * 2.8.0 2006-04-04 PRL Move pixel format constants into toolkit global namespace (in config.h). * 2.8.1 2006-04-06 PRL Move arglDrawMode, arglTexmapMode, arglTexRectangle out of global variables. + * 2.8.2 2006-06-12 PRL More stringent runtime GL caps checking. Fix zoom for DRAWPIXELS mode. * */ |
From: Philip L. <phi...@us...> - 2006-06-14 05:08:15
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26413 Modified Files: config.h.in Log Message: Correct comment. Index: config.h.in =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/config.h.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config.h.in 25 May 2006 04:08:19 -0000 1.6 --- config.h.in 14 Jun 2006 05:08:07 -0000 1.7 *************** *** 73,77 **** # undef AR_LITTLE_ENDIAN # elif defined (__LITTLE_ENDIAN__) ! # undef AR_BIG_ENDIAN // Least significant Byte has least address in memory (i386). # define AR_LITTLE_ENDIAN # endif --- 73,77 ---- # undef AR_LITTLE_ENDIAN # elif defined (__LITTLE_ENDIAN__) ! # undef AR_BIG_ENDIAN // Least significant Byte has greatest address in memory (i386). # define AR_LITTLE_ENDIAN # endif |
From: Philip L. <phi...@us...> - 2006-06-08 22:16:43
|
Update of /cvsroot/artoolkit/artoolkit/ARToolKit.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6008 Modified Files: project.pbxproj Log Message: Changes in mk_patt. Index: project.pbxproj =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/ARToolKit.xcodeproj/project.pbxproj,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** project.pbxproj 1 Jun 2006 03:41:19 -0000 1.12 --- project.pbxproj 8 Jun 2006 22:16:37 -0000 1.13 *************** *** 269,272 **** --- 269,273 ---- 4A8EA5A40658752200ADDDD1 /* gsub_lite.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A8EA5A30658752200ADDDD1 /* gsub_lite.c */; }; 4A8EA5B00658754A00ADDDD1 /* gsub_lite.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A8EA5AF0658754A00ADDDD1 /* gsub_lite.h */; }; + 4AC48C650A37BA7F007A153D /* libARgsub_lite.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A66475606598B950061DA76 /* libARgsub_lite.a */; }; 4ADF303606A78E0B00F6204E /* arMultiGetTransMat.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A427D490484329900B56093 /* arMultiGetTransMat.c */; }; 4AF4982B066FFEBD00EEDF04 /* videoMacOSX.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A427D0C0484329800B56093 /* videoMacOSX.h */; }; *************** *** 428,432 **** 7872EF9208E3196100DB266E /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A3F14FE064A0C510042B0D7 /* QuickTime.framework */; }; 7872EF9308E3196100DB266E /* libAR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A427D120484329800B56093 /* libAR.a */; }; - 7872EF9408E3196100DB266E /* libARgsub.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A427D130484329800B56093 /* libARgsub.a */; }; 7872EF9508E3196100DB266E /* libARvideo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A427D160484329800B56093 /* libARvideo.a */; }; 7872EF9608E3196100DB266E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A934B5C086A150A00DF2FAC /* Cocoa.framework */; }; --- 429,432 ---- *************** *** 1922,1926 **** 7872EF9208E3196100DB266E /* QuickTime.framework in Frameworks */, 7872EF9308E3196100DB266E /* libAR.a in Frameworks */, ! 7872EF9408E3196100DB266E /* libARgsub.a in Frameworks */, 7872EF9508E3196100DB266E /* libARvideo.a in Frameworks */, 7872EF9608E3196100DB266E /* Cocoa.framework in Frameworks */, --- 1922,1926 ---- 7872EF9208E3196100DB266E /* QuickTime.framework in Frameworks */, 7872EF9308E3196100DB266E /* libAR.a in Frameworks */, ! 4AC48C650A37BA7F007A153D /* libARgsub_lite.a in Frameworks */, 7872EF9508E3196100DB266E /* libARvideo.a in Frameworks */, 7872EF9608E3196100DB266E /* Cocoa.framework in Frameworks */, |
From: Philip L. <phi...@us...> - 2006-06-08 22:05:13
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32233 Modified Files: video.c Log Message: Don't return a copy of the acquired image if running on an Intel Mac. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX/video.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** video.c 24 May 2006 03:35:18 -0000 1.17 --- video.c 8 Jun 2006 22:05:08 -0000 1.18 *************** *** 93,97 **** // ============================================================================ ! #define AR_VIDEO_DEBUG_BUFFERCOPY // Uncomment to have ar2VideoGetImage() return a copy of video pixel data. //#define AR_VIDEO_SUPPORT_OLD_QUICKTIME // Uncomment to allow use of non-thread safe QuickTime (pre-6.4). #define AR_VIDEO_DEBUG_FIX_DUAL_PROCESSOR_RACE --- 93,99 ---- // ============================================================================ ! #ifndef __i386__ // Hack: don't do buffercopy on Intel Macs. ! # define AR_VIDEO_DEBUG_BUFFERCOPY // Uncomment to have ar2VideoGetImage() return a copy of video pixel data. ! #endif //#define AR_VIDEO_SUPPORT_OLD_QUICKTIME // Uncomment to allow use of non-thread safe QuickTime (pre-6.4). #define AR_VIDEO_DEBUG_FIX_DUAL_PROCESSOR_RACE *************** *** 162,169 **** long bufSize; // PRL. ARUint8* bufPixels; // PRL. ! #ifdef AR_VIDEO_DEBUG_BUFFERCOPY ARUint8* bufPixelsCopy1; // PRL. ARUint8* bufPixelsCopy2; // PRL. - #endif // AR_VIDEO_DEBUG_BUFFERCOPY int grabber; // PRL. MatrixRecordPtr scaleMatrixPtr; // PRL. --- 164,170 ---- long bufSize; // PRL. ARUint8* bufPixels; // PRL. ! int bufCopyFlag; // PRL ARUint8* bufPixelsCopy1; // PRL. ARUint8* bufPixelsCopy2; // PRL. int grabber; // PRL. MatrixRecordPtr scaleMatrixPtr; // PRL. *************** *** 1363,1366 **** --- 1364,1373 ---- //vid->timeScale = 0; vid->grabber = grabber; + #ifdef AR_VIDEO_DEBUG_BUFFERCOPY + vid->bufCopyFlag = 1; + #else + vid->bufCopyFlag = 0; + #endif // AR_VIDEO_DEBUG_BUFFERCOPY + if(!(vid->pVdg = vdgAllocAndInit(grabber))) { *************** *** 1446,1455 **** vid->bufSize = vid->height * vid->rowBytes; if (!(vid->bufPixels = (ARUint8 *)valloc(vid->bufSize * sizeof(ARUint8)))) exit (1); ! #ifdef AR_VIDEO_DEBUG_BUFFERCOPY ! // And another two buffers for OpenGL to read out of. ! if (!(vid->bufPixelsCopy1 = (ARUint8 *)valloc(vid->bufSize * sizeof(ARUint8)))) exit (1); ! if (!(vid->bufPixelsCopy2 = (ARUint8 *)valloc(vid->bufSize * sizeof(ARUint8)))) exit (1); ! #endif // AR_VIDEO_DEBUG_BUFFERCOPY ! // Wrap a GWorld around the pixel buffer. err_s = QTNewGWorldFromPtr(&(vid->pGWorld), // returned GWorld pixFormat, // format of pixels --- 1453,1462 ---- vid->bufSize = vid->height * vid->rowBytes; if (!(vid->bufPixels = (ARUint8 *)valloc(vid->bufSize * sizeof(ARUint8)))) exit (1); ! if (vid->bufCopyFlag) { ! // And another two buffers for OpenGL to read out of. ! if (!(vid->bufPixelsCopy1 = (ARUint8 *)valloc(vid->bufSize * sizeof(ARUint8)))) exit (1); ! if (!(vid->bufPixelsCopy2 = (ARUint8 *)valloc(vid->bufSize * sizeof(ARUint8)))) exit (1); ! } ! // Wrap a GWorld around the pixel buffer. err_s = QTNewGWorldFromPtr(&(vid->pGWorld), // returned GWorld pixFormat, // format of pixels *************** *** 1519,1526 **** DisposeGWorld(vid->pGWorld); out5: ! #ifdef AR_VIDEO_DEBUG_BUFFERCOPY ! free(vid->bufPixelsCopy2); ! free(vid->bufPixelsCopy1); ! #endif // AR_VIDEO_DEBUG_BUFFERCOPY free(vid->bufPixels); if (vid->scaleMatrixPtr) free(vid->scaleMatrixPtr); --- 1526,1533 ---- DisposeGWorld(vid->pGWorld); out5: ! if (vid->bufCopyFlag) { ! free(vid->bufPixelsCopy2); ! free(vid->bufPixelsCopy1); ! } free(vid->bufPixels); if (vid->scaleMatrixPtr) free(vid->scaleMatrixPtr); *************** *** 1579,1592 **** } ! #ifdef AR_VIDEO_DEBUG_BUFFERCOPY ! if (vid->bufPixelsCopy2) { ! free(vid->bufPixelsCopy2); ! vid->bufPixelsCopy2 = NULL; ! } ! if (vid->bufPixelsCopy1) { ! free(vid->bufPixelsCopy1); ! vid->bufPixelsCopy1 = NULL; } - #endif // AR_VIDEO_DEBUG_BUFFERCOPY if (vid->bufPixels) { free(vid->bufPixels); --- 1586,1599 ---- } ! if (vid->bufCopyFlag) { ! if (vid->bufPixelsCopy2) { ! free(vid->bufPixelsCopy2); ! vid->bufPixelsCopy2 = NULL; ! } ! if (vid->bufPixelsCopy1) { ! free(vid->bufPixelsCopy1); ! vid->bufPixelsCopy1 = NULL; ! } } if (vid->bufPixels) { free(vid->bufPixels); *************** *** 1802,1818 **** // of problems and which can now be avoided after rewriting the // various bits of the toolkit to cope. ! #ifdef AR_VIDEO_DEBUG_BUFFERCOPY ! if (vid->status & AR_VIDEO_STATUS_BIT_BUFFER) { ! memcpy((void *)(vid->bufPixelsCopy2), (void *)(vid->bufPixels), vid->bufSize); ! pix = vid->bufPixelsCopy2; ! vid->status &= ~AR_VIDEO_STATUS_BIT_BUFFER; // Clear buffer bit. } else { ! memcpy((void *)(vid->bufPixelsCopy1), (void *)(vid->bufPixels), vid->bufSize); ! pix = vid->bufPixelsCopy1; ! vid->status |= AR_VIDEO_STATUS_BIT_BUFFER; // Set buffer bit. } - #else - pix = vid->bufPixels; - #endif // AR_VIDEO_DEBUG_BUFFERCOPY vid->status &= ~AR_VIDEO_STATUS_BIT_READY; // Clear ready bit. --- 1809,1825 ---- // of problems and which can now be avoided after rewriting the // various bits of the toolkit to cope. ! if (vid->bufCopyFlag) { ! if (vid->status & AR_VIDEO_STATUS_BIT_BUFFER) { ! memcpy((void *)(vid->bufPixelsCopy2), (void *)(vid->bufPixels), vid->bufSize); ! pix = vid->bufPixelsCopy2; ! vid->status &= ~AR_VIDEO_STATUS_BIT_BUFFER; // Clear buffer bit. ! } else { ! memcpy((void *)(vid->bufPixelsCopy1), (void *)(vid->bufPixels), vid->bufSize); ! pix = vid->bufPixelsCopy1; ! vid->status |= AR_VIDEO_STATUS_BIT_BUFFER; // Set buffer bit. ! } } else { ! pix = vid->bufPixels; } vid->status &= ~AR_VIDEO_STATUS_BIT_READY; // Clear ready bit. |
From: Philip L. <phi...@us...> - 2006-06-08 22:04:44
|
Update of /cvsroot/artoolkit/artoolkit/util/mk_patt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31818 Modified Files: mk_patt.c Log Message: Rewrite to use gsub_lite. Index: mk_patt.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/mk_patt/mk_patt.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mk_patt.c 5 Apr 2006 05:47:14 -0000 1.7 --- mk_patt.c 8 Jun 2006 22:04:40 -0000 1.8 *************** *** 39,46 **** # include <OpenGL/glext.h> #endif ! #include <AR/gsub.h> #include <AR/video.h> #include <AR/param.h> #include <AR/ar.h> // ============================================================================ --- 39,51 ---- # include <OpenGL/glext.h> #endif ! #include <AR/config.h> #include <AR/video.h> #include <AR/param.h> #include <AR/ar.h> + #include <AR/gsub_lite.h> + + // ============================================================================ + // Constants + // ============================================================================ // ============================================================================ *************** *** 72,232 **** #endif ! int xsize; ! int ysize; - ARUint8* image = NULL; - ARMarkerInfo* target = NULL; - ARParam param; - int thresh = 100; ! static void init(void); ! static void cleanup(void); ! static void keyEvent( unsigned char key, int x, int y); ! static void mouseEvent(int button, int state, int x, int y); ! static void mainLoop(void); ! static void img_copy( ARUint8 *src, ARUint8 *dst, int size ); ! int main(int argc, char *argv[]) { ! glutInit(&argc, argv); ! init(); ! ! arVideoCapStart(); ! argMainLoop( mouseEvent, keyEvent, mainLoop ); ! return (0); } ! ! static void init( void ) { ARParam wparam; char name1[256], name2[256]; printf("Enter camera parameter filename"); printf("(Data/camera_para.dat): "); ! if( fgets(name1, 256, stdin) == NULL ) exit(0); ! if( sscanf(name1, "%s", name2) != 1 ) { ! strcpy( name2, "Data/camera_para.dat"); } ! if( arParamLoad(name2, 1, &wparam) < 0 ) { printf("Parameter load error !!\n"); ! exit(0); } ! ! if( arVideoOpen(vconf) < 0 ) exit(0); ! if( arVideoInqSize(&xsize, &ysize) < 0 ) exit(0); ! arMalloc( image, ARUint8, xsize*ysize*AR_PIX_SIZE_DEFAULT ); ! printf("Image size (x,y) = (%d,%d)\n", xsize, ysize); ! ! arParamChangeSize( &wparam, xsize, ysize, ¶m ); ! arParamDisp( ¶m ); ! arInitCparam( ¶m ); ! ! argInit( ¶m, 1.0, 0, 0, 0, 0 ); ! argDrawMode2D(); } ! static void cleanup(void) { ! arVideoCapStop(); ! arVideoClose(); ! argCleanup(); } ! static void keyEvent( unsigned char key, int x, int y) { ! /* quit if the ESC key is pressed */ ! if( key == 0x1b ) { ! cleanup(); ! exit(0); ! } ! ! /* change the threshold value when 't' key pressed */ ! if( key == 't' ) { ! printf("Enter new threshold value (default = 100): "); ! scanf("%d",&thresh); while( getchar()!='\n' ); ! printf("\n"); } } ! static void mouseEvent(int button, int state, int x, int y) { char name1[256], name2[256]; ! ! if( button == GLUT_RIGHT_BUTTON && state == GLUT_DOWN ) { ! cleanup(); ! exit(0); ! } ! if( button == GLUT_MIDDLE_BUTTON && state == GLUT_DOWN ) { ! printf("Enter new threshold value (default = 100): "); ! scanf("%d",&thresh); while( getchar()!='\n' ); ! printf("\n"); ! } ! if( button == GLUT_LEFT_BUTTON && state == GLUT_DOWN && target != NULL ) { ! printf("Enter filename: "); ! if( fgets(name1, 256, stdin) == NULL ) return; ! if( sscanf(name1, "%s", name2) != 1 ) return; ! if( arSavePatt(image, target, name2) < 0 ) { ! printf("ERROR!!\n"); ! } ! else { ! printf(" Saved\n"); ! } ! } } ! static void mainLoop(void) { ! ARUint8 *dataPtr; ! ARMarkerInfo *marker_info; ! int marker_num; int areamax; int i; ! if( (dataPtr = (unsigned char *)arVideoGetImage()) == NULL ) { ! arUtilSleep(2); ! return; ! } ! img_copy( dataPtr, image, xsize*ysize*AR_PIX_SIZE_DEFAULT ); ! arVideoCapNext(); ! if( arDetectMarker(image, thresh, &marker_info, &marker_num) < 0 ) { ! cleanup(); ! exit(0); ! } ! areamax = 0; ! target = NULL; ! for( i = 0; i < marker_num; i++ ) { ! if( marker_info[i].area > areamax ) { ! areamax = marker_info[i].area; ! target = &(marker_info[i]); ! } ! } ! argDispImage( image, 0, 0 ); ! if( target != NULL ) { ! glLineWidth( 2.0 ); ! glColor3d( 0.0, 1.0, 0.0 ); ! argLineSeg( target->vertex[0][0], target->vertex[0][1], ! target->vertex[1][0], target->vertex[1][1], 0, 0 ); ! argLineSeg( target->vertex[3][0], target->vertex[3][1], ! target->vertex[0][0], target->vertex[0][1], 0, 0 ); ! glColor3d( 1.0, 0.0, 0.0 ); ! argLineSeg( target->vertex[1][0], target->vertex[1][1], ! target->vertex[2][0], target->vertex[2][1], 0, 0 ); ! argLineSeg( target->vertex[2][0], target->vertex[2][1], ! target->vertex[3][0], target->vertex[3][1], 0, 0 ); } ! argSwapBuffers(); ! ! return; } ! static void img_copy( ARUint8 *src, ARUint8 *dst, int size ) { ! while( (size--) > 0 ) *(dst++) = *(src++); } --- 77,397 ---- #endif + // Image acquisition. + static ARUint8 *gARTImage = NULL; + static ARUint8 *gARTsaveImage = NULL; ! // Marker detection. ! static int gARTThreshhold = 100; ! static ARMarkerInfo* gTarget = NULL; + // Drawing. + static ARParam gARTCparam; + static ARGL_CONTEXT_SETTINGS_REF gArglSettings = NULL; ! // ============================================================================ ! // Functions ! // ============================================================================ ! void lineSeg(double x1, double y1, double x2, double y2, ARGL_CONTEXT_SETTINGS_REF contextSettings, ARParam cparam, double zoom) { ! int enable; ! float ox, oy; ! double xx1, yy1, xx2, yy2; ! ! if (!contextSettings) return; ! arglDistortionCompensationGet(contextSettings, &enable); ! if (arglDrawModeGet(contextSettings) == AR_DRAW_BY_TEXTURE_MAPPING && enable) { ! xx1 = x1; yy1 = y1; ! xx2 = x2; yy2 = y2; ! } else { ! arParamIdeal2Observ(cparam.dist_factor, x1, y1, &xx1, &yy1); ! arParamIdeal2Observ(cparam.dist_factor, x2, y2, &xx2, &yy2); ! } ! ! xx1 *= zoom; yy1 *= zoom; ! xx2 *= zoom; yy2 *= zoom; ! ! ox = 0; ! oy = cparam.ysize - 1; ! glBegin(GL_LINES); ! glVertex2f(ox + xx1, oy - yy1); ! glVertex2f(ox + xx2, oy - yy2); ! glEnd(); ! glFlush(); } ! static int setupCamera(ARParam *cparam) { ARParam wparam; char name1[256], name2[256]; + int xsize, ysize; printf("Enter camera parameter filename"); printf("(Data/camera_para.dat): "); ! if (fgets(name1, 256, stdin) == NULL) exit(0); ! if (sscanf(name1, "%s", name2) != 1) { ! strcpy(name2, "Data/camera_para.dat"); } ! ! // Load the camera parameters. ! if (arParamLoad(name2, 1, &wparam) < 0 ) { printf("Parameter load error !!\n"); ! return (FALSE); } ! ! // Open the video path. ! if (arVideoOpen(vconf) < 0) { ! fprintf(stderr, "setupCamera(): 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); ! ! // Resize for the window and init. ! arParamChangeSize(&wparam, xsize, ysize, cparam); ! fprintf(stdout, "*** Camera Parameter ***\n"); ! arParamDisp(cparam); ! ! arInitCparam(cparam); ! ! if (arVideoCapStart() != 0) { ! fprintf(stderr, "setupCamera(): Unable to begin camera data capture.\n"); ! return (FALSE); ! } ! ! return (TRUE); } ! static void Quit(void) { ! free(gARTsaveImage); gARTsaveImage = NULL; ! arglCleanup(gArglSettings); ! arVideoCapStop(); ! arVideoClose(); ! exit(0); } ! static void Keyboard(unsigned char key, int x, int y) { ! switch (key) { ! case 0x1B: // Quit. ! case 'Q': ! case 'q': ! Quit(); ! break; ! case 'T': ! case 't': ! printf("Enter new threshold value (default = 100): "); ! scanf("%d", &gARTThreshhold); while (getchar()!='\n'); ! printf("\n"); ! break; ! case '?': ! case '/': ! printf("Keys:\n"); ! printf(" q or [esc] Quit demo.\n"); ! printf(" t Enter new binarization threshold value.\n"); ! printf(" ? or / Show this help.\n"); ! printf("\nAdditionally, the ARVideo library supplied the following help text:\n"); ! arVideoDispOption(); ! break; ! default: ! break; } } ! static void Mouse(int button, int state, int x, int y) { char name1[256], name2[256]; ! ! if (state == GLUT_DOWN) { ! if (button == GLUT_RIGHT_BUTTON) { ! Quit(); ! } else if (button == GLUT_MIDDLE_BUTTON) { ! printf("Enter new threshold value (default = 100): "); ! scanf("%d", &gARTThreshhold); while (getchar() != '\n'); ! printf("\n"); ! } else if (button == GLUT_LEFT_BUTTON && gARTsaveImage && gTarget) { ! printf("Enter filename: "); ! if (fgets(name1, 256, stdin) == NULL) return; ! if (sscanf(name1, "%s", name2) != 1 ) return; ! if (arSavePatt(gARTsaveImage, gTarget, name2) < 0) { ! printf("ERROR!!\n"); ! } else { ! printf(" Saved\n"); ! } ! } ! } } ! static void Idle(void) { ! static int ms_prev; ! int ms; ! float s_elapsed; ! ARUint8 *image; int areamax; + ARMarkerInfo *marker_info; // Pointer to array holding the details of detected markers. + int marker_num; // Count of number of markers detected. int i; + + // 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; + + if (arDetectMarker(gARTImage, gARTThreshhold, &marker_info, &marker_num) < 0) { + Quit(); + } + + areamax = 0; + gTarget = NULL; + for (i = 0; i < marker_num; i++) { + if (marker_info[i].area > areamax) { + areamax = marker_info[i].area; + gTarget = &(marker_info[i]); + } + } + memcpy(gARTsaveImage, gARTImage, gARTCparam.xsize * gARTCparam.ysize * AR_PIX_SIZE_DEFAULT); + + // Tell GLUT the display has changed. + glutPostRedisplay(); + } + } ! // ! // This function is called on events when the visibility of the ! // GLUT window changes (including when it first becomes visible). ! // ! static void Visibility(int visible) ! { ! if (visible == GLUT_VISIBLE) { ! glutIdleFunc(Idle); ! } else { ! glutIdleFunc(NULL); ! } ! } ! // ! // This function is called when the ! // GLUT window is resized. ! // ! static void Reshape(int w, int h) ! { ! glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ! glViewport(0, 0, (GLsizei) w, (GLsizei) h); ! ! glMatrixMode(GL_PROJECTION); ! glLoadIdentity(); ! glMatrixMode(GL_MODELVIEW); ! glLoadIdentity(); ! ! // Call through to anyone else who needs to know about window sizing here. ! } ! static void beginOrtho2D(int xsize, int ysize) { ! glMatrixMode(GL_PROJECTION); ! glPushMatrix(); ! glLoadIdentity(); ! gluOrtho2D(0.0, xsize, 0.0, ysize); ! glMatrixMode(GL_MODELVIEW); ! glPushMatrix(); ! glLoadIdentity(); ! } + static void endOrtho2D(void) { + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + } ! // ! // This function is called when the window needs redrawing. ! // ! static void Display(void) ! { ! // Select correct buffer for this context. ! glDrawBuffer(GL_BACK); ! glClear(GL_COLOR_BUFFER_BIT); // Clear the buffers for new frame. ! ! arglDispImage(gARTImage, &gARTCparam, 1.0, gArglSettings); // zoom = 1.0. ! arVideoCapNext(); ! gARTImage = NULL; // Image data is no longer valid after calling arVideoCapNext(). ! ! if (gTarget != NULL) { ! glDisable(GL_DEPTH_TEST); ! glDisable(GL_LIGHTING); ! glDisable(GL_TEXTURE_2D); ! beginOrtho2D(gARTCparam.xsize, gARTCparam.ysize); ! glLineWidth(2.0f); ! glColor3d(0.0, 1.0, 0.0); ! lineSeg(gTarget->vertex[0][0], gTarget->vertex[0][1], ! gTarget->vertex[1][0], gTarget->vertex[1][1], gArglSettings, gARTCparam, 1.0); ! lineSeg(gTarget->vertex[3][0], gTarget->vertex[3][1], ! gTarget->vertex[0][0], gTarget->vertex[0][1], gArglSettings, gARTCparam, 1.0); ! glColor3d(1.0, 0.0, 0.0); ! lineSeg(gTarget->vertex[1][0], gTarget->vertex[1][1], ! gTarget->vertex[2][0], gTarget->vertex[2][1], gArglSettings, gARTCparam, 1.0); ! lineSeg(gTarget->vertex[2][0], gTarget->vertex[2][1], ! gTarget->vertex[3][0], gTarget->vertex[3][1], gArglSettings, gARTCparam, 1.0); ! endOrtho2D(); } ! ! glutSwapBuffers(); } ! int main(int argc, char *argv[]) { ! // ---------------------------------------------------------------------------- ! // Library inits. ! // ! ! glutInit(&argc, argv); ! ! // ---------------------------------------------------------------------------- ! // Hardware setup. ! // ! ! if (!setupCamera(&gARTCparam)) { ! fprintf(stderr, "main(): Unable to set up AR camera.\n"); ! exit(-1); ! } ! ! // ---------------------------------------------------------------------------- ! // Library setup. ! // ! ! // Set up GL context(s) for OpenGL to draw into. ! glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); ! glutInitWindowSize(gARTCparam.xsize, gARTCparam.ysize); ! glutCreateWindow(argv[0]); ! ! // Setup argl library for current context. ! if ((gArglSettings = arglSetupForCurrentContext()) == NULL) { ! fprintf(stderr, "main(): arglSetupForCurrentContext() returned error.\n"); ! exit(-1); ! } ! ! arMalloc(gARTsaveImage, ARUint8, gARTCparam.xsize * gARTCparam.ysize * AR_PIX_SIZE_DEFAULT); ! ! // Register GLUT event-handling callbacks. ! // NB: Idle() is registered by Visibility. ! glutDisplayFunc(Display); ! glutReshapeFunc(Reshape); ! glutVisibilityFunc(Visibility); ! glutKeyboardFunc(Keyboard); ! glutMouseFunc(Mouse); ! ! glutMainLoop(); ! ! return (0); } + |
From: Philip L. <phi...@us...> - 2006-06-08 22:04:30
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/AR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31723 Modified Files: arDetectMarker.c Log Message: Comments. Index: arDetectMarker.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/AR/arDetectMarker.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** arDetectMarker.c 4 Nov 2004 08:51:16 -0000 1.1.1.1 --- arDetectMarker.c 8 Jun 2006 22:04:22 -0000 1.2 *************** *** 19,22 **** --- 19,23 ---- int i, j, k, x, y; + // Match supplied info against previously recognised marker. for( i = 0; i < wmarker_num; i++ ) { if( marker_info->area == marker_info2[i].area *************** *** 37,40 **** --- 38,42 ---- if( fp == NULL ) return -1; + // Write out in order AR_PATT_SIZE_X columns x AR_PATT_SIZE_Y rows x 3 colours x 4 orientations. for( i = 0; i < 4; i++ ) { for( j = 0; j < 3; j++ ) { |
From: Philip L. <phi...@us...> - 2006-06-08 21:36:58
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_camera2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17112 Modified Files: main.c Log Message: Update with beginOrtho2D() from mk_patt. Index: main.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_camera2/main.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main.c 21 Apr 2006 04:35:07 -0000 1.10 --- main.c 8 Jun 2006 21:36:52 -0000 1.11 *************** *** 532,540 **** } ! static void beginOrtho2D(void) { glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); ! gluOrtho2D(0.0, gXsize, 0.0, gYsize); glMatrixMode(GL_MODELVIEW); glPushMatrix(); --- 532,540 ---- } ! static void beginOrtho2D(int xsize, int ysize) { glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); ! gluOrtho2D(0.0, xsize, 0.0, ysize); glMatrixMode(GL_MODELVIEW); glPushMatrix(); *************** *** 561,565 **** glDisable(GL_LIGHTING); glDisable(GL_TEXTURE_2D); ! beginOrtho2D(); if (gStatus == 0) { --- 561,565 ---- glDisable(GL_LIGHTING); glDisable(GL_TEXTURE_2D); ! beginOrtho2D(gXsize, gYsize); if (gStatus == 0) { |
From: Philip L. <phi...@us...> - 2006-06-08 21:36:01
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoWin32DirectShow In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16534 Modified Files: videoWin32DirectShow.cpp Log Message: Add support for passing XML directly in config string. Index: videoWin32DirectShow.cpp =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoWin32DirectShow/videoWin32DirectShow.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** videoWin32DirectShow.cpp 22 May 2006 22:17:46 -0000 1.6 --- videoWin32DirectShow.cpp 8 Jun 2006 21:35:58 -0000 1.7 *************** *** 144,148 **** { AR2VideoParamT *vid = NULL; ! // Allocate the parameters structure and fill it in. arMalloc(vid, AR2VideoParamT, 1); --- 144,150 ---- { AR2VideoParamT *vid = NULL; ! char config_default[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><dsvl_input><camera show_format_dialog=\"true\" friendly_name=\"\"><pixel_format><RGB32 flip_h=\"false\" flip_v=\"true\"/></pixel_format></camera></dsvl_input>"; ! ! // Allocate the parameters structure and fill it in. arMalloc(vid, AR2VideoParamT, 1); *************** *** 152,157 **** vid->graphManager = new DSVL_VideoSource(); ! ! if(FAILED(vid->graphManager->BuildGraphFromXMLFile(config))) return(NULL); if(FAILED(vid->graphManager->EnableMemoryBuffer())) return(NULL); --- 154,166 ---- vid->graphManager = new DSVL_VideoSource(); ! if (!config) { ! if(FAILED(vid->graphManager->BuildGraphFromXMLString(config_default))) return(NULL); ! } else { ! if (strncmp(config, "<?xml", 5) == 0) { ! if(FAILED(vid->graphManager->BuildGraphFromXMLString(config))) return(NULL); ! } else { ! if(FAILED(vid->graphManager->BuildGraphFromXMLFile(config))) return(NULL); ! } ! } if(FAILED(vid->graphManager->EnableMemoryBuffer())) return(NULL); |
From: Philip L. <phi...@us...> - 2006-06-08 21:34:49
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/Gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15887 Modified Files: gsub_lite.c Log Message: Add better runtime checking of GL extensions, and support for MESA Y'CbCr format textures. Index: gsub_lite.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/Gl/gsub_lite.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** gsub_lite.c 22 May 2006 22:18:18 -0000 1.16 --- gsub_lite.c 8 Jun 2006 21:34:41 -0000 1.17 *************** *** 111,114 **** --- 111,119 ---- # define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 #endif + #ifndef GL_MESA_ycbcr_texture + # define GL_YCBCR_MESA 0x8757 + # define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA + # define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB + #endif //#define ARGL_DEBUG *************** *** 695,699 **** // Use default pixel format handed to us by <AR/config.h>. if (!arglPixelFormatSet(contextSettings, AR_DEFAULT_PIXEL_FORMAT)) { ! fprintf(stderr, "Unknown default pixel format defined in config.h.\n"); return (NULL); } --- 700,704 ---- // Use default pixel format handed to us by <AR/config.h>. if (!arglPixelFormatSet(contextSettings, AR_DEFAULT_PIXEL_FORMAT)) { ! fprintf(stderr, "Unknown or unsupported default pixel format defined in config.h.\n"); return (NULL); } *************** *** 847,870 **** break; case AR_PIXEL_FORMAT_ABGR: // SGI. ! contextSettings->pixIntFormat = GL_RGBA; ! contextSettings->pixFormat = GL_ABGR_EXT; ! contextSettings->pixType = GL_UNSIGNED_BYTE; ! contextSettings->pixSize = 4; break; case AR_PIXEL_FORMAT_BGRA: // Windows. ! contextSettings->pixIntFormat = GL_RGBA; ! contextSettings->pixFormat = GL_BGRA; ! contextSettings->pixType = GL_UNSIGNED_BYTE; ! contextSettings->pixSize = 4; break; case AR_PIXEL_FORMAT_ARGB: // Mac. ! contextSettings->pixIntFormat = GL_RGBA; ! contextSettings->pixFormat = GL_BGRA; #ifdef AR_BIG_ENDIAN ! contextSettings->pixType = GL_UNSIGNED_INT_8_8_8_8_REV; #else ! contextSettings->pixType = GL_UNSIGNED_INT_8_8_8_8; #endif ! contextSettings->pixSize = 4; break; case AR_PIXEL_FORMAT_RGB: --- 852,888 ---- break; case AR_PIXEL_FORMAT_ABGR: // SGI. ! if (arglGLCapabilityCheck(0, (unsigned char *)"GL_EXT_abgr")) { ! contextSettings->pixIntFormat = GL_RGBA; ! contextSettings->pixFormat = GL_ABGR_EXT; ! contextSettings->pixType = GL_UNSIGNED_BYTE; ! contextSettings->pixSize = 4; ! } else { ! return (FALSE); ! } break; case AR_PIXEL_FORMAT_BGRA: // Windows. ! if (arglGLCapabilityCheck(0x0120, (unsigned char *)"GL_EXT_bgra")) { ! contextSettings->pixIntFormat = GL_RGBA; ! contextSettings->pixFormat = GL_BGRA; ! contextSettings->pixType = GL_UNSIGNED_BYTE; ! contextSettings->pixSize = 4; ! } else { ! return (FALSE); ! } break; case AR_PIXEL_FORMAT_ARGB: // Mac. ! if (arglGLCapabilityCheck(0x0120, (unsigned char *)"GL_EXT_bgra") ! && arglGLCapabilityCheck(0x0120, (unsigned char *)"GL_APPLE_packed_pixels")) { ! contextSettings->pixIntFormat = GL_RGBA; ! contextSettings->pixFormat = GL_BGRA; #ifdef AR_BIG_ENDIAN ! contextSettings->pixType = GL_UNSIGNED_INT_8_8_8_8_REV; #else ! contextSettings->pixType = GL_UNSIGNED_INT_8_8_8_8; #endif ! contextSettings->pixSize = 4; ! } else { ! return (FALSE); ! } break; case AR_PIXEL_FORMAT_RGB: *************** *** 875,901 **** break; case AR_PIXEL_FORMAT_BGR: ! contextSettings->pixIntFormat = GL_RGB; ! contextSettings->pixFormat = GL_BGR; ! contextSettings->pixType = GL_UNSIGNED_BYTE; ! contextSettings->pixSize = 3; break; case AR_PIXEL_FORMAT_2vuy: ! contextSettings->pixIntFormat = GL_RGB; ! contextSettings->pixFormat = GL_YCBCR_422_APPLE; #ifdef AR_BIG_ENDIAN ! contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_REV_APPLE; #else ! contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_APPLE; #endif contextSettings->pixSize = 2; break; case AR_PIXEL_FORMAT_yuvs: ! contextSettings->pixIntFormat = GL_RGB; ! contextSettings->pixFormat = GL_YCBCR_422_APPLE; #ifdef AR_BIG_ENDIAN ! contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_APPLE; #else ! contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_REV_APPLE; #endif contextSettings->pixSize = 2; break; --- 893,947 ---- break; case AR_PIXEL_FORMAT_BGR: ! if (arglGLCapabilityCheck(0x0120, (unsigned char *)"GL_EXT_bgra")) { ! contextSettings->pixIntFormat = GL_RGB; ! contextSettings->pixFormat = GL_BGR; ! contextSettings->pixType = GL_UNSIGNED_BYTE; ! contextSettings->pixSize = 3; ! } else { ! return (FALSE); ! } break; case AR_PIXEL_FORMAT_2vuy: ! if (arglGLCapabilityCheck(0, (unsigned char *)"GL_APPLE_ycbcr_422")) { ! contextSettings->pixIntFormat = GL_RGB; ! contextSettings->pixFormat = GL_YCBCR_422_APPLE; #ifdef AR_BIG_ENDIAN ! contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_REV_APPLE; #else ! contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_APPLE; #endif + } else if (arglGLCapabilityCheck(0, (unsigned char *)"GL_MESA_ycbcr_texture")) { + contextSettings->pixIntFormat = GL_YCBCR_MESA; + contextSettings->pixFormat = GL_YCBCR_MESA; + #ifdef AR_BIG_ENDIAN + contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_REV_MESA; + #else + contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_MESA; + #endif + } else { + return (FALSE); + } contextSettings->pixSize = 2; break; case AR_PIXEL_FORMAT_yuvs: ! if (arglGLCapabilityCheck(0, (unsigned char *)"GL_APPLE_ycbcr_422")) { ! contextSettings->pixIntFormat = GL_RGB; ! contextSettings->pixFormat = GL_YCBCR_422_APPLE; #ifdef AR_BIG_ENDIAN ! contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_APPLE; #else ! contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_REV_APPLE; #endif + } else if (arglGLCapabilityCheck(0, (unsigned char *)"GL_MESA_ycbcr_texture")) { + contextSettings->pixIntFormat = GL_YCBCR_MESA; + contextSettings->pixFormat = GL_YCBCR_MESA; + #ifdef AR_BIG_ENDIAN + contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_MESA; + #else + contextSettings->pixType = GL_UNSIGNED_SHORT_8_8_REV_MESA; + #endif + } else { + return (FALSE); + } contextSettings->pixSize = 2; break; *************** *** 939,945 **** break; case GL_YCBCR_422_APPLE: #ifdef AR_BIG_ENDIAN ! if (contextSettings->pixType == GL_UNSIGNED_SHORT_8_8_REV_APPLE) *format = AR_PIXEL_FORMAT_2vuy; ! else if (contextSettings->pixType == GL_UNSIGNED_SHORT_8_8_APPLE) *format = AR_PIXEL_FORMAT_yuvs; #else if (contextSettings->pixType == GL_UNSIGNED_SHORT_8_8_APPLE) *format = AR_PIXEL_FORMAT_2vuy; --- 985,992 ---- break; case GL_YCBCR_422_APPLE: + case GL_YCBCR_MESA: #ifdef AR_BIG_ENDIAN ! if (contextSettings->pixType == GL_UNSIGNED_SHORT_8_8_REV_APPLE) *format = AR_PIXEL_FORMAT_2vuy; // N.B.: GL_UNSIGNED_SHORT_8_8_REV_APPLE = GL_UNSIGNED_SHORT_8_8_REV_MESA ! else if (contextSettings->pixType == GL_UNSIGNED_SHORT_8_8_APPLE) *format = AR_PIXEL_FORMAT_yuvs; // GL_UNSIGNED_SHORT_8_8_APPLE = GL_UNSIGNED_SHORT_8_8_MESA #else if (contextSettings->pixType == GL_UNSIGNED_SHORT_8_8_APPLE) *format = AR_PIXEL_FORMAT_2vuy; |