artoolkit-commits Mailing List for ARToolKit (Page 24)
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-03-14 02:08:11
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7257 Modified Files: README.txt Log Message: Amend for 2.70.1 release. Index: README.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/README.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** README.txt 13 Mar 2005 22:36:39 -0000 1.11 --- README.txt 14 Mar 2005 02:07:58 -0000 1.12 *************** *** 1,4 **** ! Read me for ARToolKit-2.70. ! =========================== --- 1,4 ---- ! Read me for ARToolKit-2.70.1. ! ============================= *************** *** 15,19 **** About this archive. ------------------- ! This archive contains the ARToolKit libraries, utilities and examples, version 2.70. 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.70.1. 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 ! 2004-12-02 --- 27,31 ---- HIT Lab NZ http://www.hitlabnz.org ! 2005-03-14 *************** *** 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.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} --- 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} *************** *** 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.tgz Configure and build 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 |
From: Philip L. <phi...@us...> - 2005-03-13 23:32:37
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30532 Modified Files: video.c Log Message: Support version 11 of libdc1394. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** video.c 22 Nov 2004 02:32:48 -0000 1.2 --- video.c 13 Mar 2005 23:32:25 -0000 1.3 *************** *** 13,16 **** --- 13,19 ---- * - Support for changing of various 1394 camera properties * + * Revision 1.1.1 Date: 2005/03/14 + * Patch by Henrik Erkkonen to support version 11 of libdc1394. + * */ *************** *** 38,41 **** --- 41,45 ---- #undef LIBDC_9 #undef LIBDC_10 + #undef LIBDC_11 #undef LIBDC_DEF *************** *** 46,50 **** // #define LIBDC_8 // #define LIBDC_9 ! #define LIBDC_10 /* ----------------------- MAKE ANY #define CHANGES HERE ONLY -------------------------------- */ --- 50,55 ---- // #define LIBDC_8 // #define LIBDC_9 ! // #define LIBDC_10 ! #define LIBDC_11 /* ----------------------- MAKE ANY #define CHANGES HERE ONLY -------------------------------- */ *************** *** 72,77 **** #endif #ifndef LIBDC_DEF ! #error One of the LIBDC_[8,9,10] macros must be defined to compile this code properly! #endif --- 77,87 ---- #endif + #ifdef LIBDC_11 + #warning Compiling using the 1.0.0 libDC library + #define LIBDC_DEF + #endif + #ifndef LIBDC_DEF ! #error One of the LIBDC_[8,9,10,11] macros must be defined to compile this code properly! #endif *************** *** 429,433 **** 0, /* do_extra_buffering */ #endif ! #ifndef LIBDC_8 1, video1394devname, /* drop_frames, dma_device_file */ #endif --- 439,443 ---- 0, /* do_extra_buffering */ #endif ! #if !defined(LIBDC_8) || defined(LIBDC_11) 1, video1394devname, /* drop_frames, dma_device_file */ #endif *************** *** 500,504 **** 0, /* do_extra_buffering */ #endif ! #ifndef LIBDC_8 1, video1394devname, /* drop_frames, dma_device_file */ #endif --- 510,514 ---- 0, /* do_extra_buffering */ #endif ! #if !defined(LIBDC_8) || defined(LIBDC_11) 1, video1394devname, /* drop_frames, dma_device_file */ #endif |
From: Philip L. <phi...@us...> - 2005-03-13 23:14:03
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26210 Modified Files: ARVideoSettingsController.m Log Message: Don't leak UserData records. Index: ARVideoSettingsController.m =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX/ARVideoSettingsController.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ARVideoSettingsController.m 10 Mar 2005 04:00:38 -0000 1.1 --- ARVideoSettingsController.m 13 Mar 2005 23:13:53 -0000 1.2 *************** *** 72,75 **** --- 72,76 ---- - (void)dealloc { + if (mUserData) DisposeUserData(mUserData); [super dealloc]; } |
From: Philip L. <phi...@us...> - 2005-03-13 22:36:51
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17702 Modified Files: README.txt Log Message: Support version 11 of libdc1394. Index: README.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/README.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** README.txt 10 Mar 2005 04:00:23 -0000 1.10 --- README.txt 13 Mar 2005 22:36:39 -0000 1.11 *************** *** 128,131 **** --- 128,132 ---- - Mac OS X video driver: support added for runtime specification of pixel format. - Mac OS X video driver: video input settings are now saved to and restored from preferences. + - Linux 1394cam video driver: Patch by Henrik Erkkonen to support version 11 of libdc1394. Changes in earlier releases. |
From: Philip L. <phi...@us...> - 2005-03-10 04:00:56
|
Update of /cvsroot/artoolkit/artoolkit/ARToolKit.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21485 Modified Files: project.pbxproj Log Message: Save and restore video input settings in Mac OS X. Index: project.pbxproj =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/ARToolKit.xcode/project.pbxproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** project.pbxproj 2 Dec 2004 02:52:49 -0000 1.9 --- project.pbxproj 10 Mar 2005 04:00:47 -0000 1.10 *************** *** 255,258 **** --- 255,260 ---- buildActionMask = 2147483647; files = ( + 4A83D84C07DFF8EA00A10282, + 4A83D84D07DFF8EA00A10282, 4A130A03075C26F900D62ACD, 4A130A04075C26F900D62ACD, *************** *** 496,499 **** --- 498,503 ---- buildActionMask = 2147483647; files = ( + 4A83D80007DFF72C00A10282, + 4A83D80107DFF72C00A10282, 4A1F9DEC0756897100DEC369, 4A1F9DED0756897100DEC369, *************** *** 604,608 **** dependencies = ( 4A1F9E0B07568A0100DEC369, - 4A1F9E0C07568A0100DEC369, 4A1F9E0D07568A0100DEC369, ); --- 608,611 ---- *************** *** 618,626 **** targetProxy = 4A5F9A4C064B4F0600525EC0; }; - 4A1F9E0C07568A0100DEC369 = { - isa = PBXTargetDependency; - target = 4A3F1305064A02100042B0D7; - targetProxy = 4A5F9A4E064B4F0600525EC0; - }; 4A1F9E0D07568A0100DEC369 = { isa = PBXTargetDependency; --- 621,624 ---- *************** *** 657,664 **** 4A1F9E1507568A0100DEC369, 4A1F9E1607568A0100DEC369, - 4A1F9E1707568A0100DEC369, 4A1F9E1807568A0100DEC369, 4A1F9E1907568A0100DEC369, - 4A1F9E1A07568A0100DEC369, ); isa = PBXFrameworksBuildPhase; --- 655,660 ---- *************** *** 689,698 **** }; }; - 4A1F9E1707568A0100DEC369 = { - fileRef = 4A3F14FE064A0C510042B0D7; - isa = PBXBuildFile; - settings = { - }; - }; 4A1F9E1807568A0100DEC369 = { fileRef = 4A427D120484329800B56093; --- 685,688 ---- *************** *** 707,716 **** }; }; - 4A1F9E1A07568A0100DEC369 = { - fileRef = 4A427D160484329800B56093; - isa = PBXBuildFile; - settings = { - }; - }; 4A1F9E1B07568A0100DEC369 = { explicitFileType = "compiled.mach-o.executable"; --- 697,700 ---- *************** *** 836,839 **** --- 820,825 ---- buildActionMask = 2147483647; files = ( + 4A83CEFA07DFE5F900A10282, + 4A83CEFB07DFE5F900A10282, 4A2244EC0659A2F40014DA8E, 4A2244ED0659A2F40014DA8E, *************** *** 945,948 **** --- 931,942 ---- sourceTree = "<group>"; }; + 4A307DCF07DD3E7B00613859 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = ARVideoSettingsController.m; + refType = 4; + sourceTree = "<group>"; + }; 4A3F11410649F7BA0042B0D7 = { buildActionMask = 2147483647; *************** *** 1288,1291 **** --- 1282,1286 ---- files = ( 4A3F130F064A02940042B0D7, + 4A83CED207DFE2D100A10282, ); isa = PBXSourcesBuildPhase; *************** *** 1685,1688 **** --- 1680,1685 ---- 4A3F1552064A0C7C0042B0D7 = { children = ( + 4A83CEF807DFE5F900A10282, + 4A83CEF907DFE5F900A10282, 4A130A19075C284C00D62ACD, 4A130A15075C27F900D62ACD, *************** *** 1730,1733 **** --- 1727,1732 ---- buildActionMask = 2147483647; files = ( + 4A83D0E607DFF61C00A10282, + 4A83D0E707DFF61C00A10282, 4A3F1631064A0DF20042B0D7, 4A3F1633064A0DF30042B0D7, *************** *** 3264,3267 **** --- 3263,3269 ---- 4A427D700484329900B56093 = { children = ( + 4AFEA85207DEB00000483D33, + 4AFEA7E407DE94E100483D33, + 4A307DCF07DD3E7B00613859, 4A427D720484329900B56093, 4A427D730484329900B56093, *************** *** 3469,3472 **** --- 3471,3476 ---- buildActionMask = 2147483647; files = ( + 4A83D7F607DFF69200A10282, + 4A83D7F707DFF69200A10282, 4A488BA50751CD0E003D46BE, 4A488BA60751CD0E003D46BE, *************** *** 3699,3702 **** --- 3703,3708 ---- buildActionMask = 2147483647; files = ( + 4A83D0E507DFF60D00A10282, + 4A83D0E407DFF60700A10282, 4A5BFD20075E7F1200E59760, 4A5BFD21075E7F1200E59760, *************** *** 3845,3848 **** --- 3851,3856 ---- buildActionMask = 2147483647; files = ( + 4A83D0EC07DFF64D00A10282, + 4A83D0ED07DFF64D00A10282, 4A5BFD40075E801000E59760, 4A5BFD41075E801000E59760, *************** *** 4000,4003 **** --- 4008,4013 ---- buildActionMask = 2147483647; files = ( + 4A83D0EE07DFF66300A10282, + 4A83D0EF07DFF66300A10282, 4A5BFD55075E801700E59760, 4A5BFD56075E801700E59760, *************** *** 4201,4204 **** --- 4211,4216 ---- buildActionMask = 2147483647; files = ( + 4A83D47207DFF67C00A10282, + 4A83D47307DFF67C00A10282, 4A5BFDAE075E835B00E59760, 4A5BFDAF075E835B00E59760, *************** *** 4360,4363 **** --- 4372,4377 ---- buildActionMask = 2147483647; files = ( + 4A83D0E007DFF5EB00A10282, + 4A83D0E107DFF5EB00A10282, 4A5BFDD6075E856100E59760, 4A5BFDD7075E856100E59760, *************** *** 4525,4528 **** --- 4539,4544 ---- buildActionMask = 2147483647; files = ( + 4A83D7FA07DFF6E200A10282, + 4A83D7FB07DFF6E200A10282, 4A5F9A62064B4F8400525EC0, 4A5F9A64064B4F8400525EC0, *************** *** 4665,4668 **** --- 4681,4686 ---- buildActionMask = 2147483647; files = ( + 4A83D7FC07DFF6F500A10282, + 4A83D7FD07DFF6F500A10282, 4A5F9B7C064B506700525EC0, 4A5F9B7E064B506700525EC0, *************** *** 4887,4890 **** --- 4905,4910 ---- buildActionMask = 2147483647; files = ( + 4A83D7F807DFF6AF00A10282, + 4A83D7F907DFF6AF00A10282, 4A5F9BE6064B51FB00525EC0, 4A5F9BE7064B51FB00525EC0, *************** *** 5025,5028 **** --- 5045,5050 ---- buildActionMask = 2147483647; files = ( + 4A83D0E807DFF62F00A10282, + 4A83D0E907DFF62F00A10282, 4A5F9C3F064B52E700525EC0, 4A5F9C40064B52E700525EC0, *************** *** 5166,5169 **** --- 5188,5193 ---- buildActionMask = 2147483647; files = ( + 4A83D0EA07DFF64400A10282, + 4A83D0EB07DFF64400A10282, 4A5F9C90064B538700525EC0, 4A5F9C91064B538700525EC0, *************** *** 5330,5333 **** --- 5354,5359 ---- buildActionMask = 2147483647; files = ( + 4A83D0E307DFF5FE00A10282, + 4A83D0E207DFF5F400A10282, 4A5F9D48064B54D800525EC0, 4A5F9D49064B54D800525EC0, *************** *** 5763,5766 **** --- 5789,6066 ---- targetProxy = 4A83567B074D96E600F58781; }; + 4A83CED207DFE2D100A10282 = { + fileRef = 4A307DCF07DD3E7B00613859; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83CEF807DFE5F900A10282 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = AppKit.framework; + path = /System/Library/Frameworks/AppKit.framework; + refType = 0; + sourceTree = "<absolute>"; + }; + 4A83CEF907DFE5F900A10282 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = Foundation.framework; + path = /System/Library/Frameworks/Foundation.framework; + refType = 0; + sourceTree = "<absolute>"; + }; + 4A83CEFA07DFE5F900A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83CEFB07DFE5F900A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E007DFF5EB00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E107DFF5EB00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E207DFF5F400A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E307DFF5FE00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E407DFF60700A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E507DFF60D00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E607DFF61C00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E707DFF61C00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E807DFF62F00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0E907DFF62F00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0EA07DFF64400A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0EB07DFF64400A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0EC07DFF64D00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0ED07DFF64D00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0EE07DFF66300A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D0EF07DFF66300A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D47207DFF67C00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D47307DFF67C00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7F607DFF69200A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7F707DFF69200A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7F807DFF6AF00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7F907DFF6AF00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7FA07DFF6E200A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7FB07DFF6E200A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7FC07DFF6F500A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7FD07DFF6F500A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7FE07DFF70700A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D7FF07DFF70700A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D80007DFF72C00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D80107DFF72C00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D83707DFF86500A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D83807DFF86500A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D83907DFF87700A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D83A07DFF87700A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D84807DFF88B00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D84907DFF88B00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D84A07DFF8A000A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D84B07DFF8A000A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D84C07DFF8EA00A10282 = { + fileRef = 4A83CEF807DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; + 4A83D84D07DFF8EA00A10282 = { + fileRef = 4A83CEF907DFE5F900A10282; + isa = PBXBuildFile; + settings = { + }; + }; 4A8486680728DD530063B1B3 = { buildPhases = ( *************** *** 6069,6072 **** --- 6369,6374 ---- buildActionMask = 2147483647; files = ( + 4A83D7FE07DFF70700A10282, + 4A83D7FF07DFF70700A10282, 4A94DD410756B1EB00D79CD1, 4A94DD420756B1EB00D79CD1, *************** *** 6517,6520 **** --- 6819,6824 ---- buildActionMask = 2147483647; files = ( + 4A83D83707DFF86500A10282, + 4A83D83807DFF86500A10282, 4AB9FDFE0651CB83003B9097, 4AB9FDFF0651CB83003B9097, *************** *** 6674,6677 **** --- 6978,6983 ---- buildActionMask = 2147483647; files = ( + 4A83D83907DFF87700A10282, + 4A83D83A07DFF87700A10282, 4AB9FE650651CC50003B9097, 4AB9FE660651CC50003B9097, *************** *** 6825,6828 **** --- 7131,7136 ---- buildActionMask = 2147483647; files = ( + 4A83D84807DFF88B00A10282, + 4A83D84907DFF88B00A10282, 4AB9FF080651CD1F003B9097, 4AB9FF090651CD1F003B9097, *************** *** 6974,6977 **** --- 7282,7287 ---- buildActionMask = 2147483647; files = ( + 4A83D84A07DFF8A000A10282, + 4A83D84B07DFF8A000A10282, 4AB9FF4F0651CD8D003B9097, 4AB9FF500651CD8D003B9097, *************** *** 8023,8026 **** --- 8333,8352 ---- targetProxy = 4AF54FDD069E5F8000E96B52; }; + 4AFEA7E407DE94E100483D33 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ARVideoSettingsController.h; + refType = 4; + sourceTree = "<group>"; + }; + 4AFEA85207DEB00000483D33 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = videoInternal.h; + refType = 4; + sourceTree = "<group>"; + }; }; rootObject = 08FB7793FE84155DC02AAC07; |
From: Philip L. <phi...@us...> - 2005-03-10 04:00:50
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21452 Modified Files: video.c Makefile.in Added Files: ARVideoSettingsController.m ARVideoSettingsController.h videoInternal.h Log Message: Save and restore video input settings in Mac OS X. Index: Makefile.in =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.in 4 Nov 2004 08:51:50 -0000 1.1.1.1 --- Makefile.in 10 Mar 2005 04:00:38 -0000 1.2 *************** *** 1,44 **** ! # ! # For instalation. Change this to your settings. ! # ! INC_DIR = ../../../include ! LIB_DIR = ../.. ! # ! # compiler ! # ! CC= cc ! CFLAG= @CFLAG@ -I$(INC_DIR) ! # ! # For making the library ! # ! AR= ar ! ARFLAGS= @ARFLAG@ ! RANLIB= @RANLIB@ ! # ! # products ! # ! LIB= ${LIB_DIR}/libARvideo.a ! INCLUDE= ${INC_DIR}/AR/video.h ! # ! # compilation control ! # ! LIBOBJS= ${LIB}(video.o) ! all: ${LIBOBJS} ! ${LIBOBJS}: ${INCLUDE} ! .c.a: ! ${CC} -c ${CFLAG} $< ! ${AR} ${ARFLAGS} $@ $*.o ! ${RANLIB} ! rm -f $*.o clean: ! rm -f *.o ! rm -f ${LIB} allclean: ! rm -f *.o ! rm -f ${LIB} ! rm -f Makefile --- 1,44 ---- ! UNAME = $(shell uname) ! AR_HOME = ../../.. ! CPPFLAGS = -I$(AR_HOME)/include ! CFLAGS = -fpascal-strings @CFLAG@ ! CXXFLAGS = @CFLAG@ ! LDFLAGS = -L$(AR_HOME)/lib @LDFLAG@ ! LIBS = @LIBS@ ! AR = ar ! ARFLAGS = @ARFLAG@ ! RANLIB = @RANLIB@ ! TARGET = $(AR_HOME)/lib/libARvideo.a ! ! HEADERS = \ ! $(AR_HOME)/include/AR/video.h \ ! videoInternal.h \ ! ARVideoSettingsController.h ! ! OBJS = \ ! video.o \ ! ARVideoSettingsController.o ! ! # Implicit rule, to compile Objective-C files with the .m suffix. ! %.o : %.m ! $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ ! ! default build all: $(TARGET) ! ! $(OBJS) : $(HEADERS) ! ! $(TARGET): $(OBJS) ! $(AR) ruv $@ $? ! $(RANLIB) $@ clean: ! -rm -f *.o *~ *.bak ! -rm $(TARGET) allclean: ! -rm -f *.o *~ *.bak ! -rm $(TARGET) ! -rm -f Makefile --- NEW FILE: ARVideoSettingsController.h --- /* * Copyright (c) 2005-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes * 1.0.0 2005-03-08 PRL Written. * */ /* * * This file is part of ARToolKit. * * ARToolKit is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ARToolKit is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ARToolKit; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #import <Cocoa/Cocoa.h> #import "videoInternal.h" @interface ARVideoSettingsController : NSObject { @private int inputIndex; SeqGrabComponent seqGrab; SGChannel sgchanVideo; int mVersion; UserData mUserData; } - (id)initInput:(int)inInputIndex withSeqGrabComponent:(SeqGrabComponent)inSeqGrab withSGChannel:(SGChannel)inSgchanVideo; - (void)dealloc; - (IBAction)sgConfigurationDialog:(id)sender; - (OSErr)loadUserData:(UserData *)outUserData fromDefaults:(NSUserDefaults *)inDefaults forKey:(NSString *)inKey; - (OSErr)saveUserData:(UserData)inUserData toDefaults:(NSUserDefaults *)inDefaults withKey:(NSString *)outKey; @end --- NEW FILE: videoInternal.h --- /* * Copyright (c) 2005-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes * 1.0.0 2005-03-08 PRL Written. * */ /* * * This file is part of ARToolKit. * * ARToolKit is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ARToolKit is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ARToolKit; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef __videoSettings_h__ #define __videoSettings_h__ #include <Carbon/Carbon.h> #include <QuickTime/QuickTime.h> #ifdef __cplusplus extern "C" { #endif OSStatus RequestSGSettings(const int inputIndex, SeqGrabComponent seqGrab, SGChannel sgchanVideo, const int showDialog); #ifdef __cplusplus } #endif #endif // __videoSettings_h__ Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX/video.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** video.c 4 Mar 2005 01:31:56 -0000 1.4 --- video.c 10 Mar 2005 04:00:38 -0000 1.5 *************** *** 8,12 **** */ /* ! * Copyright (c) 2003-2004 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes --- 8,12 ---- */ /* ! * Copyright (c) 2003-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes *************** *** 22,26 **** --- 22,28 ---- * 1.3.1 2004-12-07 PRL Added config option "-pixelformat=" to support pixel format * specification at runtime, with default determined at compile time. + * 1.4.0 2005-03-08 PRL Video input settings now saved and restored. * + * TODO: Check version of Quicktime available at runtime. */ /* *************** *** 82,85 **** --- 84,88 ---- #include <AR/ar.h> #include <AR/video.h> + #include "videoInternal.h" // ============================================================================ *************** *** 211,216 **** // initialize the default sequence grabber component ! if(err = SGInitialize(seqGrab)) ! { fprintf(stderr, "SGInitialize err=%ld\n", err); goto endFunc; --- 214,218 ---- // initialize the default sequence grabber component ! if(err = SGInitialize(seqGrab)) { fprintf(stderr, "SGInitialize err=%ld\n", err); goto endFunc; *************** *** 218,223 **** // This should be defaulted to the current port according to QT doco ! if (err = SGSetGWorld(seqGrab, GetWindowPort(pWindow), NULL)) ! { fprintf(stderr, "SGSetGWorld err=%ld\n", err); goto endFunc; --- 220,224 ---- // This should be defaulted to the current port according to QT doco ! if (err = SGSetGWorld(seqGrab, GetWindowPort(pWindow), NULL)) { fprintf(stderr, "SGSetGWorld err=%ld\n", err); goto endFunc; *************** *** 239,244 **** endFunc: ! if (err && (seqGrab != NULL)) ! { // clean up on failure CloseComponent(seqGrab); seqGrab = NULL; --- 240,244 ---- endFunc: ! if (err && (seqGrab != NULL)) { // clean up on failure CloseComponent(seqGrab); seqGrab = NULL; *************** *** 257,262 **** ComponentResult err = noErr; ! if (err = SGNewChannel(seqGrab, VideoMediaType, psgchanVideo)) ! { fprintf(stderr, "SGNewChannel err=%ld\n", err); goto endFunc; --- 257,261 ---- ComponentResult err = noErr; ! if (err = SGNewChannel(seqGrab, VideoMediaType, psgchanVideo)) { fprintf(stderr, "SGNewChannel err=%ld\n", err); goto endFunc; *************** *** 266,271 **** // set usage for new video channel to avoid playthrough // note we don't set seqGrabPlayDuringRecord ! if (err = SGSetChannelUsage(*psgchanVideo, flags | seqGrabRecord)) ! { fprintf(stderr, "SGSetChannelUsage err=%ld\n", err); goto endFunc; --- 265,269 ---- // set usage for new video channel to avoid playthrough // note we don't set seqGrabPlayDuringRecord ! if (err = SGSetChannelUsage(*psgchanVideo, flags | seqGrabRecord)) { fprintf(stderr, "SGSetChannelUsage err=%ld\n", err); goto endFunc; *************** *** 282,340 **** } - // From QT sample code - // Declaration of a typical application-defined function - static Boolean MySGModalFilterProc ( - DialogPtr theDialog, - const EventRecord *theEvent, - short *itemHit, - long refCon ) - { - // Ordinarily, if we had multiple windows we cared about, we'd handle - // updating them in here, but since we don't, we'll just clear out - // any update events meant for us - Boolean handled = false; - - if ((theEvent->what == updateEvt) && - ((WindowPtr) theEvent->message == (WindowPtr) refCon)) - { - BeginUpdate ((WindowPtr) refCon); - EndUpdate ((WindowPtr) refCon); - handled = true; - } - return (handled); - } - - static ComponentResult RequestSGSettings( SeqGrabComponent seqGrab, - SGChannel sgchanVideo ) - { - ComponentResult err; - - SGModalFilterUPP MySGModalFilterUPP; - if (!(MySGModalFilterUPP = NewSGModalFilterUPP (MySGModalFilterProc))) - { - fprintf(stderr, "NewSGModalFilterUPP error\n"); - err = -1L; // TODO appropriate error code - goto endFunc; - } - - // let the user configure and choose the device and settings - // "Due to a bug in all versions QuickTime 6.x for the function call "SGSettingsDialog()" - // when used with the "seqGrabSettingsPreviewOnly" parameter, all third party panels will - // be excluded." from http://www.outcastsoft.com/ASCDFG1394.html 15/03/04 - //if (err = SGSettingsDialog(seqGrab, sgchanVideo, 0, NULL, seqGrabSettingsPreviewOnly, MySGModalFilterUPP, 0)) - if (err = SGSettingsDialog(seqGrab, sgchanVideo, 0, NULL, 0, MySGModalFilterUPP, 0)) - { - fprintf(stderr, "SGSettingsDialog err=%ld\n", err); - goto endFunc; - } - - // Dispose of the UPP - if (MySGModalFilterUPP) - DisposeSGModalFilterUPP(MySGModalFilterUPP); - - endFunc: - return err; - } - static ComponentResult vdgGetSettings(VdigGrab* pVdg) { --- 280,283 ---- *************** *** 396,412 **** } ! static ComponentResult vdgRequestSettings(VdigGrab* pVdg, int showDialog) { ComponentResult err; // Use the SG Dialog to allow the user to select device and compression settings ! if (showDialog) { ! if (err = RequestSGSettings( pVdg->seqGrab, ! pVdg->sgchanVideo)) { ! fprintf(stderr, "RequestSGSettings err=%ld\n", err); ! goto endFunc; ! } ! } ! if (err = vdgGetSettings(pVdg)) { fprintf(stderr, "vdgGetSettings err=%ld\n", err); --- 339,352 ---- } ! static ComponentResult vdgRequestSettings(VdigGrab* pVdg, const int showDialog, const int inputIndex) { ComponentResult err; // Use the SG Dialog to allow the user to select device and compression settings ! if (err = RequestSGSettings(inputIndex, pVdg->seqGrab, pVdg->sgchanVideo, showDialog)) { ! fprintf(stderr, "RequestSGSettings err=%ld\n", err); ! goto endFunc; ! } ! if (err = vdgGetSettings(pVdg)) { fprintf(stderr, "vdgGetSettings err=%ld\n", err); *************** *** 421,429 **** { VideoDigitizerError err; ! Str255 vdName; UInt32 vdFlags; ! if (!pBuffSize) ! { fprintf(stderr, "vdgGetDeviceName: NULL pointer error\n"); err = (VideoDigitizerError)qtParamErr; --- 361,368 ---- { VideoDigitizerError err; ! Str255 vdName; // Pascal string (first byte is string length. UInt32 vdFlags; ! if (!pBuffSize) { fprintf(stderr, "vdgGetDeviceName: NULL pointer error\n"); err = (VideoDigitizerError)qtParamErr; *************** *** 433,438 **** if (err = VDGetDeviceNameAndFlags( pVdg->vdCompInst, vdName, ! &vdFlags)) ! { fprintf(stderr, "VDGetDeviceNameAndFlags err=%ld\n", err); *pBuffSize = 0; --- 372,376 ---- if (err = VDGetDeviceNameAndFlags( pVdg->vdCompInst, vdName, ! &vdFlags)) { fprintf(stderr, "VDGetDeviceNameAndFlags err=%ld\n", err); *pBuffSize = 0; *************** *** 440,445 **** } ! if (szName) ! { int copyLen = (*pBuffSize-1 < vdName[0] ? *pBuffSize-1 : vdName[0]); --- 378,382 ---- } ! if (szName) { int copyLen = (*pBuffSize-1 < vdName[0] ? *pBuffSize-1 : vdName[0]); *************** *** 448,453 **** *pBuffSize = copyLen + 1; ! } else ! { *pBuffSize = vdName[0] + 1; } --- 385,389 ---- *pBuffSize = copyLen + 1; ! } else { *pBuffSize = vdName[0] + 1; } *************** *** 1397,1401 **** } ! if (err = vdgRequestSettings(vid->pVdg, showDialog)) { fprintf(stderr, "vdgRequestSettings err=%ld\n", err); goto out2; --- 1333,1337 ---- } ! if (err = vdgRequestSettings(vid->pVdg, showDialog, gVidCount)) { fprintf(stderr, "vdgRequestSettings err=%ld\n", err); goto out2; --- NEW FILE: ARVideoSettingsController.m --- /* * Copyright (c) 2005-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved. * * Rev Date Who Changes * 1.0.0 2005-03-08 PRL Written. * */ /* * * This file is part of ARToolKit. * * ARToolKit is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ARToolKit is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ARToolKit; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #import "ARVideoSettingsController.h" @implementation ARVideoSettingsController - (id)initInput:(int)inInputIndex withSeqGrabComponent:(SeqGrabComponent)inSeqGrab withSGChannel:(SGChannel)inSgchanVideo { ComponentResult err; self = [super init]; // initialize NSApplication, using an entry point that is specific to bundles // this is a no-op for Cocoa apps, but is required by Carbon apps NSApplicationLoad(); inputIndex = inInputIndex; seqGrab = inSeqGrab; sgchanVideo = inSgchanVideo; // Grab the defaults. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; // Try to load the version key, used to see if we have any saved settings. mVersion = [defaults floatForKey:@"version"]; if (!mVersion) { // No previous defaults so define new. mVersion = 1; // Write out the defaults. [defaults setInteger:mVersion forKey:@"version"]; [defaults synchronize]; } // Load defaults, first time though mUserData may be 0 which is fine. [self loadUserData:&mUserData fromDefaults:defaults forKey:[NSString stringWithFormat:@"sgVideoSettings%03i", inputIndex]]; if (mUserData) { if ((err = SGSetChannelSettings(seqGrab, sgchanVideo, mUserData, 0)) != noErr) { fprintf(stderr, "-sgConfigurationDialog: error %ld in SGSetChannelSettings().\n", err); } } return self; } - (void)dealloc { [super dealloc]; } // NOTE: There is a know bug in QuickTime 6.4 in which the // Settings Dialog pops up in random locations...sigh... - (IBAction) sgConfigurationDialog:(id)sender { ComponentResult err; Component *PanelListPtr = NULL; long PanelCount; // Set up the settings panel list removing the "Compression" panel. ComponentDescription cDesc; Component c; long cCount; Component *cPtr; cDesc.componentType = SeqGrabPanelType; cDesc.componentSubType = VideoMediaType; cDesc.componentManufacturer = cDesc.componentFlags = cDesc.componentFlagsMask = 0L; cCount = CountComponents(&cDesc); if (cCount == 0) { fprintf(stderr, "-sgConfigurationDialog: error in CountComponents().\n"); goto bail; } PanelListPtr = (Component *)NewPtr(sizeof(Component) * (cCount + 1)); if (err = MemError() || NULL == PanelListPtr) { fprintf(stderr, "-sgConfigurationDialog: error in NewPtr().\n"); goto bail; } PanelCount = 0; cPtr = PanelListPtr; c = 0L; do { ComponentDescription compInfo; c = FindNextComponent(c, &cDesc); if (c) { Handle hName = NewHandle(0); if (err = MemError() || NULL == hName) { fprintf(stderr, "-sgConfigurationDialog: error in NewHandle().\n"); goto bail; } GetComponentInfo(c, &compInfo, hName, NULL, NULL); if (PLstrcmp(*hName, "\pCompression") != 0) { *cPtr++ = c; PanelCount++; } DisposeHandle(hName); } } while (c); // Bring up the dialog and if the user didn't cancel // save the new channel settings for later. err = SGSettingsDialog(seqGrab, sgchanVideo, PanelCount, PanelListPtr, 0, NULL, NULL); if (err == noErr) { // Dispose the old settings and get the new channel settings. if (mUserData) DisposeUserData(mUserData); if ((err = SGGetChannelSettings(seqGrab, sgchanVideo, &mUserData, 0)) != noErr) { fprintf(stderr, "-sgConfigurationDialog: error %ld in SGGetChannelSettings().\n", err); } // Grab the defaults. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; // Write the defaults. [self saveUserData:mUserData toDefaults:defaults withKey:[NSString stringWithFormat:@"sgVideoSettings%03i", inputIndex]]; [defaults synchronize]; } else if (err != userCanceledErr) { fprintf(stderr, "-sgConfigurationDialog: error %ld in SGSettingsDialog().\n", err); } bail: DisposePtr((Ptr)PanelListPtr); } // Get the Channel Settings as UserData from the preferences - (OSErr)loadUserData:(UserData *)outUserData fromDefaults:(NSUserDefaults *)inDefaults forKey:(NSString *)inKey { NSData *theSettings; Handle theHandle = NULL; UserData theUserData = NULL; OSErr err = paramErr; // read the new setttings from our preferences theSettings = [inDefaults objectForKey:inKey]; if (theSettings) { err = PtrToHand([theSettings bytes], &theHandle, [theSettings length]); if (theHandle) { err = NewUserDataFromHandle(theHandle, &theUserData); if (theUserData) { *outUserData = theUserData; } DisposeHandle(theHandle); } } return err; } // Save the Channel Settings from UserData in the preferences - (OSErr)saveUserData:(UserData)inUserData toDefaults:(NSUserDefaults *)inDefaults withKey:(NSString *)outKey { NSData *theSettings; Handle hSettings; OSErr err; if (NULL == inUserData) return paramErr; hSettings = NewHandle(0); err = MemError(); if (noErr == err) { err = PutUserDataIntoHandle(inUserData, hSettings); if (noErr == err) { HLock(hSettings); theSettings = [NSData dataWithBytes:(UInt8 *)*hSettings length:GetHandleSize(hSettings)]; // save the new setttings to our preferences if (theSettings) { [inDefaults setObject:theSettings forKey:outKey]; [inDefaults synchronize]; } } DisposeHandle(hSettings); } return err; } @end OSStatus RequestSGSettings(const int inputIndex, SeqGrabComponent seqGrab, SGChannel sgchanVideo, const int showDialog) { NSAutoreleasePool *localPool; ARVideoSettingsController *localController; // Sanity check. if (inputIndex < 0 || !seqGrab || !sgchanVideo) return (paramErr); // Calling Objective-C from C necessitates an autorelease pool. localPool = [[NSAutoreleasePool alloc] init]; localController = [[ARVideoSettingsController alloc] initInput:inputIndex withSeqGrabComponent:seqGrab withSGChannel:sgchanVideo]; if (showDialog) [localController sgConfigurationDialog:NULL]; [localController release]; [localPool release]; return (noErr); } |
From: Philip L. <phi...@us...> - 2005-03-10 04:00:39
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21400 Modified Files: Configure README.txt Log Message: Save and restore video input settings in Mac OS X. Index: Configure =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/Configure,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Configure 1 Dec 2004 04:55:01 -0000 1.4 --- Configure 10 Mar 2005 04:00:22 -0000 1.5 *************** *** 115,119 **** ARFLAG="-r" RANLIB="ranlib \$\@" ! LIBS="-framework Carbon -framework QuickTime -framework GLUT -framework OpenGL -lobjc" echo "Dose your Mac have fast texture mapping hardware? (y or n)" --- 115,119 ---- ARFLAG="-r" RANLIB="ranlib \$\@" ! LIBS="-framework Carbon -framework QuickTime -framework GLUT -framework OpenGL -framework AppKit -framework Foundation -lobjc" echo "Dose your Mac have fast texture mapping hardware? (y or n)" Index: README.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/README.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** README.txt 7 Dec 2004 04:46:54 -0000 1.9 --- README.txt 10 Mar 2005 04:00:23 -0000 1.10 *************** *** 127,130 **** --- 127,131 ---- ------------------------ - Mac OS X video driver: support added for runtime specification of pixel format. + - Mac OS X video driver: video input settings are now saved to and restored from preferences. Changes in earlier releases. |
From: Philip L. <phi...@us...> - 2005-03-10 03:59:26
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleLite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21095 Modified Files: Makefile.in Log Message: Spelling fix. Index: Makefile.in =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simpleLite/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.in 4 Nov 2004 08:51:08 -0000 1.1.1.1 --- Makefile.in 10 Mar 2005 03:59:17 -0000 1.2 *************** *** 8,12 **** OBJS = ! HEADDERS = all: $(BIN_DIR)/simpleLite --- 8,12 ---- OBJS = ! HEADERS = all: $(BIN_DIR)/simpleLite *************** *** 15,19 **** cc -o $(BIN_DIR)/simpleLite simpleLite.o $(OBJS) $(LDFLAG) $(LIBS) ! simpleLite.o: simpleLite.c $(HEADDERS) cc -c $(CFLAG) simpleLite.c --- 15,19 ---- cc -o $(BIN_DIR)/simpleLite simpleLite.o $(OBJS) $(LDFLAG) $(LIBS) ! simpleLite.o: simpleLite.c $(HEADERS) cc -c $(CFLAG) simpleLite.c |
From: Philip L. <phi...@us...> - 2005-03-10 03:58:50
|
Update of /cvsroot/artoolkit/artoolkit/util/graphicsTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20948 Modified Files: graphicsTest.c Log Message: No dependency on video.h required. Index: graphicsTest.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/graphicsTest/graphicsTest.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** graphicsTest.c 25 Nov 2004 22:45:10 -0000 1.2 --- graphicsTest.c 10 Mar 2005 03:58:40 -0000 1.3 *************** *** 12,16 **** #endif #include <AR/gsub.h> - #include <AR/video.h> #include <AR/param.h> #include <AR/ar.h> --- 12,15 ---- |
From: Philip L. <phi...@us...> - 2005-03-10 03:58:29
|
Update of /cvsroot/artoolkit/artoolkit/examples/twoView In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20876 Modified Files: twoView.c Log Message: Fix spelling, FPS counter. Index: twoView.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/twoView/twoView.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** twoView.c 18 Feb 2005 04:18:22 -0000 1.5 --- twoView.c 10 Mar 2005 03:58:16 -0000 1.6 *************** *** 228,232 **** // Open the video path. if ((gContextsActive[i].ARTVideo = ar2VideoOpen(vconfs[i])) == NULL) { ! fprintf(stderr, "demoARSetupCamera(): Unable to open connection to camera %d.\n", i + 1); return (FALSE); } --- 228,232 ---- // Open the video path. if ((gContextsActive[i].ARTVideo = ar2VideoOpen(vconfs[i])) == NULL) { ! fprintf(stderr, "demoARSetupCameras(): Unable to open connection to camera %d.\n", i + 1); return (FALSE); } *************** *** 234,242 **** // Find the size of the window. if (ar2VideoInqSize(gContextsActive[i].ARTVideo, &xsize, &ysize) < 0) return (FALSE); ! fprintf(stderr, "demoARSetupCamera(): Camera %d image size (x,y) = (%d,%d)\n", i + 1, xsize, ysize); // Load the camera parameters, resize for the window and init. if (arParamLoad(cparam_names[i], 1, &wparam) < 0) { ! fprintf(stderr, "demoARSetupCamera(): Error loading parameter file %s for camera %d.\n", cparam_names[i], i + 1); return (FALSE); } --- 234,242 ---- // Find the size of the window. if (ar2VideoInqSize(gContextsActive[i].ARTVideo, &xsize, &ysize) < 0) return (FALSE); ! fprintf(stderr, "demoARSetupCameras(): Camera %d image size (x,y) = (%d,%d)\n", i + 1, xsize, ysize); // Load the camera parameters, resize for the window and init. if (arParamLoad(cparam_names[i], 1, &wparam) < 0) { ! fprintf(stderr, "demoARSetupCameras(): Error loading parameter file %s for camera %d.\n", cparam_names[i], i + 1); return (FALSE); } *************** *** 248,252 **** // Start the video capture for this camera. if (ar2VideoCapStart(gContextsActive[i].ARTVideo) != 0) { ! fprintf(stderr, "demoARSetupCamera(): Unable to begin camera data capture for camera %d.\n", i + 1); return (FALSE); } --- 248,252 ---- // Start the video capture for this camera. if (ar2VideoCapStart(gContextsActive[i].ARTVideo) != 0) { ! fprintf(stderr, "demoARSetupCameras(): Unable to begin camera data capture for camera %d.\n", i + 1); return (FALSE); } *************** *** 353,356 **** --- 353,357 ---- } arUtilTimerReset(); + gCallCountGetImage = 0; demoARDebugReportMode(); break; *************** *** 479,483 **** &(gContextsActive[drawContextIndex].ARTCparam), 1.0, ! gContextsActive[drawContextIndex].arglSettings); // zoom = 1.0, contextIndex = 0. ar2VideoCapNext(gContextsActive[drawContextIndex].ARTVideo); --- 480,484 ---- &(gContextsActive[drawContextIndex].ARTCparam), 1.0, ! gContextsActive[drawContextIndex].arglSettings); // zoom = 1.0. ar2VideoCapNext(gContextsActive[drawContextIndex].ARTVideo); |
From: Philip L. <phi...@us...> - 2005-03-04 01:32:23
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23203 Modified Files: video.c Log Message: Guarantee page-aligned buffers, fix minor timing bug. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX/video.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** video.c 7 Dec 2004 04:46:37 -0000 1.3 --- video.c 4 Mar 2005 01:31:56 -0000 1.4 *************** *** 1059,1064 **** AR2VideoParamT *vid; int keepAlive = 1; ! struct timeval tv; // Seconds and microseconds since Jan 1, 1970. ! struct timespec ts; // Seconds and nanoseconds since Jan 1, 1970. ComponentResult err; int err_i; --- 1059,1064 ---- AR2VideoParamT *vid; int keepAlive = 1; ! struct timeval tv; // Seconds and microseconds since Jan 1, 1970. ! struct timespec ts; // Seconds and nanoseconds since Jan 1, 1970. ComponentResult err; int err_i; *************** *** 1099,1105 **** gettimeofday(&tv, NULL); ! ts.tv_sec = tv.tv_sec; // TODO: Also add overflow from value below. ts.tv_nsec = tv.tv_usec * 1000 + vid->milliSecPerTimer * 1E6; ! #ifndef AR_VIDEO_HAVE_THREADSAFE_QUICKTIME // Get a lock to access QuickTime (for SGIdle()), but only if more than one thread is running. --- 1099,1108 ---- gettimeofday(&tv, NULL); ! ts.tv_sec = tv.tv_sec; ts.tv_nsec = tv.tv_usec * 1000 + vid->milliSecPerTimer * 1E6; ! if (ts.tv_nsec >= 1E9) { ! ts.tv_nsec -= 1E9; ! ts.tv_sec += 1; ! } #ifndef AR_VIDEO_HAVE_THREADSAFE_QUICKTIME // Get a lock to access QuickTime (for SGIdle()), but only if more than one thread is running. *************** *** 1470,1478 **** vid->rowBytes = vid->width * bytesPerPixel; vid->bufSize = vid->height * vid->rowBytes; ! arMalloc(vid->bufPixels, ARUint8, vid->bufSize); #ifdef AR_VIDEO_DEBUG_BUFFERCOPY // And another two buffers for OpenGL to read out of. ! arMalloc(vid->bufPixelsCopy1, ARUint8, vid->bufSize); ! arMalloc(vid->bufPixelsCopy2, ARUint8, vid->bufSize); #endif // AR_VIDEO_DEBUG_BUFFERCOPY // Wrap a GWorld around the pixel buffer. --- 1473,1481 ---- vid->rowBytes = vid->width * bytesPerPixel; 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. |
From: Philip L. <phi...@us...> - 2005-02-18 04:19:09
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/Gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13031 Modified Files: gsub_lite.c Log Message: Revert to use of int rather than BOOL. Index: gsub_lite.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/Gl/gsub_lite.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gsub_lite.c 7 Nov 2004 23:42:20 -0000 1.2 --- gsub_lite.c 18 Feb 2005 04:18:51 -0000 1.3 *************** *** 15,18 **** --- 15,19 ---- * 2.7.4 2004-07-14 PRL Added gluCheckExtension hack for GLU versions pre-1.3. * 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. * */ *************** *** 137,149 **** struct _ARGL_CONTEXT_SETTINGS { ! BOOL textureRectangleCapabilitiesChecked; ! BOOL texturePow2CapabilitiesChecked; GLuint textureRectangle; GLuint texturePow2; GLuint listRectangle; GLuint listPow2; ! BOOL initedRectangle; int initedRectangleTexmapScaleFactor; ! BOOL initedPow2; int initedPow2TexmapScaleFactor; GLsizei texturePow2SizeX; --- 138,150 ---- struct _ARGL_CONTEXT_SETTINGS { ! int textureRectangleCapabilitiesChecked; ! int texturePow2CapabilitiesChecked; GLuint textureRectangle; GLuint texturePow2; GLuint listRectangle; GLuint listPow2; ! int initedRectangle; int initedRectangleTexmapScaleFactor; ! int initedPow2; int initedPow2TexmapScaleFactor; GLsizei texturePow2SizeX; *************** *** 160,174 **** int arglDrawMode = DEFAULT_DRAW_MODE; int arglTexmapMode = DEFAULT_DRAW_TEXTURE_IMAGE; ! BOOL arglTexRectangle = TRUE; // TRUE | FALSE . // These items relate to Apple's fast texture transfer support. //#define ARGL_USE_TEXTURE_RANGE // Commented out due to conflicts with GL_APPLE_ycbcr_422 extension. #if defined(__APPLE__) && defined(APPLE_TEXTURE_FAST_TRANSFER) ! BOOL arglAppleClientStorage = TRUE; // TRUE | FALSE . # ifdef ARGL_USE_TEXTURE_RANGE ! BOOL arglAppleTextureRange = TRUE; // TRUE | FALSE . GLuint arglAppleTextureRangeStorageHint = GL_STORAGE_SHARED_APPLE; // GL_STORAGE_PRIVATE_APPLE | GL_STORAGE_SHARED_APPLE | GL_STORAGE_CACHED_APPLE . # else ! BOOL arglAppleTextureRange = FALSE; // TRUE | FALSE . GLuint arglAppleTextureRangeStorageHint = GL_STORAGE_PRIVATE_APPLE; // GL_STORAGE_PRIVATE_APPLE | GL_STORAGE_SHARED_APPLE | GL_STORAGE_CACHED_APPLE . # endif // ARGL_USE_TEXTURE_RANGE --- 161,175 ---- int arglDrawMode = DEFAULT_DRAW_MODE; int arglTexmapMode = DEFAULT_DRAW_TEXTURE_IMAGE; ! int arglTexRectangle = TRUE; // TRUE | FALSE . // These items relate to Apple's fast texture transfer support. //#define ARGL_USE_TEXTURE_RANGE // Commented out due to conflicts with GL_APPLE_ycbcr_422 extension. #if defined(__APPLE__) && defined(APPLE_TEXTURE_FAST_TRANSFER) ! int arglAppleClientStorage = TRUE; // TRUE | FALSE . # ifdef ARGL_USE_TEXTURE_RANGE ! int arglAppleTextureRange = TRUE; // TRUE | FALSE . GLuint arglAppleTextureRangeStorageHint = GL_STORAGE_SHARED_APPLE; // GL_STORAGE_PRIVATE_APPLE | GL_STORAGE_SHARED_APPLE | GL_STORAGE_CACHED_APPLE . # else ! int arglAppleTextureRange = FALSE; // TRUE | FALSE . GLuint arglAppleTextureRangeStorageHint = GL_STORAGE_PRIVATE_APPLE; // GL_STORAGE_PRIVATE_APPLE | GL_STORAGE_SHARED_APPLE | GL_STORAGE_CACHED_APPLE . # endif // ARGL_USE_TEXTURE_RANGE *************** *** 280,284 **** // Returns: TRUE If either of the tests passes, or FALSE if both fail. // ! static BOOL arglGLCapabilityCheck(const unsigned short minVersion, const char *extension) { const GLubyte * strRenderer; --- 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; *************** *** 310,314 **** #ifdef AR_OPENGL_TEXTURE_RECTANGLE ! static BOOL arglDispImageTexRectangleCapabilitiesCheck(const ARParam *cparam, ARGL_CONTEXT_SETTINGS_REF contextSettings) { GLint textureRectangleSizeMax; --- 311,315 ---- #ifdef AR_OPENGL_TEXTURE_RECTANGLE ! static int arglDispImageTexRectangleCapabilitiesCheck(const ARParam *cparam, ARGL_CONTEXT_SETTINGS_REF contextSettings) { GLint textureRectangleSizeMax; *************** *** 461,465 **** #endif // AR_OPENGL_TEXTURE_RECTANGLE ! static BOOL arglDispImageTexPow2CapabilitiesCheck(const ARParam *cparam, ARGL_CONTEXT_SETTINGS_REF contextSettings) { GLint format; --- 462,466 ---- #endif // AR_OPENGL_TEXTURE_RECTANGLE ! static int arglDispImageTexPow2CapabilitiesCheck(const ARParam *cparam, ARGL_CONTEXT_SETTINGS_REF contextSettings) { GLint format; |
From: Philip L. <phi...@us...> - 2005-02-18 04:19:01
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleLite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13003 Modified Files: simpleLite.c Log Message: Revert to use of int rather than BOOL. Index: simpleLite.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simpleLite/simpleLite.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** simpleLite.c 1 Dec 2004 20:51:03 -0000 1.3 --- simpleLite.c 18 Feb 2005 04:18:43 -0000 1.4 *************** *** 66,70 **** // Preferences. ! static BOOL prefWindowed = TRUE; static int prefWidth = 640; // Fullscreen mode width. static int prefHeight = 480; // Fullscreen mode height. --- 66,70 ---- // Preferences. ! static int prefWindowed = TRUE; static int prefWidth = 640; // Fullscreen mode width. static int prefHeight = 480; // Fullscreen mode height. *************** *** 82,90 **** static ARUint8 *gARTImage = NULL; static double gPatt_trans[3][4]; ! static BOOL gPatt_found; static ARGL_CONTEXT_SETTINGS_REF gArglSettings = NULL; // Other globals. ! static BOOL gDrawRotate = FALSE; static float gDrawRotateAngle = 0; // For use in drawing. --- 82,90 ---- 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; static float gDrawRotateAngle = 0; // For use in drawing. *************** *** 148,152 **** // Sets up gARTCparam. ! static BOOL demoARSetupCamera(const unsigned char *cparam_name, char *vconf) { ARParam wparam; --- 148,152 ---- // Sets up gARTCparam. ! static int demoARSetupCamera(const unsigned char *cparam_name, char *vconf) { ARParam wparam; *************** *** 181,185 **** } ! static BOOL demoARSetupMarker(const unsigned char *patt_name, int *patt_id) { --- 181,185 ---- } ! static int demoARSetupMarker(const unsigned char *patt_name, int *patt_id) { |
From: Philip L. <phi...@us...> - 2005-02-18 04:18:45
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12961 Modified Files: gsub_lite.h Log Message: Revert to use of int rather than BOOL. Index: gsub_lite.h =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/gsub_lite.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gsub_lite.h 4 Nov 2004 08:51:14 -0000 1.1.1.1 --- gsub_lite.h 18 Feb 2005 04:18:36 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- * 2.7.4 2004-07-14 PRL Added gluCheckExtension hack for GLU versions pre-1.3. * 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. * */ *************** *** 110,117 **** // Keep code nicely typed. - #if !defined(_WINDEF_H) && !defined(XFree86Server) && !defined(BOOL_DEFINED) - typedef int BOOL; - # define BOOL_DEFINED - #endif #ifndef TRUE # define TRUE 1 --- 111,114 ---- *************** *** 208,216 **** @availability First appeared in ARToolKit 2.68. */ ! extern BOOL arglTexRectangle; #if defined(__APPLE__) && defined(APPLE_TEXTURE_FAST_TRANSFER) ! extern BOOL arglAppleClientStorage; ! extern BOOL arglAppleTextureRange; extern GLuint arglAppleTextureRangeStorageHint; #endif // __APPLE__ && APPLE_TEXTURE_FAST_TRANSFER --- 205,213 ---- @availability First appeared in ARToolKit 2.68. */ ! extern int arglTexRectangle; #if defined(__APPLE__) && defined(APPLE_TEXTURE_FAST_TRANSFER) ! extern int arglAppleClientStorage; ! extern int arglAppleTextureRange; extern GLuint arglAppleTextureRangeStorageHint; #endif // __APPLE__ && APPLE_TEXTURE_FAST_TRANSFER |
From: Philip L. <phi...@us...> - 2005-02-18 04:18:39
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleVRML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12921 Modified Files: simpleVRML.c Log Message: Revert to use of int rather than BOOL. Index: simpleVRML.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simpleVRML/simpleVRML.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** simpleVRML.c 1 Dec 2004 20:50:56 -0000 1.2 --- simpleVRML.c 18 Feb 2005 04:18:30 -0000 1.3 *************** *** 79,83 **** // Preferences. ! static BOOL prefWindowed = TRUE; static int prefWidth = 640; // Fullscreen mode width. static int prefHeight = 480; // Fullscreen mode height. --- 79,83 ---- // Preferences. ! static int prefWindowed = TRUE; static int prefWidth = 640; // Fullscreen mode width. static int prefHeight = 480; // Fullscreen mode height. *************** *** 90,94 **** static ARParam gARTCparam; static ARUint8 *gARTImage = NULL; ! static BOOL gPatt_found; static ARGL_CONTEXT_SETTINGS_REF gArglSettings = NULL; --- 90,94 ---- static ARParam gARTCparam; static ARUint8 *gARTImage = NULL; ! static int gPatt_found; static ARGL_CONTEXT_SETTINGS_REF gArglSettings = NULL; *************** *** 103,107 **** // Sets up gARTCparam. ! static BOOL demoARSetupCamera(const char *cparam_name, char *vconf) { ARParam wparam; --- 103,107 ---- // Sets up gARTCparam. ! static int demoARSetupCamera(const char *cparam_name, char *vconf) { ARParam wparam; *************** *** 136,140 **** } ! static BOOL demoARSetupMarkersObjects(void) { // Load in the object data - trained markers and associated bitmap files. --- 136,140 ---- } ! static int demoARSetupMarkersObjects(void) { // Load in the object data - trained markers and associated bitmap files. |
From: Philip L. <phi...@us...> - 2005-02-18 04:18:34
|
Update of /cvsroot/artoolkit/artoolkit/examples/twoView In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12875 Modified Files: twoView.c Log Message: Revert to use of int rather than BOOL. Index: twoView.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/twoView/twoView.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** twoView.c 1 Dec 2004 20:20:05 -0000 1.4 --- twoView.c 18 Feb 2005 04:18:22 -0000 1.5 *************** *** 73,77 **** long callCountMarkerDetect; // Frames received. double patt_trans[3][4]; // Marker transformation. ! BOOL patt_found; // Whether marker transformation is valid. ARGL_CONTEXT_SETTINGS_REF arglSettings; // Settings from ARGL. } CONTEXT_INFO; --- 73,77 ---- long callCountMarkerDetect; // Frames received. double patt_trans[3][4]; // Marker transformation. ! int patt_found; // Whether marker transformation is valid. ARGL_CONTEXT_SETTINGS_REF arglSettings; // Settings from ARGL. } CONTEXT_INFO; *************** *** 94,98 **** // Other globals. ! static BOOL gDrawRotate = FALSE; static float gDrawRotateAngle = 0; // For use in drawing. --- 94,98 ---- // Other globals. ! static int gDrawRotate = FALSE; static float gDrawRotateAngle = 0; // For use in drawing. *************** *** 101,105 **** // ============================================================================ ! static BOOL DrawCubeInit(int contextsActiveCountMax) { // Allocate room for display lists for all contexts. --- 101,105 ---- // ============================================================================ ! static int DrawCubeInit(int contextsActiveCountMax) { // Allocate room for display lists for all contexts. *************** *** 112,116 **** } ! static BOOL DrawCubeSetup(int contextIndex) { // Colour cube data. --- 112,116 ---- } ! static int DrawCubeSetup(int contextIndex) { // Colour cube data. *************** *** 169,173 **** } ! static BOOL DrawCubeCleanup(int contextIndex) { if (contextIndex >= gContextsActiveCount) return (FALSE); // Sanity check. --- 169,173 ---- } ! static int DrawCubeCleanup(int contextIndex) { if (contextIndex >= gContextsActiveCount) return (FALSE); // Sanity check. *************** *** 182,186 **** } ! static BOOL DrawCubeFinal(void) { if (!gDrawListBox) { --- 182,186 ---- } ! static int DrawCubeFinal(void) { if (!gDrawListBox) { *************** *** 218,222 **** // Sets up fields ARTVideo, ARTCparam of gContextsActive[0] through gContextsActive[cameraCount - 1]. ! static BOOL demoARSetupCameras(const int cameraCount, const unsigned char *cparam_names[], char *vconfs[]) { int i; --- 218,222 ---- // 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; *************** *** 256,260 **** } ! static BOOL demoARSetupMarker(const unsigned char *patt_name, int *patt_id) { --- 256,260 ---- } ! static int demoARSetupMarker(const unsigned char *patt_name, int *patt_id) { |
From: Philip L. <phi...@us...> - 2004-12-07 04:47:18
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23883 Modified Files: ChangeLog.txt README.txt Log Message: Mac OS X video driver: support added for runtime specification of pixel format. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/ChangeLog.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog.txt 22 Nov 2004 18:48:10 -0000 1.1 --- ChangeLog.txt 7 Dec 2004 04:46:53 -0000 1.2 *************** *** 2,5 **** --- 2,20 ---- ==================== + Changes in version 2.70 (2004-12-02). + ------------------------------------- + - Added libARvrml and simpleVRML example. + - Turn off texturing in gsub/gsub_lite when argDrawMode/arglDrawmode is AR_DRAW_BY_GL_DRAW_PIXELS. + - Added examples loadMultiple, demonstrating basic usage. + - Added examples rangeTest, collideTest, paddleTest, paddleDemo, paddleInteractionTest, demonstrating interaction techniques. + - Added example twoView, demonstrating input, processing and output from two (or more) cameras. + - Added utilities graphicsTest and videoTest, for testing graphics and video without marker recognition. + - VideoLinuxV4L patch by Uwe Woessner for YUV support (at last!) + - VideoLinuxV4L patches by Raphael Grasset for improved camera parameter control and compressed jpeg video stream to support Sony Eyetoy camera. + - VideoLinux1394Cam patch by Wayne Piekarski for improved lib1394 support, including multiple lib1394 versions. + - Preliminary API documentation by Raphael Grasset. + - Default DEFAULT_DRAW_MODE changed to AR_DRAW_BY_TEXTURE_MAPPING on Windows. + + Changes in version 2.69 (2004-11-04). ------------------------------------- Index: README.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/README.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** README.txt 2 Dec 2004 07:30:09 -0000 1.8 --- README.txt 7 Dec 2004 04:46:54 -0000 1.9 *************** *** 126,141 **** Changes in this release. ------------------------ ! - Added libARvrml and simpleVRML example. ! - Turn off texturing in gsub/gsub_lite when argDrawMode/arglDrawmode is AR_DRAW_BY_GL_DRAW_PIXELS. ! - Added examples loadMultiple, demonstrating basic usage. ! - Added examples rangeTest, collideTest, paddleTest, paddleDemo, paddleInteractionTest, demonstrating interaction techniques. ! - Added example twoView, demonstrating input, processing and output from two (or more) cameras. ! - Added utilities graphicsTest and videoTest, for testing graphics and video without marker recognition. ! - VideoLinuxV4L patch by Uwe Woessner for YUV support (at last!) ! - VideoLinuxV4L patches by Raphael Grasset for improved camera parameter control and compressed jpeg video stream to support Sony Eyetoy camera. ! - VideoLinux1394Cam patch by Wayne Piekarski for improved lib1394 support, including multiple lib1394 versions. ! - Preliminary API documentation by Raphael Grasset. ! - Default DEFAULT_DRAW_MODE changed to AR_DRAW_BY_TEXTURE_MAPPING on Windows. ! Changes in earlier releases. --- 126,130 ---- Changes in this release. ------------------------ ! - Mac OS X video driver: support added for runtime specification of pixel format. Changes in earlier releases. |
From: Philip L. <phi...@us...> - 2004-12-07 04:46:50
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23835 Modified Files: video.c Log Message: Mac OS X video driver: support added for runtime specification of pixel format. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoMacOSX/video.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** video.c 17 Nov 2004 21:34:36 -0000 1.2 --- video.c 7 Dec 2004 04:46:37 -0000 1.3 *************** *** 20,23 **** --- 20,25 ---- * 1.2.1 2004-06-28 PRL Support for 2vuy and yuvs pixel formats. * 1.3.0 2004-07-13 PRL Code from Daniel Heckenberg to directly access vDig. + * 1.3.1 2004-12-07 PRL Added config option "-pixelformat=" to support pixel format + * specification at runtime, with default determined at compile time. * */ *************** *** 1196,1211 **** int ar2VideoDispOption(void) { printf("ARVideo may be configured using one or more of the following options,\n"); printf("separated by a space:\n\n"); printf(" -nodialog\n"); ! printf(" don't display video settings dialog.\n"); printf(" -width=w\n"); ! printf(" scale camera native image to width w.\n"); printf(" -height=h\n"); ! printf(" scale camera native image to height w.\n"); printf(" -fps\n"); ! printf(" overlay camera frame counter on image.\n"); printf(" -grabber=n\n"); ! printf(" with multiple video grabbers available, use grabber n, default 1.\n"); printf("\n"); --- 1198,1225 ---- int ar2VideoDispOption(void) { + // 0 1 2 3 4 5 6 7 + // 0123456789012345678901234567890123456789012345678901234567890123456789012 printf("ARVideo may be configured using one or more of the following options,\n"); printf("separated by a space:\n\n"); printf(" -nodialog\n"); ! printf(" Don't display video settings dialog.\n"); printf(" -width=w\n"); ! printf(" Scale camera native image to width w.\n"); printf(" -height=h\n"); ! printf(" Scale camera native image to height h.\n"); printf(" -fps\n"); ! printf(" Overlay camera frame counter on image.\n"); printf(" -grabber=n\n"); ! printf(" With multiple QuickTime video grabber components installed,\n"); ! printf(" use component n (default n=1).\n"); ! printf(" N.B. It is NOT necessary to use this option if you have installed\n"); ! printf(" more than one video input device (e.g. two cameras) as the default\n"); ! printf(" QuickTime grabber can manage multiple video channels.\n"); ! printf(" -pixelformat=cccc\n"); ! printf(" Return images with pixels in format cccc, where cccc is either a\n"); ! printf(" numeric pixel format number or a valid 4-character-code for a\n"); ! printf(" pixel format. The following values are supported: \n"); ! printf(" 32, BGRA, RGBA, ABGR, 24, 24BG, 2vuy, yuvs.\n"); ! printf(" (See definitions in <QuickDraw.h> and QuickTime API reference IV-2862.)\n"); printf("\n"); *************** *** 1230,1234 **** int weLocked = 0; #endif // !AR_VIDEO_HAVE_THREADSAFE_QUICKTIME ! OSType pixFormat; CGrafPtr theSavedPort; GDHandle theSavedDevice; --- 1244,1249 ---- int weLocked = 0; #endif // !AR_VIDEO_HAVE_THREADSAFE_QUICKTIME ! OSType pixFormat = (OSType)0; ! long bytesPerPixel; CGrafPtr theSavedPort; GDHandle theSavedDevice; *************** *** 1260,1263 **** --- 1275,1287 ---- return (NULL); } + } else if (strncmp(a, "-pixelformat=", 13) == 0) { + sscanf(a, "%s", line); + if (sscanf(&line[13], "%c%c%c%c", (char *)&pixFormat, ((char *)&pixFormat) + 1, + ((char *)&pixFormat) + 2, ((char *)&pixFormat) + 3) < 4) { // Try 4-cc first. + if (sscanf(&line[13], "%li", (long *)&pixFormat) < 1) { // Fall back to integer. + ar2VideoDispOption(); + return (NULL); + } + } } else if (strncmp(a, "-fps", 4) == 0) { showFPS = 1; *************** *** 1270,1276 **** while (*a != ' ' && *a != '\t' && *a != '\0') a++; // Skip non-whitespace. ! } ! } ! // Once only, initialize for Carbon. if(initF == 0) { --- 1294,1344 ---- while (*a != ' ' && *a != '\t' && *a != '\0') a++; // Skip non-whitespace. ! } ! } ! // If no pixel format was specified in command-line options, ! // assign the one specified at compile-time as the default. ! if (!pixFormat) { ! #if defined(AR_PIX_FORMAT_2vuy) ! pixFormat = k2vuyPixelFormat; // k422YpCbCr8CodecType, k422YpCbCr8PixelFormat ! #elif defined(AR_PIX_FORMAT_yuvs) ! pixFormat = kYUVSPixelFormat; // kComponentVideoUnsigned ! #elif defined(AR_PIX_FORMAT_RGB) ! pixFormat = k24RGBPixelFormat; ! #elif defined(AR_PIX_FORMAT_BGR) ! pixFormat = k24BGRPixelFormat; ! #elif defined(AR_PIX_FORMAT_ARGB) ! pixFormat = k32ARGBPixelFormat; ! #elif defined(AR_PIX_FORMAT_RGBA) ! pixFormat = k32RGBAPixelFormat; ! #elif defined(AR_PIX_FORMAT_ABGR) ! pixFormat = k32ABGRPixelFormat; ! #elif defined(AR_PIX_FORMAT_BGRA) ! pixFormat = k32BGRAPixelFormat; ! #else ! # error Unsupported default pixel format specified in config.h. ! #endif ! } ! ! switch (pixFormat) { ! case k2vuyPixelFormat: ! case kYUVSPixelFormat: ! bytesPerPixel = 2l; ! break; ! case k24RGBPixelFormat: ! case k24BGRPixelFormat: ! bytesPerPixel = 3l; ! break; ! case k32ARGBPixelFormat: ! case k32BGRAPixelFormat: ! case k32ABGRPixelFormat: ! case k32RGBAPixelFormat: ! bytesPerPixel = 4l; ! break; ! default: ! fprintf(stderr, "ar2VideoOpen(): Unsupported pixel format requested.\n"); ! return(NULL); ! break; ! } ! // Once only, initialize for Carbon. if(initF == 0) { *************** *** 1318,1323 **** vid->frameCount = 0; //vid->lastTime = 0; ! //vid->timeScale = 0; ! vid->grabber = grabber; if(!(vid->pVdg = vdgAllocAndInit(grabber))) { --- 1386,1391 ---- vid->frameCount = 0; //vid->lastTime = 0; ! //vid->timeScale = 0; ! vid->grabber = grabber; if(!(vid->pVdg = vdgAllocAndInit(grabber))) { *************** *** 1379,1384 **** ((*vid->vdImageDesc)->width), ((*vid->vdImageDesc)->height)); ! // If a particular size was requested, set our window size based on the request, ! // otherwise set our window size based on the video size. vid->width = (width ? width : (int)((*vid->vdImageDesc)->width)); vid->height = (height ? height : (int)((*vid->vdImageDesc)->height)); --- 1447,1452 ---- ((*vid->vdImageDesc)->width), ((*vid->vdImageDesc)->height)); ! // If a particular size was requested, set the size of the GWorld to ! // the request, otherwise set it to the size of the incoming video. vid->width = (width ? width : (int)((*vid->vdImageDesc)->width)); vid->height = (height ? height : (int)((*vid->vdImageDesc)->height)); *************** *** 1398,1413 **** // Allocate buffer for the grabber to write pixel data into, and use // QTNewGWorldFromPtr() to wrap an offscreen GWorld structure around ! // it. We do this rather than using QTNewGWorld() to do the equivalent // to guarantee that we don't get padding bytes at the end of rows. ! #if defined(AR_PIX_FORMAT_ARGB) ! pixFormat = k32ARGBPixelFormat; ! #elif defined(AR_PIX_FORMAT_2vuy) ! pixFormat = k2vuyPixelFormat; // k422YpCbCr8CodecType, k422YpCbCr8PixelFormat ! #elif defined(AR_PIX_FORMAT_yuvs) ! pixFormat = kYUVSPixelFormat; // kComponentVideoUnsigned ! #else ! # error Unsupported pixel format specified in config.h. ! #endif ! vid->rowBytes = vid->width * AR_PIX_SIZE; vid->bufSize = vid->height * vid->rowBytes; arMalloc(vid->bufPixels, ARUint8, vid->bufSize); --- 1466,1472 ---- // Allocate buffer for the grabber to write pixel data into, and use // QTNewGWorldFromPtr() to wrap an offscreen GWorld structure around ! // it. We do it in these two steps rather than using QTNewGWorld() // to guarantee that we don't get padding bytes at the end of rows. ! vid->rowBytes = vid->width * bytesPerPixel; vid->bufSize = vid->height * vid->rowBytes; arMalloc(vid->bufPixels, ARUint8, vid->bufSize); |
From: Philip L. <phi...@us...> - 2004-12-07 04:46:35
|
Update of /cvsroot/artoolkit/artoolkit/include/AR/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23764 Modified Files: videoMacOSX.h Log Message: Mac OS X video driver: support added for runtime specification of pixel format. Index: videoMacOSX.h =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/sys/videoMacOSX.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** videoMacOSX.h 22 Nov 2004 02:10:56 -0000 1.2 --- videoMacOSX.h 7 Dec 2004 04:46:10 -0000 1.3 *************** *** 1,62 **** ! /* ! * Video capture subrutine for Linux/libdc1394 devices ! * author: Kiyoshi Kiyokawa ( ki...@cr... ) ! * Hirokazu Kato ( ka...@sy... ) ! * ! * Revision: 1.0 Date: 2002/01/01 ! * ! */ ! /* ! * Copyright (c) 2003-2004 Philip Lamb (PRL) ph...@ed.... All rights reserved. ! * ! * Rev Date Who Changes ! * 1.1.0 2003-09-09 PRL Based on Apple "Son of MungGrab" sample code for QuickTime 6. ! * Added config option "-fps" to superimpose frame counter on video. ! * Returns aligned data in ARGB pixel format. ! * 1.2.0 2004-04-28 PRL Now one thread per video source. Versions of QuickTime ! * prior to 6.4 are NOT thread safe, and if using a non-thread ! * safe version, you should comment out AR_VIDEO_HAVE_THREADSAFE_QUICKTIME ! * so serialise access when there is more than one thread. ! * 1.2.1 2004-06-28 PRL Support for 2vuy and yuvs pixel formats. ! * 1.3.0 2004-07-13 PRL Code from Daniel Heckenberg to directly access vDig. ! * ! */ ! /* ! * ! * This file is part of ARToolKit. ! * ! * ARToolKit is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * ARToolKit is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with ARToolKit; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! #ifndef AR_VIDEO_MACOSX_H ! #define AR_VIDEO_MACOSX_H ! #ifdef __cplusplus ! extern "C" { ! #endif ! ! #include <Carbon/Carbon.h> ! #include <QuickTime/QuickTime.h> ! #include <pthread.h> ! ! #include <AR/config.h> ! #include <AR/ar.h> ! ! typedef struct _AR2VideoParamT AR2VideoParamT; ! ! #ifdef __cplusplus ! } ! #endif ! #endif // AR_VIDEO_MACOSX_H --- 1,64 ---- ! /* ! * Video capture subrutine for Linux/libdc1394 devices ! * author: Kiyoshi Kiyokawa ( ki...@cr... ) ! * Hirokazu Kato ( ka...@sy... ) ! * ! * Revision: 1.0 Date: 2002/01/01 ! * ! */ ! /* ! * Copyright (c) 2003-2004 Philip Lamb (PRL) ph...@ed.... All rights reserved. ! * ! * Rev Date Who Changes ! * 1.1.0 2003-09-09 PRL Based on Apple "Son of MungGrab" sample code for QuickTime 6. ! * Added config option "-fps" to superimpose frame counter on video. ! * Returns aligned data in ARGB pixel format. ! * 1.2.0 2004-04-28 PRL Now one thread per video source. Versions of QuickTime ! * prior to 6.4 are NOT thread safe, and if using a non-thread ! * safe version, you should comment out AR_VIDEO_HAVE_THREADSAFE_QUICKTIME ! * so serialise access when there is more than one thread. ! * 1.2.1 2004-06-28 PRL Support for 2vuy and yuvs pixel formats. ! * 1.3.0 2004-07-13 PRL Code from Daniel Heckenberg to directly access vDig. ! * 1.3.1 2004-12-07 PRL Added config option "-pixelformat=" to support pixel format ! * specification at runtime, with default determined at compile time. ! * ! */ ! /* ! * ! * This file is part of ARToolKit. ! * ! * ARToolKit is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * ARToolKit is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with ARToolKit; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! #ifndef AR_VIDEO_MACOSX_H ! #define AR_VIDEO_MACOSX_H ! #ifdef __cplusplus ! extern "C" { ! #endif ! ! #include <Carbon/Carbon.h> ! #include <QuickTime/QuickTime.h> ! #include <pthread.h> ! ! #include <AR/config.h> ! #include <AR/ar.h> ! ! typedef struct _AR2VideoParamT AR2VideoParamT; ! ! #ifdef __cplusplus ! } ! #endif ! #endif // AR_VIDEO_MACOSX_H |
From: Philip L. <phi...@us...> - 2004-12-02 07:30:35
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2092 Modified Files: README.txt Log Message: Change DEFAULT_DRAW_MODE to AR_DRAW_BY_TEXTURE_MAPPING on Windows. Index: README.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/README.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** README.txt 2 Dec 2004 02:52:20 -0000 1.7 --- README.txt 2 Dec 2004 07:30:09 -0000 1.8 *************** *** 95,99 **** (1) Unpack the archive to a convenient location using StuffIt Expander, and open the ARToolKit.xproj. (2) Builds include a script target "Configure" which enables accelerated and rectangular texturing by default. If you wish to change these defaults, manually run the ./Configure script from Terminal as for a command-line build. ! (3) XCode will build the binaries in ARToolKit/bin. This must also be the working directory when the binaries are run, but by default XCode runs executables with the working directory set to Build/. In order for the binaries to be able to be run from within XCode you will need to edit the "Working directory path" of the executable to point the installed ARToolKit/bin directory on your system. The VRML renderering library and example (libARvrml & simpleVRML) are optional builds: --- 95,99 ---- (1) Unpack the archive to a convenient location using StuffIt Expander, and open the ARToolKit.xproj. (2) Builds include a script target "Configure" which enables accelerated and rectangular texturing by default. If you wish to change these defaults, manually run the ./Configure script from Terminal as for a command-line build. ! (3) Executables are built into ARToolKit/bin. This must also be the working directory when the executables are run, but by default XCode runs executables with the working directory set to Build/. In order for the binaries to be able to be run from within XCode you will need to edit the "Working directory path" of each executable's XCode settings to the full path to ARToolKit/bin on your system. The VRML renderering library and example (libARvrml & simpleVRML) are optional builds: *************** *** 136,139 **** --- 136,140 ---- - VideoLinux1394Cam patch by Wayne Piekarski for improved lib1394 support, including multiple lib1394 versions. - Preliminary API documentation by Raphael Grasset. + - Default DEFAULT_DRAW_MODE changed to AR_DRAW_BY_TEXTURE_MAPPING on Windows. |
From: Philip L. <phi...@us...> - 2004-12-02 07:27:26
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1593 Modified Files: config.h.in Log Message: Change DEFAULT_DRAW_MODE to AR_DRAW_BY_TEXTURE_MAPPING on Windows. Index: config.h.in =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/config.h.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.h.in 22 Nov 2004 02:11:05 -0000 1.2 --- config.h.in 2 Dec 2004 07:27:17 -0000 1.3 *************** *** 1,205 **** ! #ifndef AR_CONFIG_H ! #define AR_CONFIG_H ! ! /*------------------------------------------------------------*/ ! /* */ ! /* For Linux, you should define one of below 3 input method */ ! /* AR_INPUT_V4L: use of standard Video4Linux Library */ ! /* AR_INPUT_DV: use of DV Camera */ ! /* AR_INPUT_1394CAM: use of 1394 Digital Camara */ ! /* */ ! /*------------------------------------------------------------*/ ! #ifdef __linux ! #undef AR_INPUT_V4L ! #undef AR_INPUT_DV ! #undef AR_INPUT_1394CAM ! ! # ifdef AR_INPUT_V4L ! # ifdef USE_EYETOY ! # define AR_PIX_FORMAT_RGB ! # else ! # define AR_PIX_FORMAT_BGR ! # endif ! # undef AR_PIX_FORMAT_BGRA ! # endif ! ! # ifdef AR_INPUT_DV ! # define AR_PIX_FORMAT_RGB ! # undef AR_PIX_FORMAT_BGRA ! # endif ! ! # ifdef AR_INPUT_1394CAM ! # define AR_PIX_FORMAT_RGB ! # endif ! ! # undef AR_BIG_ENDIAN ! # define AR_LITTLE_ENDIAN ! #endif ! ! ! /*------------------------------------------------------------*/ ! /* For SGI */ ! /*------------------------------------------------------------*/ ! #ifdef __sgi ! # define AR_BIG_ENDIAN ! # undef AR_LITTLE_ENDIAN ! # define AR_PIX_FORMAT_ABGR ! #endif ! ! /*------------------------------------------------------------*/ ! /* For Windows */ ! /*------------------------------------------------------------*/ ! #ifdef _WIN32 ! # undef AR_BIG_ENDIAN ! # define AR_LITTLE_ENDIAN ! # define AR_PIX_FORMAT_BGRA ! #endif ! ! /*------------------------------------------------------------*/ ! /* For Mac OS X */ ! /*------------------------------------------------------------*/ ! #ifdef __APPLE__ ! # define AR_BIG_ENDIAN ! # undef AR_LITTLE_ENDIAN ! # define AR_PIX_FORMAT_2vuy ! #endif ! ! ! /*------------------------------------------------------------*/ ! ! #define AR_DRAW_BY_GL_DRAW_PIXELS 0 ! #define AR_DRAW_BY_TEXTURE_MAPPING 1 ! #define AR_DRAW_TEXTURE_FULL_IMAGE 0 ! #define AR_DRAW_TEXTURE_HALF_IMAGE 1 ! #define AR_IMAGE_PROC_IN_FULL 0 ! #define AR_IMAGE_PROC_IN_HALF 1 ! #define AR_FITTING_TO_IDEAL 0 ! #define AR_FITTING_TO_INPUT 1 ! ! #define AR_TEMPLATE_MATCHING_COLOR 0 ! #define AR_TEMPLATE_MATCHING_BW 1 ! #define AR_MATCHING_WITHOUT_PCA 0 ! #define AR_MATCHING_WITH_PCA 1 ! #define DEFAULT_TEMPLATE_MATCHING_MODE AR_TEMPLATE_MATCHING_COLOR ! #define DEFAULT_MATCHING_PCA_MODE AR_MATCHING_WITHOUT_PCA ! ! ! #ifdef __linux ! # ifdef AR_INPUT_V4L ! # define VIDEO_MODE_PAL 0 ! # define VIDEO_MODE_NTSC 1 ! # define VIDEO_MODE_SECAM 2 ! # define DEFAULT_VIDEO_DEVICE "/dev/video0" ! # define DEFAULT_VIDEO_WIDTH 640 ! # define DEFAULT_VIDEO_HEIGHT 480 ! # define DEFAULT_VIDEO_CHANNEL 1 ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_NTSC ! # endif ! ! # ifdef AR_INPUT_DV ! # define VIDEO_MODE_PAL 0 ! # define VIDEO_MODE_NTSC 1 ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_NTSC ! # endif ! ! # ifdef AR_INPUT_1394CAM ! #undef DRAGONFLY ! # define VIDEO_NODE_ANY -1 ! # define VIDEO_MODE_320x240_YUV422 32 ! # define VIDEO_MODE_640x480_YUV411 33 ! # define VIDEO_MODE_640x480_RGB 34 ! # define VIDEO_MODE_640x480_YUV411_HALF 35 ! # define VIDEO_MODE_640x480_MONO 36 ! # define VIDEO_MODE_640x480_MONO_COLOR 37 ! # define VIDEO_MODE_640x480_MONO_COLOR_HALF 38 ! # define VIDEO_FRAME_RATE_1_875 1 ! # define VIDEO_FRAME_RATE_3_75 2 ! # define VIDEO_FRAME_RATE_7_5 3 ! # define VIDEO_FRAME_RATE_15 4 ! # define VIDEO_FRAME_RATE_30 5 ! # define VIDEO_FRAME_RATE_60 6 ! # define DEFAULT_VIDEO_NODE VIDEO_NODE_ANY ! # ifndef DRAGONFLY ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_640x480_YUV411_HALF ! # else ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_640x480_MONO_COLOR_HALF ! # endif ! # define DEFAULT_VIDEO_FRAME_RATE VIDEO_FRAME_RATE_30 ! # endif ! ! # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_HALF ! # define DEFAULT_FITTING_MODE AR_FITTING_TO_IDEAL ! # define DEFAULT_DRAW_MODE AR_DRAW_BY_TEXTURE_MAPPING ! # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_HALF_IMAGE ! #endif ! ! #ifdef __sgi ! # define VIDEO_FULL 0 ! # define VIDEO_HALF 1 ! # define DEFAULT_VIDEO_SIZE VIDEO_FULL ! # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_HALF ! # define DEFAULT_FITTING_MODE AR_FITTING_TO_INPUT ! # define DEFAULT_DRAW_MODE AR_DRAW_BY_GL_DRAW_PIXELS ! # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_HALF_IMAGE ! #endif ! ! #ifdef _WIN32 ! # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_FULL ! # define DEFAULT_FITTING_MODE AR_FITTING_TO_INPUT ! # define DEFAULT_DRAW_MODE AR_DRAW_BY_GL_DRAW_PIXELS ! # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_FULL_IMAGE ! #endif ! ! #ifdef __APPLE__ ! # define DEFAULT_VIDEO_WIDTH 640 ! # define DEFAULT_VIDEO_HEIGHT 480 ! # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_HALF ! # define DEFAULT_FITTING_MODE AR_FITTING_TO_IDEAL ! # define DEFAULT_DRAW_MODE AR_DRAW_BY_TEXTURE_MAPPING ! # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_FULL_IMAGE ! #undef APPLE_TEXTURE_FAST_TRANSFER ! #endif ! ! ! /* For NVIDIA OpenGL Driver */ ! #undef AR_OPENGL_TEXTURE_RECTANGLE ! ! ! ! #if defined(AR_PIX_FORMAT_ABGR) || defined(AR_PIX_FORMAT_BGRA) || defined(AR_PIX_FORMAT_RGBA) || defined(AR_PIX_FORMAT_ARGB) ! # define AR_PIX_SIZE 4 ! #elif defined(AR_PIX_FORMAT_BGR) || defined(AR_PIX_FORMAT_RGB) ! # define AR_PIX_SIZE 3 ! #elif defined(AR_PIX_FORMAT_2vuy) || defined(AR_PIX_FORMAT_yuvs) ! # define AR_PIX_SIZE 2 ! #else ! # error Unknown pixel format defined in config.h. ! #endif ! ! ! #define AR_GET_TRANS_MAT_MAX_LOOP_COUNT 5 ! #define AR_GET_TRANS_MAT_MAX_FIT_ERROR 1.0 ! #define AR_GET_TRANS_CONT_MAT_MAX_FIT_ERROR 1.0 ! ! #define AR_AREA_MAX 100000 ! #define AR_AREA_MIN 70 ! ! ! #define AR_SQUARE_MAX 30 ! #define AR_CHAIN_MAX 10000 ! #define AR_PATT_NUM_MAX 50 ! #define AR_PATT_SIZE_X 16 ! #define AR_PATT_SIZE_Y 16 ! #define AR_PATT_SAMPLE_NUM 64 ! ! #define AR_GL_CLIP_NEAR 50.0 ! #define AR_GL_CLIP_FAR 5000.0 ! ! #define AR_HMD_XSIZE 640 ! #define AR_HMD_YSIZE 480 ! ! #define AR_PARAM_NMIN 6 ! #define AR_PARAM_NMAX 1000 ! #define AR_PARAM_C34 100.0 ! ! #endif --- 1,205 ---- ! #ifndef AR_CONFIG_H ! #define AR_CONFIG_H ! ! /*------------------------------------------------------------*/ ! /* */ ! /* For Linux, you should define one of below 3 input method */ ! /* AR_INPUT_V4L: use of standard Video4Linux Library */ ! /* AR_INPUT_DV: use of DV Camera */ ! /* AR_INPUT_1394CAM: use of 1394 Digital Camara */ ! /* */ ! /*------------------------------------------------------------*/ ! #ifdef __linux ! #undef AR_INPUT_V4L ! #undef AR_INPUT_DV ! #undef AR_INPUT_1394CAM ! ! # ifdef AR_INPUT_V4L ! # ifdef USE_EYETOY ! # define AR_PIX_FORMAT_RGB ! # else ! # define AR_PIX_FORMAT_BGR ! # endif ! # undef AR_PIX_FORMAT_BGRA ! # endif ! ! # ifdef AR_INPUT_DV ! # define AR_PIX_FORMAT_RGB ! # undef AR_PIX_FORMAT_BGRA ! # endif ! ! # ifdef AR_INPUT_1394CAM ! # define AR_PIX_FORMAT_RGB ! # endif ! ! # undef AR_BIG_ENDIAN ! # define AR_LITTLE_ENDIAN ! #endif ! ! ! /*------------------------------------------------------------*/ ! /* For SGI */ ! /*------------------------------------------------------------*/ ! #ifdef __sgi ! # define AR_BIG_ENDIAN ! # undef AR_LITTLE_ENDIAN ! # define AR_PIX_FORMAT_ABGR ! #endif ! ! /*------------------------------------------------------------*/ ! /* For Windows */ ! /*------------------------------------------------------------*/ ! #ifdef _WIN32 ! # undef AR_BIG_ENDIAN ! # define AR_LITTLE_ENDIAN ! # define AR_PIX_FORMAT_BGRA ! #endif ! ! /*------------------------------------------------------------*/ ! /* For Mac OS X */ ! /*------------------------------------------------------------*/ ! #ifdef __APPLE__ ! # define AR_BIG_ENDIAN ! # undef AR_LITTLE_ENDIAN ! # define AR_PIX_FORMAT_2vuy ! #endif ! ! ! /*------------------------------------------------------------*/ ! ! #define AR_DRAW_BY_GL_DRAW_PIXELS 0 ! #define AR_DRAW_BY_TEXTURE_MAPPING 1 ! #define AR_DRAW_TEXTURE_FULL_IMAGE 0 ! #define AR_DRAW_TEXTURE_HALF_IMAGE 1 ! #define AR_IMAGE_PROC_IN_FULL 0 ! #define AR_IMAGE_PROC_IN_HALF 1 ! #define AR_FITTING_TO_IDEAL 0 ! #define AR_FITTING_TO_INPUT 1 ! ! #define AR_TEMPLATE_MATCHING_COLOR 0 ! #define AR_TEMPLATE_MATCHING_BW 1 ! #define AR_MATCHING_WITHOUT_PCA 0 ! #define AR_MATCHING_WITH_PCA 1 ! #define DEFAULT_TEMPLATE_MATCHING_MODE AR_TEMPLATE_MATCHING_COLOR ! #define DEFAULT_MATCHING_PCA_MODE AR_MATCHING_WITHOUT_PCA ! ! ! #ifdef __linux ! # ifdef AR_INPUT_V4L ! # define VIDEO_MODE_PAL 0 ! # define VIDEO_MODE_NTSC 1 ! # define VIDEO_MODE_SECAM 2 ! # define DEFAULT_VIDEO_DEVICE "/dev/video0" ! # define DEFAULT_VIDEO_WIDTH 640 ! # define DEFAULT_VIDEO_HEIGHT 480 ! # define DEFAULT_VIDEO_CHANNEL 1 ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_NTSC ! # endif ! ! # ifdef AR_INPUT_DV ! # define VIDEO_MODE_PAL 0 ! # define VIDEO_MODE_NTSC 1 ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_NTSC ! # endif ! ! # ifdef AR_INPUT_1394CAM ! #undef DRAGONFLY ! # define VIDEO_NODE_ANY -1 ! # define VIDEO_MODE_320x240_YUV422 32 ! # define VIDEO_MODE_640x480_YUV411 33 ! # define VIDEO_MODE_640x480_RGB 34 ! # define VIDEO_MODE_640x480_YUV411_HALF 35 ! # define VIDEO_MODE_640x480_MONO 36 ! # define VIDEO_MODE_640x480_MONO_COLOR 37 ! # define VIDEO_MODE_640x480_MONO_COLOR_HALF 38 ! # define VIDEO_FRAME_RATE_1_875 1 ! # define VIDEO_FRAME_RATE_3_75 2 ! # define VIDEO_FRAME_RATE_7_5 3 ! # define VIDEO_FRAME_RATE_15 4 ! # define VIDEO_FRAME_RATE_30 5 ! # define VIDEO_FRAME_RATE_60 6 ! # define DEFAULT_VIDEO_NODE VIDEO_NODE_ANY ! # ifndef DRAGONFLY ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_640x480_YUV411_HALF ! # else ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_640x480_MONO_COLOR_HALF ! # endif ! # define DEFAULT_VIDEO_FRAME_RATE VIDEO_FRAME_RATE_30 ! # endif ! ! # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_HALF ! # define DEFAULT_FITTING_MODE AR_FITTING_TO_IDEAL ! # define DEFAULT_DRAW_MODE AR_DRAW_BY_TEXTURE_MAPPING ! # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_HALF_IMAGE ! #endif ! ! #ifdef __sgi ! # define VIDEO_FULL 0 ! # define VIDEO_HALF 1 ! # define DEFAULT_VIDEO_SIZE VIDEO_FULL ! # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_HALF ! # define DEFAULT_FITTING_MODE AR_FITTING_TO_INPUT ! # define DEFAULT_DRAW_MODE AR_DRAW_BY_GL_DRAW_PIXELS ! # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_HALF_IMAGE ! #endif ! ! #ifdef _WIN32 ! # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_FULL ! # define DEFAULT_FITTING_MODE AR_FITTING_TO_INPUT ! # define DEFAULT_DRAW_MODE AR_DRAW_BY_TEXTURE_MAPPING ! # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_FULL_IMAGE ! #endif ! ! #ifdef __APPLE__ ! # define DEFAULT_VIDEO_WIDTH 640 ! # define DEFAULT_VIDEO_HEIGHT 480 ! # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_HALF ! # define DEFAULT_FITTING_MODE AR_FITTING_TO_IDEAL ! # define DEFAULT_DRAW_MODE AR_DRAW_BY_TEXTURE_MAPPING ! # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_FULL_IMAGE ! #undef APPLE_TEXTURE_FAST_TRANSFER ! #endif ! ! ! /* For NVIDIA OpenGL Driver */ ! #undef AR_OPENGL_TEXTURE_RECTANGLE ! ! ! ! #if defined(AR_PIX_FORMAT_ABGR) || defined(AR_PIX_FORMAT_BGRA) || defined(AR_PIX_FORMAT_RGBA) || defined(AR_PIX_FORMAT_ARGB) ! # define AR_PIX_SIZE 4 ! #elif defined(AR_PIX_FORMAT_BGR) || defined(AR_PIX_FORMAT_RGB) ! # define AR_PIX_SIZE 3 ! #elif defined(AR_PIX_FORMAT_2vuy) || defined(AR_PIX_FORMAT_yuvs) ! # define AR_PIX_SIZE 2 ! #else ! # error Unknown pixel format defined in config.h. ! #endif ! ! ! #define AR_GET_TRANS_MAT_MAX_LOOP_COUNT 5 ! #define AR_GET_TRANS_MAT_MAX_FIT_ERROR 1.0 ! #define AR_GET_TRANS_CONT_MAT_MAX_FIT_ERROR 1.0 ! ! #define AR_AREA_MAX 100000 ! #define AR_AREA_MIN 70 ! ! ! #define AR_SQUARE_MAX 30 ! #define AR_CHAIN_MAX 10000 ! #define AR_PATT_NUM_MAX 50 ! #define AR_PATT_SIZE_X 16 ! #define AR_PATT_SIZE_Y 16 ! #define AR_PATT_SAMPLE_NUM 64 ! ! #define AR_GL_CLIP_NEAR 50.0 ! #define AR_GL_CLIP_FAR 5000.0 ! ! #define AR_HMD_XSIZE 640 ! #define AR_HMD_YSIZE 480 ! ! #define AR_PARAM_NMIN 6 ! #define AR_PARAM_NMAX 1000 ! #define AR_PARAM_C34 100.0 ! ! #endif |
From: Philip L. <phi...@us...> - 2004-12-02 02:52:58
|
Update of /cvsroot/artoolkit/artoolkit/ARToolKit.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16501 Modified Files: project.pbxproj Log Message: Add remaining targets for 2.70 release. Index: project.pbxproj =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/ARToolKit.xcode/project.pbxproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** project.pbxproj 1 Dec 2004 04:54:54 -0000 1.8 --- project.pbxproj 2 Dec 2004 02:52:49 -0000 1.9 *************** *** 59,71 **** 4A3F149E064A0AAB0042B0D7, 4A5F9D84064B556E00525EC0, 4A3F1626064A0D910042B0D7, - 4A5F9A47064B4EF400525EC0, - 4A5F9B6F064B501700525EC0, - 4A488AC90751CC26003D46BE, - 4A2244E30659A2F40014DA8E, - 4A5F9BDD064B51FB00525EC0, 4A5F9C36064B52E700525EC0, 4A5F9C84064B538700525EC0, [...987 lines suppressed...] 4A94DD4C0756B27700D79CD1, + 4A5BFDEA075E85F100E59760, + 4A5BFDEC075E85F100E59760, + 4A5BFDEE075E85F100E59760, + 4A5BFDF0075E85F100E59760, + 4A5BFDF2075E85F100E59760, ); isa = PBXAggregateTarget; *************** *** 7038,7041 **** --- 7921,7929 ---- 4AE2305E0659B7D10047D402 = { children = ( + 4A5BFDDE075E856100E59760, + 4A5BFDB7075E835B00E59760, + 4A5BFD5E075E801700E59760, + 4A5BFD49075E801000E59760, + 4A5BFD28075E7F1200E59760, 4A130A0B075C26F900D62ACD, 4A94DD490756B1EB00D79CD1, |
From: Philip L. <phi...@us...> - 2004-12-02 02:52:31
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16428 Modified Files: README.txt Log Message: Overhaul build notes for 2.70 release. Index: README.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/README.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** README.txt 1 Dec 2004 20:58:15 -0000 1.6 --- README.txt 2 Dec 2004 02:52:20 -0000 1.7 *************** *** 1,3 **** ! Read me for ARToolKit-2.69. =========================== --- 1,3 ---- ! Read me for ARToolKit-2.70. =========================== *************** *** 9,31 **** Building on Linux / SGI Irix. Building on Mac OS X. ! Latest changes. ! Previous changes. About this archive. ------------------- ! This archive contains the ARToolKit libraries, utilities and examples, version 2.69. ARToolKit is released under the GNU General Public License (GPL). Please read the file COPYING.txt. ! ARToolKit is designed to build on Windows, Linux, SGI Irix, and Macintosh OS X platforms, and is available in either a compressed archive (.tar.gz) source-only distribution, or as a compiled binary distribution for the individual supported platforms. ! As at 2004-11-04, this package does not include support for the ARToolKit VRML renderer. Support will be forthcoming as a separate package at a later date. This archive was assembled by: ! Philip Lamb ! HIT Lab NZ ! http://www.hitlabnz.org ! 2004-11-04 --- 9,31 ---- Building on Linux / SGI Irix. Building on Mac OS X. ! Changes in this release. ! Changes in earlier releases. About this archive. ------------------- ! This archive contains the ARToolKit libraries, utilities and examples, version 2.70. ARToolKit is released under the GNU General Public License (GPL). Please read the file COPYING.txt. ! The latest version of ARToolKit is available from http://sf.net/projects/artoolkit. ! ARToolKit is designed to build on Windows, Linux, SGI Irix, and Macintosh OS X platforms. This archive was assembled by: ! Philip Lamb ! HIT Lab NZ ! http://www.hitlabnz.org ! 2004-12-02 *************** *** 33,77 **** -------------------- ! Building ARToolKit from source on Windows proceeds by the following steps: ! (1) Unpack the ARToolKit zip file to a convenient location. This location will be referred to below as {ARToolKit}. ! (2) (Source-only distributions only). Download the DSVideoLib0.0.4.zip package and unpack it into {ARToolKit}. ! (3) (Source-only distributions only). Open the folder {ARToolKit}\DSVideoLib\bin.vc60 (Visual Studio 6.0) or {ARToolKit}\DSVideoLib\bin.vc70 (Visual Studio .NET 2003) and copy the files DSVideoLib.dll and DSVideoLibd.dll into {ARToolKit}\bin. ! (4) Open the folder {ARToolKit}\DSVideoLib\bin.vc60 (VS6) or {ARToolKit}\DSVideoLib\bin.vc70 (VS.NET) and run the script register_filter.bat. ! (5) Install the GLUT DLL into the Windows System32 folder, and the library and headers into the VS platform SDK folders. (http://www.opengl.org/developers/documentation/glut/) ! (6) Install the DirectX 9.0b or later SDK (http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp). If you are using VS6, you must use 9.0b as DirectX 9.0c no longer includes support for VS6. ! (7) (DirectX 9.0c October 2004 or later only). Download the DirectX SDK Extras package , and mov the DirectShow\Samples folder into the top-level of the installed SDK path. ! (8) Run the batch file {ARToolKit}\Configure.win32.bat to create include/AR/config.h. ! (9) Open the ARToolKit.sln file (Visual Studio .NET 2003) or ARToolkit.dsw file (Visual Studio 6). ! (10) Open the Visual Studio search paths settings (Tools->Options->Directories for VS.6, 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. ! (11) (Optional, if rebuilding DSVideoLib only). 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)). ! (12) Build the toolkit. Building on Linux / SGI Irix. ----------------------------- ! Assuming the ARToolKit-2.69.tar.gz file is in your home directory, open a terminal window and type the following commands: ! cd ~ ! tar zxvf ARToolKit-2.69.tar.gz ! cd ARToolKit-2.69 ! ./Configure make ! Following a successful build, to run a binary such as simpleTest, add these commands: ! cd bin ./simpleTest ! ! You will be prompted as to which of the three Linux video drivers you wish to use at the Configure step. Building on Mac OS X. --------------------------- - You will need to have Apple's Developer Tools installed in order to build ARToolKit. These can be downloaded freely from http://developer.apple.com. The library can either be built using (a) the XCode IDE or (b) from the command line: ! (a) Unpack the archive to a convenient location using StuffIt Expander, and open the ARToolKit.xproj file in XCode. (The Configure target selects accelerated and rectangular texturing by default. If you wish to change these defaults, run the ./Configure script as in option (b) below.) ! XCode will build the binaries in ARToolKit/bin. This must also be the working directory when the binaries are run, but by default XCode runs executables with the working directory set to Build/. In order for the binaries to be able to be run from within XCode you will need to edit the "Working directory path" of the executable to point the installed ARToolKit/bin directory on your system. ! (b) Drop the ARToolKit-2.69.tar.gz file onto the Desktop and then open a Terminal window and type the following commands: cd ~/Desktop ! tar zxvf ARToolKit-2.69.tar.gz ! cd ARToolKit-2.69 ./Configure make --- 33,110 ---- -------------------- ! 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. Building on Linux / SGI Irix. ----------------------------- ! ! Prerequisites: ! * (Optional, for VRML renderer only) openvrml-0.14.3 and dependencies. Download from http://sf.net/projects/openvrml. ! ! Unpack the ARToolKit to a convenient location. The root of this location will be referred to below as {ARToolKit}: ! tar zxvf ARToolKit-2.70.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} ! ./Configure make ! Following a successful build, to run a binary such as simpleTest: ! cd {ARToolKit}/bin ./simpleTest ! ! The VRML renderering library and example (libARvrml & simpleVRML) are optional builds: ! cd {ARToolKit}/lib/SRC/ARvrml ! make ! cd {ARToolKit}/examples/simpleVRML ! make ! cd {ARToolKit}/bin ! ./simpleVRML Building on Mac OS X. --------------------------- ! Prerequisites: ! * Apple's Developer Tools. http://developer.apple.com ! * Camera driver. Mac OS X 10.3 and later include an inbuilt IIDC and DV FireWire camera driver. USB camera drivers, and Firewire camera drivers for pre-10.3 systems can be obtained from ioXperts at http://www.ioxperts.com. ! * (Optional, for VRML renderer only) Apple X11 and Fink. Download X11 from http://www.apple.com/downloads/macosx/apple/x11formacosx.html. Download Fink (and optionally, FinkCommander) from http://fink.sf.net. ! Building using the XCode IDE: ! (1) Unpack the archive to a convenient location using StuffIt Expander, and open the ARToolKit.xproj. ! (2) Builds include a script target "Configure" which enables accelerated and rectangular texturing by default. If you wish to change these defaults, manually run the ./Configure script from Terminal as for a command-line build. ! (3) XCode will build the binaries in ARToolKit/bin. This must also be the working directory when the binaries are run, but by default XCode runs executables with the working directory set to Build/. In order for the binaries to be able to be run from within XCode you will need to edit the "Working directory path" of the executable to point the installed ARToolKit/bin directory on your system. ! ! The VRML renderering library and example (libARvrml & simpleVRML) are optional builds: ! (4) Using FinkCommander, do a binary install of mozilla-dev, followed by an install of openvrml4-dev and openvrml-gl5-dev. ! (5) Select the ARToolKit extensions target, and build. ! ! Alternately, ARToolKit can be built from the Terminal, using the Unix makefiles. ! 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.tgz ! Configure and build ! cd ~/ARToolKit ./Configure make *************** *** 79,92 **** cd bin ./simpleTest ! ! Mac OS X 10.3 and later include an inbuilt IIDC FireWire camera driver. USB camera drivers and Firewire camera drivers for pre-10.3 systems can be obtained from ioXperts at http://www.ioxperts.com. ! Latest changes. ! --------------- ! - Added libARvrml and simpleVRML example. Build instructions are in the works. - Turn off texturing in gsub/gsub_lite when argDrawMode/arglDrawmode is AR_DRAW_BY_GL_DRAW_PIXELS. ! - Added new examples collide, loadMultiple, paddle, paddleDemo, paddleInteraction, range and twoView. ! - Added new utilities for testing graphics and video without marker recognition, graphicsTest and videoTest. - VideoLinuxV4L patch by Uwe Woessner for YUV support (at last!) - VideoLinuxV4L patches by Raphael Grasset for improved camera parameter control and compressed jpeg video stream to support Sony Eyetoy camera. --- 112,135 ---- cd bin ./simpleTest ! ! The VRML renderering library and example (libARvrml & simpleVRML) are optional builds: ! fink -b install mozilla-dev ! fink install openvrml4-dev openvrml-gl5-dev ! cd ~/Desktop/ARToolKit/lib/SRC/ARvrml ! make ! cd ~/Desktop/ARToolKit/examples/simpleVRML ! make ! cd ~/Desktop/ARToolKit/bin ! ./simpleVRML ! Changes in this release. ! ------------------------ ! - Added libARvrml and simpleVRML example. - Turn off texturing in gsub/gsub_lite when argDrawMode/arglDrawmode is AR_DRAW_BY_GL_DRAW_PIXELS. ! - Added examples loadMultiple, demonstrating basic usage. ! - Added examples rangeTest, collideTest, paddleTest, paddleDemo, paddleInteractionTest, demonstrating interaction techniques. ! - Added example twoView, demonstrating input, processing and output from two (or more) cameras. ! - Added utilities graphicsTest and videoTest, for testing graphics and video without marker recognition. - VideoLinuxV4L patch by Uwe Woessner for YUV support (at last!) - VideoLinuxV4L patches by Raphael Grasset for improved camera parameter control and compressed jpeg video stream to support Sony Eyetoy camera. *************** *** 95,100 **** ! Previous changes. ! ----------------- Please see the file ChangeLog.txt. --- 138,143 ---- ! Changes in earlier releases. ! ---------------------------- Please see the file ChangeLog.txt. |
From: Philip L. <phi...@us...> - 2004-12-02 00:48:49
|
Update of /cvsroot/artoolkit/artoolkit/bin/Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21377 Modified Files: object_data2 Log Message: Use Unix line endings. Index: object_data2 =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/bin/Data/object_data2,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object_data2 22 Nov 2004 03:38:12 -0000 1.1 --- object_data2 2 Dec 2004 00:48:39 -0000 1.2 *************** *** 1,14 **** ! #the number of patterns to be recognized ! 2 ! ! #pattern 1 ! Hiro ! Data/patt.hiro ! 80.0 ! 0.0 0.0 ! ! #pattern 2 ! Kanji ! Data/patt.kanji ! 80.0 ! 0.0 0.0 --- 1,14 ---- ! #the number of patterns to be recognized ! 2 ! ! #pattern 1 ! Hiro ! Data/patt.hiro ! 80.0 ! 0.0 0.0 ! ! #pattern 2 ! Kanji ! Data/patt.kanji ! 80.0 ! 0.0 0.0 |
From: Philip L. <phi...@us...> - 2004-12-02 00:48:24
|
Update of /cvsroot/artoolkit/artoolkit/examples/collide In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21285 Modified Files: collideTest.c object.c Log Message: Fix some build warnings. Index: object.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/collide/object.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object.c 22 Nov 2004 03:37:51 -0000 1.1 --- object.c 2 Dec 2004 00:48:13 -0000 1.2 *************** *** 1,101 **** ! ! /* ! ** ARToolKit object parsing function ! ** - reads in object data from object file in Data/object_data ! ** ! ** Format: ! ** <obj_num> ! ** ! ** <obj_name> ! ** <obj_pattern filename> ! ** <marker_width> ! ** <centerX centerY> ! ** ! ** ... ! ** ! ** eg ! ** ! ** #pattern 1 ! ** Hiro ! ** Data/hiroPatt ! ** 80.0 ! ** 0.0 0.0 ! ** ! */ ! ! #include <stdio.h> ! #include <malloc.h> ! #include <stdlib.h> ! #include <string.h> ! #include <AR/ar.h> ! #include "object.h" ! ! static char *get_buff( char *buf, int n, FILE *fp ); ! ! ObjectData_T *read_ObjData( char *name, int *objectnum ) ! { ! FILE *fp; ! ObjectData_T *object; ! char buf[256], buf1[256]; ! int i; ! ! printf("Opening Data File %s\n",name); ! ! if( (fp=fopen(name, "r")) == NULL ) { ! printf("Can't find the file - quitting \n"); ! return(0); ! } ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%d", objectnum) != 1 ) {fclose(fp); return(0);} ! ! printf("About to load %d Models\n",*objectnum); ! ! object = (ObjectData_T *)malloc( sizeof(ObjectData_T) * *objectnum ); ! if( object == NULL ) return(0); ! ! for( i = 0; i < *objectnum; i++ ) { ! object[i].visible = 0; ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%s", buf1, object[i].name) != 1 ) { ! fclose(fp); free(object); return(0); ! } ! ! printf("Read in No.%d \n", i+1); ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%s", buf1) != 1 ) { ! fclose(fp); free(object); return(0);} ! ! if( (object[i].id = arLoadPatt(buf1)) < 0 ) ! {fclose(fp); free(object); return(0);} ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%lf", &object[i].marker_width) != 1 ) { ! fclose(fp); free(object); return(0); ! } ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%lf %lf", &object[i].marker_center[0], ! &object[i].marker_center[1]) != 2 ) { ! fclose(fp); free(object); return(0); ! } ! ! } ! ! fclose(fp); ! ! return( object ); ! } ! ! static char *get_buff( char *buf, int n, FILE *fp ) ! { ! char *ret; ! ! for(;;) { ! ret = fgets( buf, n, fp ); ! if( ret == NULL ) return(NULL); ! if( buf[0] != '\n' && buf[0] != '#' ) return(ret); ! } ! } --- 1,100 ---- ! ! /* ! ** ARToolKit object parsing function ! ** - reads in object data from object file in Data/object_data ! ** ! ** Format: ! ** <obj_num> ! ** ! ** <obj_name> ! ** <obj_pattern filename> ! ** <marker_width> ! ** <centerX centerY> ! ** ! ** ... ! ** ! ** eg ! ** ! ** #pattern 1 ! ** Hiro ! ** Data/hiroPatt ! ** 80.0 ! ** 0.0 0.0 ! ** ! */ ! ! #include <stdio.h> ! #include <stdlib.h> ! #include <string.h> ! #include <AR/ar.h> ! #include "object.h" ! ! static char *get_buff( char *buf, int n, FILE *fp ); ! ! ObjectData_T *read_ObjData( char *name, int *objectnum ) ! { ! FILE *fp; ! ObjectData_T *object; ! char buf[256], buf1[256]; ! int i; ! ! printf("Opening Data File %s\n",name); ! ! if( (fp=fopen(name, "r")) == NULL ) { ! printf("Can't find the file - quitting \n"); ! return(0); ! } ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%d", objectnum) != 1 ) {fclose(fp); return(0);} ! ! printf("About to load %d Models\n",*objectnum); ! ! object = (ObjectData_T *)malloc( sizeof(ObjectData_T) * *objectnum ); ! if( object == NULL ) return(0); ! ! for( i = 0; i < *objectnum; i++ ) { ! object[i].visible = 0; ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%s", object[i].name) != 1 ) { ! fclose(fp); free(object); return(0); ! } ! ! printf("Read in No.%d \n", i+1); ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%s", buf1) != 1 ) { ! fclose(fp); free(object); return(0);} ! ! if( (object[i].id = arLoadPatt(buf1)) < 0 ) ! {fclose(fp); free(object); return(0);} ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%lf", &object[i].marker_width) != 1 ) { ! fclose(fp); free(object); return(0); ! } ! ! get_buff(buf, 256, fp); ! if( sscanf(buf, "%lf %lf", &object[i].marker_center[0], ! &object[i].marker_center[1]) != 2 ) { ! fclose(fp); free(object); return(0); ! } ! ! } ! ! fclose(fp); ! ! return( object ); ! } ! ! static char *get_buff( char *buf, int n, FILE *fp ) ! { ! char *ret; ! ! for(;;) { ! ret = fgets( buf, n, fp ); ! if( ret == NULL ) return(NULL); ! if( buf[0] != '\n' && buf[0] != '#' ) return(ret); ! } ! } Index: collideTest.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/collide/collideTest.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** collideTest.c 22 Nov 2004 03:37:51 -0000 1.1 --- collideTest.c 2 Dec 2004 00:48:13 -0000 1.2 *************** *** 1,292 **** ! #ifdef _WIN32 ! #include <windows.h> ! #endif ! #include <stdio.h> ! #include <stdlib.h> ! #include <string.h> ! #include <math.h> ! ! #include <GL/gl.h> ! #include <GL/glut.h> ! #include <AR/gsub.h> ! #include <AR/param.h> ! #include <AR/ar.h> ! #include <AR/video.h> ! ! #include "object.h" ! ! ! #define COLLIDE_DIST 30000.0 ! ! /* Object Data */ ! char *model_name = "Data/object_data2"; ! ObjectData_T *object; ! int objectnum; ! ! int xsize, ysize; ! int thresh = 100; ! int count = 0; ! ! /* set video capture configuration */ ! #ifdef _WIN32 ! char *vconf = "flipV,showDlg"; // see video.h for a list of supported parameters ! #else ! char *vconf = ""; ! #endif ! ! char *cparam_name = "Data/camera_para.dat"; ! ARParam cparam; ! ! static void init(void); ! static void cleanup(void); ! static void keyEvent( unsigned char key, int x, int y); ! static void mainLoop(void); ! static int checkCollisions( ObjectData_T object0, ObjectData_T object1, float collide_dist); ! static int draw( ObjectData_T *object, int objectnum ); ! static int draw_object( int obj_id, double gl_para[16], int collide_flag ); ! ! int main() ! { ! //initialize applications ! init(); ! ! //start video capture ! arVideoCapStart(); ! ! //start the main event loop ! argMainLoop( NULL, keyEvent, mainLoop ); ! ! return 0; ! } ! ! static void keyEvent( unsigned char key, int x, int y) ! { ! /* quit if the ESC key is pressed */ ! if( key == 0x1b ) { ! printf("*** %f (frame/sec)\n", (double)count/arUtilTimer()); ! cleanup(); ! exit(0); ! } ! } ! ! /* main loop */ ! static void mainLoop(void) ! { ! ARUint8 *dataPtr; ! ARMarkerInfo *marker_info; ! int marker_num; ! int i,j,k; ! ! /* grab a video frame */ ! if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { ! arUtilSleep(2); ! return; ! } ! ! if( count == 0 ) arUtilTimerReset(); ! count++; ! ! /*draw the video*/ ! argDrawMode2D(); ! argDispImage( dataPtr, 0,0 ); ! ! /* capture the next video frame */ ! arVideoCapNext(); ! ! glColor3f( 1.0, 0.0, 0.0 ); ! glLineWidth(6.0); ! ! /* detect the markers in the video frame */ ! if(arDetectMarker(dataPtr, thresh, ! &marker_info, &marker_num) < 0 ) { ! cleanup(); ! exit(0); ! } ! for( i = 0; i < marker_num; i++ ) { ! argDrawSquare(marker_info[i].vertex,0,0); ! } ! ! /* check for known patterns */ ! for( i = 0; i < objectnum; i++ ) { ! k = -1; ! for( j = 0; j < marker_num; j++ ) { ! if( object[i].id == marker_info[j].id) { ! ! /* you've found a pattern */ ! //printf("Found pattern: %d ",patt_id); ! glColor3f( 0.0, 1.0, 0.0 ); ! argDrawSquare(marker_info[j].vertex,0,0); ! ! if( k == -1 ) k = j; ! else /* make sure you have the best pattern (highest confidence factor) */ ! if( marker_info[k].cf < marker_info[j].cf ) k = j; ! } ! } ! if( k == -1 ) { ! object[i].visible = 0; ! continue; ! } ! ! /* calculate the transform for each marker */ ! if( object[i].visible == 0 ) { ! arGetTransMat(&marker_info[k], ! object[i].marker_center, object[i].marker_width, ! object[i].trans); ! } ! else { ! arGetTransMatCont(&marker_info[k], object[i].trans, ! object[i].marker_center, object[i].marker_width, ! object[i].trans); ! } ! object[i].visible = 1; ! } ! ! /*check for object collisions between marker 0 and 1 */ ! if(object[0].visible && object[1].visible){ ! if(checkCollisions(object[0],object[1],COLLIDE_DIST)){ ! object[0].collide = 1; ! object[1].collide = 1; ! } ! else{ ! object[0].collide = 0; ! object[1].collide = 0; ! } ! } ! ! /* draw the AR graphics */ ! draw( object, objectnum ); ! ! /*swap the graphics buffers*/ ! argSwapBuffers(); ! } ! ! /* check collision between two markers */ ! static int checkCollisions( ObjectData_T object0, ObjectData_T object1, float collide_dist) ! { ! float x1,y1,z1; ! float x2,y2,z2; ! float dist; ! ! x1 = object0.trans[0][3]; ! y1 = object0.trans[1][3]; ! z1 = object0.trans[2][3]; ! ! x2 = object1.trans[0][3]; ! y2 = object1.trans[1][3]; ! z2 = object1.trans[2][3]; ! ! dist = (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2); ! ! printf("Dist = %3.2f\n",dist); ! ! if(dist < collide_dist) ! return 1; ! else ! return 0; ! } ! static void init( void ) ! { ! ARParam wparam; ! ! /* open the video path */ ! if( arVideoOpen( vconf ) < 0 ) exit(0); ! /* find the size of the window */ ! if( arVideoInqSize(&xsize, &ysize) < 0 ) exit(0); ! printf("Image size (x,y) = (%d,%d)\n", xsize, ysize); ! ! /* set the initial camera parameters */ ! if( arParamLoad(cparam_name, 1, &wparam) < 0 ) { ! printf("Camera parameter load error !!\n"); ! exit(0); ! } ! arParamChangeSize( &wparam, xsize, ysize, &cparam ); ! arInitCparam( &cparam ); ! printf("*** Camera Parameter ***\n"); ! arParamDisp( &cparam ); ! ! /* load in the object data - trained markers and associated bitmap files */ ! if( (object=read_ObjData(model_name, &objectnum)) == NULL ) exit(0); ! printf("Objectfile num = %d\n", objectnum); ! ! /* open the graphics window */ ! argInit( &cparam, 2.0, 0, 0, 0, 0 ); ! } ! ! /* cleanup function called when program exits */ ! static void cleanup(void) ! { ! arVideoCapStop(); ! arVideoClose(); ! argCleanup(); ! } ! ! /* draw the the AR objects */ ! static int draw( ObjectData_T *object, int objectnum ) ! { ! int i; ! double gl_para[16]; ! ! glClearDepth( 1.0 ); ! glClear(GL_DEPTH_BUFFER_BIT); ! glEnable(GL_DEPTH_TEST); ! glDepthFunc(GL_LEQUAL); ! glEnable(GL_LIGHTING); ! ! /* calculate the viewing parameters - gl_para */ ! for( i = 0; i < objectnum; i++ ) { ! if( object[i].visible == 0 ) continue; ! argConvGlpara(object[i].trans, gl_para); ! draw_object( object[i].id, gl_para, object[i].collide ); ! } ! ! glDisable( GL_LIGHTING ); ! glDisable( GL_DEPTH_TEST ); ! ! return(0); ! } ! ! /* draw the user object */ ! static int draw_object( int obj_id, double gl_para[16], int collide_flag ) ! { ! GLfloat mat_ambient[] = {0.0, 0.0, 1.0, 1.0}; ! GLfloat mat_ambient_collide[] = {1.0, 0.0, 0.0, 1.0}; ! GLfloat mat_flash[] = {0.0, 0.0, 1.0, 1.0}; ! GLfloat mat_flash_collide[] = {1.0, 0.0, 0.0, 1.0}; ! GLfloat mat_flash_shiny[] = {50.0}; ! GLfloat light_position[] = {100.0,-200.0,200.0,0.0}; ! GLfloat ambi[] = {0.1, 0.1, 0.1, 0.1}; ! GLfloat lightZeroColor[] = {0.9, 0.9, 0.9, 0.1}; ! ! argDrawMode3D(); ! argDraw3dCamera( 0, 0 ); ! glMatrixMode(GL_MODELVIEW); ! glLoadMatrixd( gl_para ); ! ! /* set the material */ ! glEnable(GL_LIGHTING); ! glEnable(GL_LIGHT0); ! glLightfv(GL_LIGHT0, GL_POSITION, light_position); ! glLightfv(GL_LIGHT0, GL_AMBIENT, ambi); ! glLightfv(GL_LIGHT0, GL_DIFFUSE, lightZeroColor); ! ! glMaterialfv(GL_FRONT, GL_SHININESS, mat_flash_shiny); ! ! if(collide_flag){ ! glMaterialfv(GL_FRONT, GL_SPECULAR, mat_flash_collide); ! glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient_collide); ! /* draw a cube */ ! glTranslatef( 0.0, 0.0, 30.0 ); ! glutSolidSphere(30,12,6); ! } ! else { ! glMaterialfv(GL_FRONT, GL_SPECULAR, mat_flash); ! glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); ! /* draw a cube */ ! glTranslatef( 0.0, 0.0, 30.0 ); ! glutSolidCube(60); ! } ! ! argDrawMode2D(); ! ! return 0; ! } --- 1,295 ---- ! #ifdef _WIN32 ! # include <windows.h> ! #endif ! #include <stdio.h> ! #include <stdlib.h> ! #include <string.h> ! #include <math.h> ! ! #ifndef __APPLE__ ! # include <GL/glut.h> ! #else ! # include <GLUT/glut.h> ! #endif ! #include <AR/gsub.h> ! #include <AR/param.h> ! #include <AR/ar.h> ! #include <AR/video.h> ! ! #include "object.h" ! ! ! #define COLLIDE_DIST 30000.0 ! ! /* Object Data */ ! char *model_name = "Data/object_data2"; ! ObjectData_T *object; ! int objectnum; ! ! int xsize, ysize; ! int thresh = 100; ! int count = 0; ! ! /* set video capture configuration */ ! #ifdef _WIN32 ! char *vconf = "flipV,showDlg"; // see video.h for a list of supported parameters ! #else ! char *vconf = ""; ! #endif ! ! char *cparam_name = "Data/camera_para.dat"; ! ARParam cparam; ! ! static void init(void); ! static void cleanup(void); ! static void keyEvent( unsigned char key, int x, int y); ! static void mainLoop(void); ! static int checkCollisions( ObjectData_T object0, ObjectData_T object1, float collide_dist); ! static int draw( ObjectData_T *object, int objectnum ); ! static int draw_object( int obj_id, double gl_para[16], int collide_flag ); ! ! int main() ! { ! //initialize applications ! init(); ! ! //start video capture ! arVideoCapStart(); ! ! //start the main event loop ! argMainLoop( NULL, keyEvent, mainLoop ); ! ! return 0; ! } ! ! static void keyEvent( unsigned char key, int x, int y) ! { ! /* quit if the ESC key is pressed */ ! if( key == 0x1b ) { ! printf("*** %f (frame/sec)\n", (double)count/arUtilTimer()); ! cleanup(); ! exit(0); ! } ! } ! ! /* main loop */ ! static void mainLoop(void) ! { ! ARUint8 *dataPtr; ! ARMarkerInfo *marker_info; ! int marker_num; ! int i,j,k; ! ! /* grab a video frame */ ! if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { ! arUtilSleep(2); ! return; ! } ! ! if( count == 0 ) arUtilTimerReset(); ! count++; ! ! /*draw the video*/ ! argDrawMode2D(); ! argDispImage( dataPtr, 0,0 ); ! ! /* capture the next video frame */ ! arVideoCapNext(); ! ! glColor3f( 1.0, 0.0, 0.0 ); ! glLineWidth(6.0); ! ! /* detect the markers in the video frame */ ! if(arDetectMarker(dataPtr, thresh, ! &marker_info, &marker_num) < 0 ) { ! cleanup(); ! exit(0); ! } ! for( i = 0; i < marker_num; i++ ) { ! argDrawSquare(marker_info[i].vertex,0,0); ! } ! ! /* check for known patterns */ ! for( i = 0; i < objectnum; i++ ) { ! k = -1; ! for( j = 0; j < marker_num; j++ ) { ! if( object[i].id == marker_info[j].id) { ! ! /* you've found a pattern */ ! //printf("Found pattern: %d ",patt_id); ! glColor3f( 0.0, 1.0, 0.0 ); ! argDrawSquare(marker_info[j].vertex,0,0); ! ! if( k == -1 ) k = j; ! else /* make sure you have the best pattern (highest confidence factor) */ ! if( marker_info[k].cf < marker_info[j].cf ) k = j; ! } ! } ! if( k == -1 ) { ! object[i].visible = 0; ! continue; ! } ! ! /* calculate the transform for each marker */ ! if( object[i].visible == 0 ) { ! arGetTransMat(&marker_info[k], ! object[i].marker_center, object[i].marker_width, ! object[i].trans); ! } ! else { ! arGetTransMatCont(&marker_info[k], object[i].trans, ! object[i].marker_center, object[i].marker_width, ! object[i].trans); ! } ! object[i].visible = 1; ! } ! ! /*check for object collisions between marker 0 and 1 */ ! if(object[0].visible && object[1].visible){ ! if(checkCollisions(object[0],object[1],COLLIDE_DIST)){ ! object[0].collide = 1; ! object[1].collide = 1; ! } ! else{ ! object[0].collide = 0; ! object[1].collide = 0; ! } ! } ! ! /* draw the AR graphics */ ! draw( object, objectnum ); ! ! /*swap the graphics buffers*/ ! argSwapBuffers(); ! } ! ! /* check collision between two markers */ ! static int checkCollisions( ObjectData_T object0, ObjectData_T object1, float collide_dist) ! { ! float x1,y1,z1; ! float x2,y2,z2; ! float dist; ! ! x1 = object0.trans[0][3]; ! y1 = object0.trans[1][3]; ! z1 = object0.trans[2][3]; ! ! x2 = object1.trans[0][3]; ! y2 = object1.trans[1][3]; ! z2 = object1.trans[2][3]; ! ! dist = (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2); ! ! printf("Dist = %3.2f\n",dist); ! ! if(dist < collide_dist) ! return 1; ! else ! return 0; ! } ! static void init( void ) ! { ! ARParam wparam; ! ! /* open the video path */ ! if( arVideoOpen( vconf ) < 0 ) exit(0); ! /* find the size of the window */ ! if( arVideoInqSize(&xsize, &ysize) < 0 ) exit(0); ! printf("Image size (x,y) = (%d,%d)\n", xsize, ysize); ! ! /* set the initial camera parameters */ ! if( arParamLoad(cparam_name, 1, &wparam) < 0 ) { ! printf("Camera parameter load error !!\n"); ! exit(0); ! } ! arParamChangeSize( &wparam, xsize, ysize, &cparam ); ! arInitCparam( &cparam ); ! printf("*** Camera Parameter ***\n"); ! arParamDisp( &cparam ); ! ! /* load in the object data - trained markers and associated bitmap files */ ! if( (object=read_ObjData(model_name, &objectnum)) == NULL ) exit(0); ! printf("Objectfile num = %d\n", objectnum); ! ! /* open the graphics window */ ! argInit( &cparam, 2.0, 0, 0, 0, 0 ); ! } ! ! /* cleanup function called when program exits */ ! static void cleanup(void) ! { ! arVideoCapStop(); ! arVideoClose(); ! argCleanup(); ! } ! ! /* draw the the AR objects */ ! static int draw( ObjectData_T *object, int objectnum ) ! { ! int i; ! double gl_para[16]; ! ! glClearDepth( 1.0 ); ! glClear(GL_DEPTH_BUFFER_BIT); ! glEnable(GL_DEPTH_TEST); ! glDepthFunc(GL_LEQUAL); ! glEnable(GL_LIGHTING); ! ! /* calculate the viewing parameters - gl_para */ ! for( i = 0; i < objectnum; i++ ) { ! if( object[i].visible == 0 ) continue; ! argConvGlpara(object[i].trans, gl_para); ! draw_object( object[i].id, gl_para, object[i].collide ); ! } ! ! glDisable( GL_LIGHTING ); ! glDisable( GL_DEPTH_TEST ); ! ! return(0); ! } ! ! /* draw the user object */ ! static int draw_object( int obj_id, double gl_para[16], int collide_flag ) ! { ! GLfloat mat_ambient[] = {0.0, 0.0, 1.0, 1.0}; ! GLfloat mat_ambient_collide[] = {1.0, 0.0, 0.0, 1.0}; ! GLfloat mat_flash[] = {0.0, 0.0, 1.0, 1.0}; ! GLfloat mat_flash_collide[] = {1.0, 0.0, 0.0, 1.0}; ! GLfloat mat_flash_shiny[] = {50.0}; ! GLfloat light_position[] = {100.0,-200.0,200.0,0.0}; ! GLfloat ambi[] = {0.1, 0.1, 0.1, 0.1}; ! GLfloat lightZeroColor[] = {0.9, 0.9, 0.9, 0.1}; ! ! argDrawMode3D(); ! argDraw3dCamera( 0, 0 ); ! glMatrixMode(GL_MODELVIEW); ! glLoadMatrixd( gl_para ); ! ! /* set the material */ ! glEnable(GL_LIGHTING); ! glEnable(GL_LIGHT0); ! glLightfv(GL_LIGHT0, GL_POSITION, light_position); ! glLightfv(GL_LIGHT0, GL_AMBIENT, ambi); ! glLightfv(GL_LIGHT0, GL_DIFFUSE, lightZeroColor); ! ! glMaterialfv(GL_FRONT, GL_SHININESS, mat_flash_shiny); ! ! if(collide_flag){ ! glMaterialfv(GL_FRONT, GL_SPECULAR, mat_flash_collide); ! glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient_collide); ! /* draw a cube */ ! glTranslatef( 0.0, 0.0, 30.0 ); ! glutSolidSphere(30,12,6); ! } ! else { ! glMaterialfv(GL_FRONT, GL_SPECULAR, mat_flash); ! glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); ! /* draw a cube */ ! glTranslatef( 0.0, 0.0, 30.0 ); ! glutSolidCube(60); ! } ! ! argDrawMode2D(); ! ! return 0; ! } |