artoolkit-commits Mailing List for ARToolKit (Page 7)
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: Hartmut S. <ret...@us...> - 2006-09-18 05:24:09
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinuxV4L In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv10204/lib/SRC/VideoLinuxV4L Modified Files: video.c Log Message: V4L now also configurable through ARTOOLKIT_CONFIG Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinuxV4L/video.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** video.c 21 Apr 2006 04:35:20 -0000 1.5 --- video.c 18 Sep 2006 05:24:06 -0000 1.6 *************** *** 153,156 **** --- 153,175 ---- int i; int adjust = 1; + + + /* following plainly copied from Wayne :) */ + /* If no config string is supplied, we should use the environment variable otherwise set a sane default */ + if (!strcmp (config, "")) { + + /* None suppplied, lets see if the user supplied one from the shell */ + char *envconf = getenv ("ARTOOLKIT_CONFIG"); + if ((envconf != NULL) && (strcmp (envconf, ""))) { + config = envconf; + printf ("Using config string from environment [%s]\n", config); + } + else { + printf ("No config string supplied, please consult documentation\n"); + } + } else + printf ("Using supplied config string [%s]\n", config); + + arMalloc( vid, AR2VideoParamT, 1 ); |
From: Hartmut S. <ret...@us...> - 2006-09-18 04:52:19
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv29659 Modified Files: Configure Log Message: Added question for debug mode in Configure Index: Configure =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/Configure,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Configure 18 Sep 2006 04:48:30 -0000 1.9 --- Configure 18 Sep 2006 04:52:15 -0000 1.10 *************** *** 91,94 **** --- 91,95 ---- exit 0 fi + # Asking for debug mode (assumes gcc) echo "Do you want to create debug symbols? (y or n)" echo -n "Enter : " |
From: Hartmut S. <ret...@us...> - 2006-09-18 04:49:05
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28053 Modified Files: Configure Log Message: implemented (read as: copied code) Waynes proposed ARTOOLKIT_CONFIG for GStreamer. Removed all GStreamer related example configuration strings from the examples and utils. Added section into the documentation Index: Configure =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/Configure,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Configure 15 Sep 2006 03:08:17 -0000 1.8 --- Configure 18 Sep 2006 04:48:30 -0000 1.9 *************** *** 91,94 **** --- 91,107 ---- exit 0 fi + echo "Do you want to create debug symbols? (y or n)" + echo -n "Enter : " + read ANS + if [ "$ANS" = "y" ] + then + CFLAG="$CFLAG -g" + elif [ "$ANS" = "n" ] + then + CFLAG="$CFLAG" + else + echo "Please enter y or n." + exit 0 + fi elif [ "$E" = "IRIX" ] then *************** *** 116,120 **** 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)" echo -n "Enter : " read ANS --- 129,133 ---- LIBS="-framework Carbon -framework QuickTime -framework GLUT -framework OpenGL -framework AppKit -framework Foundation -lobjc" ! echo "Does your Mac have fast texture mapping hardware? (y or n)" echo -n "Enter : " read ANS |
From: Hartmut S. <ret...@us...> - 2006-09-18 04:48:39
|
Update of /cvsroot/artoolkit/artoolkit/doc/video In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28053/doc/video Modified Files: index.html Log Message: implemented (read as: copied code) Waynes proposed ARTOOLKIT_CONFIG for GStreamer. Removed all GStreamer related example configuration strings from the examples and utils. Added section into the documentation Index: index.html =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/doc/video/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.html 30 Aug 2005 19:12:52 -0000 1.2 --- index.html 18 Sep 2006 04:48:31 -0000 1.3 *************** *** 1 **** ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ARToolKit Video Library Configuration documentation</title> </head> <body> <h1>ARToolKit video configuration </h1> <p>When using ARToolKit to open a video stream, one of the following functions / code snippets is called:</p> <blockquote> <p><code>arVideoOpen(char *vconf);</code></p> </blockquote> <p>or</p> <blockquote> <p><code>AR2VideoParamT vid;<br> vid = ar2VideoOpen(char *vconf);</code></p> </blockquote> <p>These functions take a single parameter, vconf, which is a character string.</p> <p>This character string encapsulates operating-system dependent directions as to how to find, open and configure the video stream. In order to assist you in determining a set of parameters, the functions <code>arVideoDispOption();</code> or <code>ar2VideoDispOption();</code> are designed to output some help text. The text is reproduced here for your convenience.</p> <p>Select an operating system / driver for which you wish to view the help text</p> <ul> <li><a href="#VideoLinux1394Cam">VideoLinux1394Cam</a></li> <li><a href="#VideoLinuxDVCam">VideoLinuxDVCam</a></li> <li><a href="#VideoLinuxV4L">VideoLinuxV4L</a></li> <li><a href="#VideoMacOSX">VideoMacOSX</a></li> <li><a href="#VideoSGI">VideoSGI</a></li> <li><a href="#VideoWin32DirectShow">VideoWin32DirectShow</a> <ul> <li><a href="#VideoWin32DirectShow271">ARToolKit versions 2.71 and later</a></li> <li><a href="#VideoWin32DirectShow265">ARToolKit versions 2.65 to 2.70.1</a></li> </ul> </li> </ul> <p> </p> <a class="anchor" name="VideoLinux1394Cam"> <h2>VideoLinux1394Cam</h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: -node=N specifies detected node ID of a FireWire camera (-1: Any). -card=N specifies the FireWire adaptor id number (-1: Any). -mode=[320x240_YUV422|640x480_RGB|640x480_YUV411] specifies input image format. -rate=N specifies desired framerate of a FireWire camera. (1.875, 3.75, 7.5, 15, 30, 60) -[name]=N where name is brightness, iris, shutter, gain, saturation, gamma, sharpness (value must be a legal value for this parameter - use coriander to find what they are </pre> <a class="anchor" name="VideoLinuxDV"> <h2>VideoLinuxDV </h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: -mode=[PAL|NTSC] specifies TV signal mode. </pre> <a class="anchor" name="VideoLinuxV4L"> <h2>VideoLinuxV4L </h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: DEVICE CONTROLS: -dev=filepath specifies device file. -channel=N specifies source channel. -noadjust prevent adjusting the width/height/channel if not suitable. -width=N specifies expected width of image. -height=N specifies expected height of image. -palette=[RGB|YUV420P] specifies the camera palette (WARNING:all are not supported on each camera !!). IMAGE CONTROLS (WARNING: every options are not supported by all camera !!): -brightness=N specifies brightness. (0.0 <-> 1.0) -contrast=N specifies contrast. (0.0 <-> 1.0) -saturation=N specifies saturation (color). (0.0 <-> 1.0) (for color camera only) -hue=N specifies hue. (0.0 <-> 1.0) (for color camera only) -whiteness=N specifies whiteness. (0.0 <-> 1.0) (REMARK: gamma for some drivers, otherwise for greyscale camera only) -color=N specifies saturation (color). (0.0 <-> 1.0) (REMARK: obsolete !! use saturation control) OPTION CONTROLS: -mode=[PAL|NTSC|SECAM] specifies TV signal mode (for tv/capture card). </pre> <a class="anchor" name="VideoMacOSX"> <h2>VideoMacOSX </h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: -nodialog Don't display video settings dialog. -width=w Scale camera native image to width w. -height=h Scale camera native image to height h. -fps Overlay camera frame counter on image. -grabber=n With multiple QuickTime video grabber components installed, use component n (default n=1). N.B. It is NOT necessary to use this option if you have installed more than one video input device (e.g. two cameras) as the default QuickTime grabber can manage multiple video channels. -pixelformat=cccc Return images with pixels in format cccc, where cccc is either a numeric pixel format number or a valid 4-character-code for a pixel format. The following values are supported: 32, BGRA, RGBA, ABGR, 24, 24BG, 2vuy, yuvs. (See http://developer.apple.com/quicktime/icefloe/dispatch020.html.) </pre> <a class="anchor" name="VideoSGI"> <h2>VideoSGI </h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: -size=[FULL/HALF] specifies size of image. -device=N specifies device number. -bufsize=N specifies video buffer size. </pre> <a class="anchor" name="VideoWin32DirectShow"> <h2>VideoWin32DirectShow</h2> <a class="anchor" name="VideoWin32DirectShow271"> <h3>ARToolKit versions 2.71 and later </h3> <p>In ARToolKit 2.71 and later, the video configuration is specified in an XML file, conforming to the DSVideoLib XML Schema. This schema is documented in the file "DsVideoLib.xsd" inside the DSVL-0.0.8b package. You can use an <a href="http://www.w3.org/XML/Schema">XML Schema viewer</a> to view the schema file, and a text editor or XML editor to edit your own configuration file.</p> <p>The pathname of the configuration file is then specified in the video configuration string. </p> <blockquote><pre> parameter is a file name (e.g. 'config.XML') conforming to the DSVideoLib XML Schema (DsVideoLib.xsd). </pre></blockquote> <a class="anchor" name="VideoWin32DirectShow265"> <h3>ARToolKit versions 2.65 to 2.70.1</h3> <blockquote> <pre> parameter format is either NULL or a list of tokens, separated by commas "," BINARY TOKENS: -------------- flipH : flip image horizontally (WARNING: non-optimal performance) flipV : flip image vertically (WARNING: non-optimal performance) showDlg : displays either WDM capture filter's property page or MSDV decoder format dialog (depending on source media type). only applies to WDM_CAP, will be ignored for AVI_FILE loopAVI : continuously loops through an AVI file (applies only to AVI_FILE) noClock : does not use a Reference Clock to synchronize samples; use this flag for offline post-processing (applies only to AVI_FILE) renderSec : render secondary streams (applies only to AVI_FILE) An AVI file can contain an arbitrary number of multiplexed A/V substreams, usually there are at most 2 substreams (1st: video, 2nd: audio). the AVI_FILE input module will only try to render stream 0x00 (assuming that it's video) and ignore the remaning substreams. Use this flag to force IGraphBuilder->Render(IPin*) calls on substreams 1..n DO NOT SET this flag if your AVI file contains more than one video stream PARAMETRIZED TOKENS: -------------------- inputDevice=? : supported parameters: "WDM_CAP" (WDM_VIDEO_CAPTURE_FILTER) use the DirectShow WDM wrapper to obtain live video input from a streaming capture device such as a IEEE 1394 DV camera or USB webcam. OPTIONAL: set deviceName=? and/or ieee1394id=? for better control over the choice of suitable WDM drivers "AVI_FILE" (ASYNC_FILE_INPUT_FILTER) use an Asynchronous File Input Filter to read & decode AVI video data NOTE: be sure to specify the input file name by pointing fileName=? to a valid AVI file. EXAMPLE: "inputDevive=WDM_CAP", or "inputDevice=AVI_FILE" DEFAULT: "WDM_CAP" will be selected if you omit this token videoWidth=? : preferred video width, EXAMPLE: "videoWidth=720" only applies to WDM_CAP, will be ignored for AVI_FILE videoHeight=? : preferred video height, EXAMPLE: "videoHeight=576" only applies to WDM_CAP, will be ignored for AVI_FILE pixelFormat=? : internal pixel format (see PixelFormat.h for supported types) PERFORMANCE WARNING: Be sure to match your IDirect3DTexture/OpenGL texture formats to whatever you specify here, i.e. use PXtoOpenGL(format), PXtoD3D(format) for creating your textures! (see PixelFormat.h for details) EXAMPLE: "pixelFormat=PIXELFORMAT_RGB32" NOTE: if you omit the pixelFormat=? token, the global constant (default_PIXELFORMAT, usually PIXELFORMAT_RGB32) will be selected. friendlyName=? : only applies to WDM_CAP, will be IGNORED if "inputDevice=WDM_CAP" is not set. Used to select a preferred WDM device. WILL BE IGNORED IF deviceName=? IS SET."); (WARNING: WDM "friendly names" are locale-dependent), i.e. try to match substring <?> with the "friendly names" of enumerated DirectShow WDM wrappers (ksproxy.ax). EXAMPLE: "friendlyName=Microsoft DV Camera" for IEEE1394 DV devices "friendlyName=QuickCam" for Logitech QuickCam deviceName=? : only applies to WDM_CAP, will be IGNORED if "inputDevice=WDM_CAP" is not set. Used to select a preferred WDM device. WILL ALWAYS WILL OVERRIDE friendlyName=? i.e. try to match substring <?> with the "device names" of enumerated DirectShow WDM wrappers (ksproxy.ax). Device names look like: "@device:*:{860BB310-5D01-11d0-BD3B-00A0C911CE86} Use GraphEdit (part of the DirectX SDK, under \DXSDK\bin\DxUtils\graphedt.exe) to figure out your camera's device name. EXAMPLE: "deviceName=1394#unibrain&fire-i_1.2#4510000061431408 fileName=? : only applies to AVI_FILE, will be IGNORED if "inputDevice=AVI_FILE" is not set. input file name, if just use a file's name (without its full path), the WIN32 API fuction SearchPath() (Winbase.h) will be used to locate the file. EXAMPLE: "fileName=C:\Some Directory\Another Directory\Video.AVI" "fileName=video.AVI" (will succeed if C:\Some Directory\Another Directory\ is: * the application's startup directory * the current directory * listed in the PATH environment variable) ieee1394id=? : only applies to WDM_CAP, will be IGNORED if "inputDevice=WDM_CAP" is not set. Unique 64-bit device identifier, as defined by IEEE 1394. Hexadecimal value expected, i.e. "ieee1394id=437d3b0201460008" Use /bin/IEEE394_id.exe to determine your camera's ID. deinterlaceState=? : supported parameters (see VFX_STATE_names[]) "off" : disable deinterlacing (DEFAULT) "on" : force deinterlacing (even for progressive frames) "auto" : enable deinterlacing only if (VIDEOINFOHEADER.dwInterlaceFlags & AMINTERLACE_IsInterlaced) WARNING: EXPERIMENTAL FEATURE! deinterlaceMethod=? : deinterlacing method (see VFxDeinterlaceParam.h for supported modes) supported parameters (see DEINTERLACE_METHOD_names[]): "blend" : blend fields (best quality) "duplicate1" : duplicate first field "duplicate2" : duplicate second field NOTE: omitting this token results in default mode (DEINTERLACE_BLEND) being used. WARNING: EXPERIMENTAL FEATURE! EXAMPLES: arVideoOpen(NULL); arVideoOpen("inputDevice=WDM_CAP,showDlg"); arVideoOpen("inputDevice=WDM_CAP,flipH,flipV,showDlg"); arVideoOpen("inputDevice=WDM_CAP,pixelFormat=PIXELFORMAT_RGB24,showDlg"); arVideoOpen("inputDevice=WDM_CAP,showDlg,deinterlaceState=on,deinterlaceMethod=duplicate1"); arVideoOpen("inputDevice=WDM_CAP,videoWidth=640,flipH,videoHeight=480,showDlg,deinterlaceState=auto"); arVideoOpen("inputDevice=WDM_CAP,friendlyName=Microsoft DV Camera,videoWidth=720,videoHeight=480"); arVideoOpen("inputDevice=WDM_CAP,friendlyName=Logitech,videoWidth=320,videoHeight=240,flipV"); arVideoOpen("inputDevice=WDM_CAP,friendlyName=Microsoft DV Camera,ieee1394id=437d3b0201460008"); arVideoOpen("inputDevice=AVI_FILE,fileName=C:\Some Directory\Another Directory\Video.AVI"); arVideoOpen("inputDevice=AVI_FILE,fileName=Video.AVI,pixelFormat=PIXELFORMAT_RGB24"); </pre> </blockquote> </body> </html> \ No newline at end of file --- 1,19 ---- ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ARToolKit Video Library Configuration documentation</title> </head> <body> <h1>ARToolKit video configuration </h1> <p>When using ARToolKit to open a video stream, one of the following functions / code snippets is called:</p> <blockquote> <p><code>arVideoOpen(char *vconf);</code></p> </blockquote> <p>or</p> <blockquote> <p><code>AR2VideoParamT vid;<br> vid = ar2VideoOpen(char *vconf);</code></p> </blockquote> <p>These functions take a single parameter, vconf, which is a character string.</p> <p>This character string encapsulates operating-system dependent directions as to how to find, open and configure the video stream. In order to assist you in determining a set of parameters, the functions <code>arVideoDispOption();</code> or <code>ar2VideoDispOption();</code> are designed to output some help text. The text is reproduced here for your convenience.</p> <p>Select an operating system / driver for which you wish to view the help text</p> <ul> <li><a href="#VideoLinux1394Cam">VideoLinux1394Cam</a></li> ! <li><a href="#VideoGStreamer">VideoGStreamer</a></li> <li><a href="#VideoLinuxDVCam">VideoLinuxDVCam</a></li> <li><a href="#VideoLinuxV4L">VideoLinuxV4L</a></li> <li><a href="#VideoMacOSX">VideoMacOSX</a></li> <li><a href="#VideoSGI">VideoSGI</a></li> <li><a href="#VideoWin32DirectShow">VideoWin32DirectShow</a> <ul> <li><a href="#VideoWin32DirectShow271">ARToolKit versions 2.71 and later</a></li> <li><a href="#VideoWin32DirectShow265">ARToolKit versions 2.65 to 2.70.1</a></li> </ul> </li> </ul> <p> </p> <a class="anchor" name="VideoLinux1394Cam"> <h2>VideoLinux1394Cam</h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: -node=N specifies detected node ID of a FireWire camera (-1: Any). -card=N specifies the FireWire adaptor id number (-1: Any). -mode=[320x240_YUV422|640x480_RGB|640x480_YUV411] specifies input image format. -rate=N specifies desired framerate of a FireWire camera. (1.875, 3.75, 7.5, 15, 30, 60) -[name]=N where name is brightness, iris, shutter, gain, saturation, gamma, sharpness (value must be a legal value for this parameter - use coriander to find what they are </pre> ! ! <a class="anchor" name="VideoGStreamer"> <h2>VideoGStreamer</h2> <p> ! ARVideo via <a href="http://www.gstreamer.org">GStreamer</a> may be configured using a configuration string following the <code>gst-launch</code> syntax. Some examples (using the ARTOOLKIT_CONFIG environment variable, bash syntax): ! </p> ! ! <ul> ! <li>Loading a file from disk: <pre> ! $> export ARTOOLKIT_CONFIG="filesrc location=gstreamer_test_xvid.avi ! decodebin ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink" ! </pre> ! ! <li>Using a webcam on /dev/video0 through Video4Linux v2 (V4L2): ! <pre>$> export ARTOOLKIT_CONFIG="v4l2src device=/dev/video1 use-fixed-fps=false ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink" </pre> </li> ! ! The same strings can also directly been used within the code: ! <pre>arVideoOpen("videotestsrc ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink");</pre> ! ! </ul> <a class="anchor" name="VideoLinuxDV"> <h2>VideoLinuxDV </h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: -mode=[PAL|NTSC] specifies TV signal mode. </pre> <a class="anchor" name="VideoLinuxV4L"> <h2>VideoLinuxV4L </h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: DEVICE CONTROLS: -dev=filepath specifies device file. -channel=N specifies source channel. -noadjust prevent adjusting the width/height/channel if not suitable. -width=N specifies expected width of image. -height=N specifies expected height of image. -palette=[RGB|YUV420P] specifies the camera palette (WARNING:all are not supported on each camera !!). IMAGE CONTROLS (WARNING: every options are not supported by all camera !!): -brightness=N specifies brightness. (0.0 <-> 1.0) -contrast=N specifies contrast. (0.0 <-> 1.0) -saturation=N specifies saturation (color). (0.0 <-> 1.0) (for color camera only) -hue=N specifies hue. (0.0 <-> 1.0) (for color camera only) -whiteness=N specifies whiteness. (0.0 <-> 1.0) (REMARK: gamma for some drivers, otherwise for greyscale camera only) -color=N specifies saturation (color). (0.0 <-> 1.0) (REMARK: obsolete !! use saturation control) OPTION CONTROLS: -mode=[PAL|NTSC|SECAM] specifies TV signal mode (for tv/capture card). </pre> <a class="anchor" name="VideoMacOSX"> <h2>VideoMacOSX </h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: -nodialog Don't display video settings dialog. -width=w Scale camera native image to width w. -height=h Scale camera native image to height h. -fps Overlay camera frame counter on image. -grabber=n With multiple QuickTime video grabber components installed, use component n (default n=1). N.B. It is NOT necessary to use this option if you have installed more than one video input device (e.g. two cameras) as the default QuickTime grabber can manage multiple video channels. -pixelformat=cccc Return images with pixels in format cccc, where cccc is either a numeric pixel format number or a valid 4-character-code for a pixel format. The following values are supported: 32, BGRA, RGBA, ABGR, 24, 24BG, 2vuy, yuvs. (See http://developer.apple.com/quicktime/icefloe/dispatch020.html.) </pre> <a class="anchor" name="VideoSGI"> <h2>VideoSGI </h2> <pre> ARVideo may be configured using one or more of the following options, separated by a space: -size=[FULL/HALF] specifies size of image. -device=N specifies device number. -bufsize=N specifies video buffer size. </pre> <a class="anchor" name="VideoWin32DirectShow"> <h2>VideoWin32DirectShow</h2> <a class="anchor" name="VideoWin32DirectShow271"> <h3>ARToolKit versions 2.71 and later </h3> <p>In ARToolKit 2.71 and later, the video configuration is specified in an XML file, conforming to the DSVideoLib XML Schema. This schema is documented in the file "DsVideoLib.xsd" inside the DSVL-0.0.8b package. You can use an <a href="http://www.w3.org/XML/Schema">XML Schema viewer</a> to view the schema file, and a text editor or XML editor to edit your own configuration file.</p> <p>The pathname of the configuration file is then specified in the video configuration string. </p> <blockquote><pre> parameter is a file name (e.g. 'config.XML') conforming to the DSVideoLib XML Schema (DsVideoLib.xsd). </pre></blockquote> <a class="anchor" name="VideoWin32DirectShow265"> <h3>ARToolKit versions 2.65 to 2.70.1</h3> <blockquote> <pre> parameter format is either NULL or a list of tokens, separated by commas "," BINARY TOKENS: -------------- flipH : flip image horizontally (WARNING: non-optimal performance) flipV : flip image vertically (WARNING: non-optimal performance) showDlg : displays either WDM capture filter's property page or MSDV decoder format dialog (depending on source media type). only applies to WDM_CAP, will be ignored for AVI_FILE loopAVI : continuously loops through an AVI file (applies only to AVI_FILE) noClock : does not use a Reference Clock to synchronize samples; use this flag for offline post-processing (applies only to AVI_FILE) renderSec : render secondary streams (applies only to AVI_FILE) An AVI file can contain an arbitrary number of multiplexed A/V substreams, usually there are at most 2 substreams (1st: video, 2nd: audio). the AVI_FILE input module will only try to render stream 0x00 (assuming that it's video) and ignore the remaning substreams. Use this flag to force IGraphBuilder->Render(IPin*) calls on substreams 1..n DO NOT SET this flag if your AVI file contains more than one video stream PARAMETRIZED TOKENS: -------------------- inputDevice=? : supported parameters: "WDM_CAP" (WDM_VIDEO_CAPTURE_FILTER) use the DirectShow WDM wrapper to obtain live video input from a streaming capture device such as a IEEE 1394 DV camera or USB webcam. OPTIONAL: set deviceName=? and/or ieee1394id=? for better control over the choice of suitable WDM drivers "AVI_FILE" (ASYNC_FILE_INPUT_FILTER) use an Asynchronous File Input Filter to read & decode AVI video data NOTE: be sure to specify the input file name by pointing fileName=? to a valid AVI file. EXAMPLE: "inputDevive=WDM_CAP", or "inputDevice=AVI_FILE" DEFAULT: "WDM_CAP" will be selected if you omit this token videoWidth=? : preferred video width, EXAMPLE: "videoWidth=720" only applies to WDM_CAP, will be ignored for AVI_FILE videoHeight=? : preferred video height, EXAMPLE: "videoHeight=576" only applies to WDM_CAP, will be ignored for AVI_FILE pixelFormat=? : internal pixel format (see PixelFormat.h for supported types) PERFORMANCE WARNING: Be sure to match your IDirect3DTexture/OpenGL texture formats to whatever you specify here, i.e. use PXtoOpenGL(format), PXtoD3D(format) for creating your textures! (see PixelFormat.h for details) EXAMPLE: "pixelFormat=PIXELFORMAT_RGB32" NOTE: if you omit the pixelFormat=? token, the global constant (default_PIXELFORMAT, usually PIXELFORMAT_RGB32) will be selected. friendlyName=? : only applies to WDM_CAP, will be IGNORED if "inputDevice=WDM_CAP" is not set. Used to select a preferred WDM device. WILL BE IGNORED IF deviceName=? IS SET."); (WARNING: WDM "friendly names" are locale-dependent), i.e. try to match substring <?> with the "friendly names" of enumerated DirectShow WDM wrappers (ksproxy.ax). EXAMPLE: "friendlyName=Microsoft DV Camera" for IEEE1394 DV devices "friendlyName=QuickCam" for Logitech QuickCam deviceName=? : only applies to WDM_CAP, will be IGNORED if "inputDevice=WDM_CAP" is not set. Used to select a preferred WDM device. WILL ALWAYS WILL OVERRIDE friendlyName=? i.e. try to match substring <?> with the "device names" of enumerated DirectShow WDM wrappers (ksproxy.ax). Device names look like: "@device:*:{860BB310-5D01-11d0-BD3B-00A0C911CE86} Use GraphEdit (part of the DirectX SDK, under \DXSDK\bin\DxUtils\graphedt.exe) to figure out your camera's device name. EXAMPLE: "deviceName=1394#unibrain&fire-i_1.2#4510000061431408 fileName=? : only applies to AVI_FILE, will be IGNORED if "inputDevice=AVI_FILE" is not set. input file name, if just use a file's name (without its full path), the WIN32 API fuction SearchPath() (Winbase.h) will be used to locate the file. EXAMPLE: "fileName=C:\Some Directory\Another Directory\Video.AVI" "fileName=video.AVI" (will succeed if C:\Some Directory\Another Directory\ is: * the application's startup directory * the current directory * listed in the PATH environment variable) ieee1394id=? : only applies to WDM_CAP, will be IGNORED if "inputDevice=WDM_CAP" is not set. Unique 64-bit device identifier, as defined by IEEE 1394. Hexadecimal value expected, i.e. "ieee1394id=437d3b0201460008" Use /bin/IEEE394_id.exe to determine your camera's ID. deinterlaceState=? : supported parameters (see VFX_STATE_names[]) "off" : disable deinterlacing (DEFAULT) "on" : force deinterlacing (even for progressive frames) "auto" : enable deinterlacing only if (VIDEOINFOHEADER.dwInterlaceFlags & AMINTERLACE_IsInterlaced) WARNING: EXPERIMENTAL FEATURE! deinterlaceMethod=? : deinterlacing method (see VFxDeinterlaceParam.h for supported modes) supported parameters (see DEINTERLACE_METHOD_names[]): "blend" : blend fields (best quality) "duplicate1" : duplicate first field "duplicate2" : duplicate second field NOTE: omitting this token results in default mode (DEINTERLACE_BLEND) being used. WARNING: EXPERIMENTAL FEATURE! EXAMPLES: arVideoOpen(NULL); arVideoOpen("inputDevice=WDM_CAP,showDlg"); arVideoOpen("inputDevice=WDM_CAP,flipH,flipV,showDlg"); arVideoOpen("inputDevice=WDM_CAP,pixelFormat=PIXELFORMAT_RGB24,showDlg"); arVideoOpen("inputDevice=WDM_CAP,showDlg,deinterlaceState=on,deinterlaceMethod=duplicate1"); arVideoOpen("inputDevice=WDM_CAP,videoWidth=640,flipH,videoHeight=480,showDlg,deinterlaceState=auto"); arVideoOpen("inputDevice=WDM_CAP,friendlyName=Microsoft DV Camera,videoWidth=720,videoHeight=480"); arVideoOpen("inputDevice=WDM_CAP,friendlyName=Logitech,videoWidth=320,videoHeight=240,flipV"); arVideoOpen("inputDevice=WDM_CAP,friendlyName=Microsoft DV Camera,ieee1394id=437d3b0201460008"); arVideoOpen("inputDevice=AVI_FILE,fileName=C:\Some Directory\Another Directory\Video.AVI"); arVideoOpen("inputDevice=AVI_FILE,fileName=Video.AVI,pixelFormat=PIXELFORMAT_RGB24"); </pre> </blockquote> </body> </html> |
From: Hartmut S. <ret...@us...> - 2006-09-18 04:48:39
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleLite In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28053/examples/simpleLite Modified Files: simpleLite.c Log Message: implemented (read as: copied code) Waynes proposed ARTOOLKIT_CONFIG for GStreamer. Removed all GStreamer related example configuration strings from the examples and utils. Added section into the documentation Index: simpleLite.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simpleLite/simpleLite.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** simpleLite.c 10 Jul 2006 04:35:17 -0000 1.16 --- simpleLite.c 18 Sep 2006 04:48:33 -0000 1.17 *************** *** 423,429 **** #elif defined(__linux) # if defined(AR_INPUT_GSTREAMER) ! //"gst_arttoolkit.xml"; ! //"filesrc location=gstreamer_test_xvid.avi ! decodebin ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; ! " videotestsrc ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; # else "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; --- 423,427 ---- #elif defined(__linux) # if defined(AR_INPUT_GSTREAMER) ! ""; # else "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; |
From: Hartmut S. <ret...@us...> - 2006-09-18 04:48:39
|
Update of /cvsroot/artoolkit/artoolkit/examples/simple In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28053/examples/simple Modified Files: simpleTest.c Log Message: implemented (read as: copied code) Waynes proposed ARTOOLKIT_CONFIG for GStreamer. Removed all GStreamer related example configuration strings from the examples and utils. Added section into the documentation Index: simpleTest.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simple/simpleTest.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** simpleTest.c 15 Sep 2006 03:41:14 -0000 1.9 --- simpleTest.c 18 Sep 2006 04:48:33 -0000 1.10 *************** *** 26,34 **** #elif defined (__linux) #if defined (AR_INPUT_GSTREAMER) ! /* possible streams ! "filesrc location=gstreamer_test_xvid.avi ! decodebin ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; ! "v4l2src device=/dev/video1 use-fixed-fps=false ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; ! */ ! " videotestsrc ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; #elif defined (AR_INPUT_V4L) "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; --- 26,30 ---- #elif defined (__linux) #if defined (AR_INPUT_GSTREAMER) ! ""; #elif defined (AR_INPUT_V4L) "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; |
From: Hartmut S. <ret...@us...> - 2006-09-18 04:48:39
|
Update of /cvsroot/artoolkit/artoolkit/util/videoTest In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28053/util/videoTest Modified Files: videoTest.c Log Message: implemented (read as: copied code) Waynes proposed ARTOOLKIT_CONFIG for GStreamer. Removed all GStreamer related example configuration strings from the examples and utils. Added section into the documentation Index: videoTest.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/videoTest/videoTest.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** videoTest.c 10 Jul 2006 04:35:17 -0000 1.8 --- videoTest.c 18 Sep 2006 04:48:34 -0000 1.9 *************** *** 26,32 **** #elif defined(__linux) # if defined(AR_INPUT_GSTREAMER) ! //"gst_arttoolkit.xml"; ! //"filesrc location=gstreamer_test_xvid.avi ! decodebin ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; ! " videotestsrc ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; # else "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; --- 26,30 ---- #elif defined(__linux) # if defined(AR_INPUT_GSTREAMER) ! ""; # else "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; |
From: Hartmut S. <ret...@us...> - 2006-09-18 04:48:38
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoGStreamer In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28053/lib/SRC/VideoGStreamer Modified Files: video.c Log Message: implemented (read as: copied code) Waynes proposed ARTOOLKIT_CONFIG for GStreamer. Removed all GStreamer related example configuration strings from the examples and utils. Added section into the documentation Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoGStreamer/video.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** video.c 8 Aug 2006 03:33:45 -0000 1.4 --- video.c 18 Sep 2006 04:48:33 -0000 1.5 *************** *** 92,95 **** --- 92,124 ---- } + void + testing_pad(GstPad *pad) + { + const GstCaps *caps; + GstStructure *str; + + gint width,height; + gdouble rate; + + caps=gst_pad_get_negotiated_caps(pad); + + if (caps) { + str=gst_caps_get_structure(caps,0); + + /* Get some data about the frame */ + gst_structure_get_int(str,"width",&width); + gst_structure_get_int(str,"height",&height); + gst_structure_get_double(str,"framerate",&rate); + + g_print("libARvideo: GStreamer negotiated %dx%d\n",width,height); + } else { + return; + #if 0 + g_print("Nothing yet!"); + #endif + + } + } + int *************** *** 157,164 **** GError *error = 0; int i; ! GstPad *pad; GstXML *xml; GstStateChangeReturn _ret; /* initialise GStreamer */ gst_init(0,0); --- 186,209 ---- GError *error = 0; int i; ! GstPad *pad, *peerpad; GstXML *xml; GstStateChangeReturn _ret; + /* following plainly copied from Wayne :) */ + /* If no config string is supplied, we should use the environment variable otherwise set a sane default */ + if (!strcmp (config, "")) { + + /* None suppplied, lets see if the user supplied one from the shell */ + char *envconf = getenv ("ARTOOLKIT_CONFIG"); + if ((envconf != NULL) && (strcmp (envconf, ""))) { + config = envconf; + printf ("Using config string from environment [%s]\n", config); + } + else { + g_printf ("No config string supplied, please consult documentation\n"); + } + } else + g_print ("Using supplied config string [%s]\n", config); + /* initialise GStreamer */ gst_init(0,0); *************** *** 210,216 **** gst_pad_add_buffer_probe (pad, G_CALLBACK (cb_have_data), vid); ! /* dismiss the pad */ ! gst_object_unref (pad); /* request ready state */ gst_element_set_state (vid->pipeline, GST_STATE_READY); --- 255,261 ---- gst_pad_add_buffer_probe (pad, G_CALLBACK (cb_have_data), vid); ! + #if 0 /* request ready state */ gst_element_set_state (vid->pipeline, GST_STATE_READY); *************** *** 222,228 **** --- 267,281 ---- g_print ("libARvideo: GStreamer pipeline is READY!\n"); } + #endif /* Needed to fill the information for ARVidInfo */ gst_element_set_state (vid->pipeline, GST_STATE_PAUSED); + + peerpad = gst_pad_get_peer(pad); + + testing_pad(peerpad); + + /* dismiss the pad */ + gst_object_unref (pad); /* wait until it's up and running or failed */ |
From: Wayne P. <ti...@us...> - 2006-09-15 04:44:25
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv4723 Modified Files: video.c Log Message: Some compilers complained about this comment having a comment inside it due to the formatting, I have removed the /* and replaced with / to keep these compilers happy with no warnings. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** video.c 15 Sep 2006 04:06:18 -0000 1.11 --- video.c 15 Sep 2006 04:44:21 -0000 1.12 *************** *** 565,569 **** /* Decide on where the video1394 device nodes are, they can be either at ! /dev/video1394/* or /dev/video1394-* depending on the distribution */ struct stat video_stat; if (stat ("/dev/video1394", &video_stat) < 0) --- 565,569 ---- /* Decide on where the video1394 device nodes are, they can be either at ! /dev/video1394/ or /dev/video1394-* depending on the distribution */ struct stat video_stat; if (stat ("/dev/video1394", &video_stat) < 0) |
From: Wayne P. <ti...@us...> - 2006-09-15 04:06:20
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv22669 Modified Files: video.c Log Message: Added more descriptions about latest changes Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** video.c 15 Sep 2006 03:55:22 -0000 1.10 --- video.c 15 Sep 2006 04:06:18 -0000 1.11 *************** *** 68,75 **** * * ! * Revision: 1.3 Date: 2006/09/4 ( wa...@cs... ) * - Stabilised interfaces around latest libdc1394 libraries * - Added various other cleanups and bug fixes to make the code more stable * - Added licensing allowing LGPL or existing GPL with permission from original authors * */ --- 68,77 ---- * * ! * Revision: 1.3 Date: 2006/09/16 ( wa...@cs... ) * - Stabilised interfaces around latest libdc1394 libraries * - Added various other cleanups and bug fixes to make the code more stable * - Added licensing allowing LGPL or existing GPL with permission from original authors + * - Rearranged various constants from AR/config.h to make things easier to understand + * - Better config string support with ARTOOLKIT_CONFIG to override defaults from the shell * */ |
From: Wayne P. <ti...@us...> - 2006-09-15 04:06:07
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv22304 Modified Files: Makefile.in Log Message: We have to force -O3 compilation in the Bayer decoding section because it has to be highly inlined and optimised, otherwise the code runs so slow it is unusable. Index: Makefile.in =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.in 4 Sep 2006 08:37:41 -0000 1.2 --- Makefile.in 15 Sep 2006 04:06:04 -0000 1.3 *************** *** 7,12 **** # compiler # CC= cc ! CFLAG= @CFLAG@ -I$(INC_DIR) # # For making the library --- 7,14 ---- # compiler # + # Note we hard code in -O3 here because the Bayer decoder needs to be highly + # optimised otherwise it runs so slow you can't use it! CC= cc ! CFLAG= @CFLAG@ -I$(INC_DIR) -O3 # # For making the library |
From: Wayne P. <ti...@us...> - 2006-09-15 04:05:07
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv21913 Modified Files: ChangeLog.txt Log Message: New description of Wayne's latest changes Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/ChangeLog.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ChangeLog.txt 10 Jul 2006 04:35:17 -0000 1.8 --- ChangeLog.txt 15 Sep 2006 04:05:05 -0000 1.9 *************** *** 9,12 **** --- 9,13 ---- - Linux builds: Support for gstreamer video capture added, thanks to Hartmut Seichter. - Mac OS X: Two new video config tokens are now available; -fliph and -flipv, which will mirror the video image horizontally and vertically respectively. + - Linux 1394 DC: Major changes to add PointGray DragonFly support, add LGPL/GPL license info, better config string support, stabilised interfaces, lots of clean ups to make the code easier to work with *************** *** 112,114 **** -- ! EOF \ No newline at end of file --- 113,115 ---- -- ! EOF |
From: Wayne P. <ti...@us...> - 2006-09-15 03:55:25
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv19162/lib/SRC/VideoLinux1394Cam Modified Files: video.c Log Message: There are a lot of constants which are internal to the video driver and there is no need to have it in this generic high-level include file. I have moved the 1394 related constants into the video.c file, and in the future we might do the same to all the other drivers as well. This change makes new changes easier to understand. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** video.c 15 Sep 2006 03:44:54 -0000 1.9 --- video.c 15 Sep 2006 03:55:22 -0000 1.10 *************** *** 118,121 **** --- 118,145 ---- + + + /* Defines that control various aspects of this code */ + #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 + #define DEFAULT_VIDEO_MODE VIDEO_MODE_640x480_YUV411_HALF + #define DEFAULT_VIDEO_FRAME_RATE VIDEO_FRAME_RATE_30 + + + + /* Error checking to ensure we have a proper configuration, and put some debugging out */ #ifdef LIBDC_8 |
From: Wayne P. <ti...@us...> - 2006-09-15 03:55:25
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv19162/include/AR Modified Files: config.h.in Log Message: There are a lot of constants which are internal to the video driver and there is no need to have it in this generic high-level include file. I have moved the 1394 related constants into the video.c file, and in the future we might do the same to all the other drivers as well. This change makes new changes easier to understand. Index: config.h.in =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/config.h.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** config.h.in 15 Sep 2006 03:08:18 -0000 1.9 --- config.h.in 15 Sep 2006 03:55:22 -0000 1.10 *************** *** 124,144 **** # ifdef AR_INPUT_1394CAM ! # 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 ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_640x480_YUV411_HALF ! # define DEFAULT_VIDEO_FRAME_RATE VIDEO_FRAME_RATE_30 # endif --- 124,128 ---- # ifdef AR_INPUT_1394CAM ! /* Defines all moved into video.c now - they are not used anywhere else */ # endif |
From: Wayne P. <ti...@us...> - 2006-09-15 03:44:57
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv17128 Modified Files: video.c Log Message: Various clean ups to make the error reporting consistent Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** video.c 15 Sep 2006 03:41:14 -0000 1.8 --- video.c 15 Sep 2006 03:44:54 -0000 1.9 *************** *** 164,173 **** { if( gVid != NULL ) { ! printf("Device has been opened!!\n"); ! return -1; } gVid = ar2VideoOpen( config ); ! if( gVid == NULL ) return -1; ! return 0; } --- 164,174 ---- { if( gVid != NULL ) { ! fprintf(stderr, "The device has already been opened!\n"); ! exit (1); } gVid = ar2VideoOpen( config ); ! if (gVid == NULL) ! return (-1); ! return 0; } *************** *** 235,239 **** int ar2VideoDispOption( void ) { ! printf("\n"); printf("ARVideo may be configured using one or more of the following options, separated by a space:\n\n"); printf(" -node=N\n"); --- 236,240 ---- int ar2VideoDispOption( void ) { ! printf ("\n"); printf("ARVideo may be configured using one or more of the following options, separated by a space:\n\n"); printf(" -node=N\n"); *************** *** 287,306 **** if (!strcmp (config, "")) { ! /* None suppplied, lets see if the user supplied one from the shell */ char *envconf = getenv ("ARTOOLKIT_CONFIG"); if ((envconf != NULL) && (strcmp (envconf, ""))) ! { ! config = envconf; ! printf ("Using config string from environment [%s]\n", config); ! } ! else ! { ! printf ("No config string supplied, assuming 640x480 with YUV411 encoding\n"); ! } } else printf ("Using supplied config string [%s]\n", config); - a = config; if( a != NULL) { --- 288,306 ---- if (!strcmp (config, "")) { ! /* None suppplied, lets see if the user supplied one from the shell */ char *envconf = getenv ("ARTOOLKIT_CONFIG"); if ((envconf != NULL) && (strcmp (envconf, ""))) ! { ! config = envconf; ! printf ("Using config string from environment [%s]\n", config); ! } ! else ! { ! printf ("No config string supplied, assuming 640x480 with YUV411 encoding\n"); ! } } else printf ("Using supplied config string [%s]\n", config); a = config; if( a != NULL) { *************** *** 449,453 **** break; default: ! printf("Sorry, Unsupported Frame Rate for IEEE1394 Camera.\n"); exit(1); } --- 449,453 ---- break; default: ! fprintf(stderr, "Sorry, Unsupported Frame Rate for IEEE1394 Camera.\n"); exit(1); } *************** *** 612,616 **** if(vid->status != 0 && vid->status != 3){ ! printf("arVideoCapStart has already been called.\n"); return -1; } --- 612,616 ---- if(vid->status != 0 && vid->status != 3){ ! fprintf(stderr, "arVideoCapStart has already been called.\n"); return -1; } *************** *** 667,671 **** { if(vid->status == 0 || vid->status == 3){ ! printf("arVideoCapStart has never been called.\n"); return -1; } --- 667,671 ---- { if(vid->status == 0 || vid->status == 3){ ! fprintf(stderr, "arVideoCapStart has never been called.\n"); return -1; } *************** *** 685,689 **** } if(vid->status == 0){ ! printf("arVideoCapStart has never been called.\n"); return -1; } --- 685,689 ---- } if(vid->status == 0){ ! fprintf(stderr, "arVideoCapStart has never been called.\n"); return -1; } *************** *** 691,695 **** if( dc1394_stop_iso_transmission(arV1394.handle, vid->node) != DC1394_SUCCESS ) { ! printf("couldn't stop the camera?\n"); return -1; } --- 691,695 ---- if( dc1394_stop_iso_transmission(arV1394.handle, vid->node) != DC1394_SUCCESS ) { ! fprintf(stderr, "couldn't stop the camera?\n"); return -1; } *************** *** 717,730 **** if(vid->status == 0){ ! printf("arVideoCapStart has never been called.\n"); return NULL; } if(vid->status == 2){ ! printf("arVideoCapNext has never been called since previous arVideoGetImage.\n"); return NULL; } if( dc1394_dma_single_capture( &(vid->camera) ) != DC1394_SUCCESS ) { ! fprintf( stderr, "unable to capture a frame\n"); return NULL; } --- 717,730 ---- if(vid->status == 0){ ! fprintf(stderr, "arVideoCapStart has never been called.\n"); return NULL; } if(vid->status == 2){ ! fprintf(stderr, "arVideoCapNext has never been called since previous arVideoGetImage.\n"); return NULL; } if( dc1394_dma_single_capture( &(vid->camera) ) != DC1394_SUCCESS ) { ! fprintf(stderr, "unable to capture a frame\n"); return NULL; } *************** *** 772,781 **** break; case 0x59595959: /* YYYY = BW */ ! printf ("Camera is black and white, Bayer conversion is not possible\n"); exit (1); default: if (prev_pattern == -1) { ! printf ("Camera BAYER_TILE_MAPPING register has an unexpected value 0x%x on initial startup, which should not occur\n", qValue); exit (1); } --- 772,781 ---- break; case 0x59595959: /* YYYY = BW */ ! fprintf (stderr, "Camera is black and white, Bayer conversion is not possible\n"); exit (1); default: if (prev_pattern == -1) { ! fprintf (stderr, "Camera BAYER_TILE_MAPPING register has an unexpected value 0x%x on initial startup, which should not occur\n", qValue); exit (1); } *************** *** 783,787 **** { /* This is a wierd bug where occasionally you get an invalid register value and I have no idea why this is */ ! printf ("WARNING! The BAYER_TILE_MAPPING register has an unexpected value 0x%x, but I was able to use the previous stored result\n", qValue); pattern = prev_pattern; } --- 783,787 ---- { /* This is a wierd bug where occasionally you get an invalid register value and I have no idea why this is */ ! fprintf (stderr, "WARNING! The BAYER_TILE_MAPPING register has an unexpected value 0x%x, but I was able to use the previous stored result\n", qValue); pattern = prev_pattern; } |
From: Wayne P. <ti...@us...> - 2006-09-15 03:41:16
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv15899/lib/SRC/VideoLinux1394Cam Modified Files: video.c Log Message: Rather than hard coding config strings into each test application, we will now be moving towards putting defaults into each video module and then just overriding them where needed. I have made the changes for the 1394DC code as a proof of concept, and fixed up simpleTest to do it this way. Also, on Linux we can use ARTOOLKIT_CONFIG to override the video string from the command line if there is nothing supplied by default in the calling app, this is nice for changing camera parameters without needing a recompile. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** video.c 4 Sep 2006 08:49:20 -0000 1.7 --- video.c 15 Sep 2006 03:41:14 -0000 1.8 *************** *** 235,240 **** 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(" -node=N\n"); printf(" specifies detected node ID of a FireWire camera (-1: Any).\n"); --- 235,240 ---- int ar2VideoDispOption( void ) { ! printf("\n"); ! printf("ARVideo may be configured using one or more of the following options, separated by a space:\n\n"); printf(" -node=N\n"); printf(" specifies detected node ID of a FireWire camera (-1: Any).\n"); *************** *** 249,252 **** --- 249,254 ---- printf(" (value must be a legal value for this parameter - use coriander to find what they are\n"); printf("\n"); + printf(" Note that if no config string is supplied, you can override it with the environment variable ARTOOLKIT_CONFIG\n"); + printf("\n"); return 0; *************** *** 282,286 **** vid->status = 0; ! printf ("Processing config string [%s]\n", config); a = config; --- 284,305 ---- vid->status = 0; ! /* If no config string is supplied, we should use the environment variable otherwise set a sane default */ ! if (!strcmp (config, "")) ! { ! /* None suppplied, lets see if the user supplied one from the shell */ ! char *envconf = getenv ("ARTOOLKIT_CONFIG"); ! if ((envconf != NULL) && (strcmp (envconf, ""))) ! { ! config = envconf; ! printf ("Using config string from environment [%s]\n", config); ! } ! else ! { ! printf ("No config string supplied, assuming 640x480 with YUV411 encoding\n"); ! } ! } ! else ! printf ("Using supplied config string [%s]\n", config); ! a = config; |
From: Wayne P. <ti...@us...> - 2006-09-15 03:41:16
|
Update of /cvsroot/artoolkit/artoolkit/examples/simple In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv15899/examples/simple Modified Files: simpleTest.c Log Message: Rather than hard coding config strings into each test application, we will now be moving towards putting defaults into each video module and then just overriding them where needed. I have made the changes for the 1394DC code as a proof of concept, and fixed up simpleTest to do it this way. Also, on Linux we can use ARTOOLKIT_CONFIG to override the video string from the command line if there is nothing supplied by default in the calling app, this is nice for changing camera parameters without needing a recompile. Index: simpleTest.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simple/simpleTest.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** simpleTest.c 4 Aug 2006 06:40:46 -0000 1.8 --- simpleTest.c 15 Sep 2006 03:41:14 -0000 1.9 *************** *** 24,29 **** #elif defined(__APPLE__) ""; ! #elif defined(__linux) ! # if defined(AR_INPUT_GSTREAMER) /* possible streams "filesrc location=gstreamer_test_xvid.avi ! decodebin ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; --- 24,29 ---- #elif defined(__APPLE__) ""; ! #elif defined (__linux) ! #if defined (AR_INPUT_GSTREAMER) /* possible streams "filesrc location=gstreamer_test_xvid.avi ! decodebin ! ffmpegcolorspace ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; *************** *** 31,39 **** */ " videotestsrc ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; ! # else "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; ! # endif #else ! ""; #endif --- 31,45 ---- */ " videotestsrc ! capsfilter caps=video/x-raw-rgb,bpp=24 ! identity name=artoolkit ! fakesink"; ! #elif defined (AR_INPUT_V4L) "-dev=/dev/video0 -channel=0 -palette=YUV420P -width=320 -height=240"; ! #elif defined (AR_INPUT_DV) ! ""; ! #elif defined (AR_INPUT_1394CAM) ! ""; #else ! #error Unknown Linux video interface type ! #endif /* __linux */ ! #else ! #error Unknown system type (Win32, Apple, SGI, or Linux only) #endif |
From: Wayne P. <ti...@us...> - 2006-09-15 03:08:45
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_distortion In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6406/util/calib_distortion Modified Files: calib_dist.c Log Message: The DRAGONFLY flag in the Linux 1394 DC code was never implemented properly or used for anything. Since we now have proper DragonFly camera support in the video 1394 code, I have removed this flag because otherwise it will be confusing for future developers. Index: calib_dist.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_distortion/calib_dist.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** calib_dist.c 30 Jun 2006 04:38:40 -0000 1.14 --- calib_dist.c 15 Sep 2006 03:08:18 -0000 1.15 *************** *** 66,74 **** char *vconf = "-width=640 -height=480"; # elif defined(AR_INPUT_1394CAM) - # ifndef DRAGONFLY char *vconf = "-mode=640x480_YUV411"; - # else - char *vconf = "-mode=640x480_MONO_COLOR"; - # endif # elif defined(AR_INPUT_DV) char *vconf = ""; --- 66,70 ---- |
From: Wayne P. <ti...@us...> - 2006-09-15 03:08:45
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_camera2 In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6406/util/calib_camera2 Modified Files: main.c Log Message: The DRAGONFLY flag in the Linux 1394 DC code was never implemented properly or used for anything. Since we now have proper DragonFly camera support in the video 1394 code, I have removed this flag because otherwise it will be confusing for future developers. Index: main.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_camera2/main.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** main.c 30 Jun 2006 04:38:40 -0000 1.12 --- main.c 15 Sep 2006 03:08:18 -0000 1.13 *************** *** 66,74 **** static char *vconf = "-width=640 -height=480"; # elif defined(AR_INPUT_1394CAM) - # ifndef DRAGONFLY static char *vconf = "-mode=640x480_YUV411"; - # else - static char *vconf = "-mode=640x480_MONO_COLOR"; - # endif # elif defined(AR_INPUT_DV) static char *vconf = ""; --- 66,70 ---- |
From: Wayne P. <ti...@us...> - 2006-09-15 03:08:45
|
Update of /cvsroot/artoolkit/artoolkit/util/calib_cparam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6406/util/calib_cparam Modified Files: calib_cparam.c Log Message: The DRAGONFLY flag in the Linux 1394 DC code was never implemented properly or used for anything. Since we now have proper DragonFly camera support in the video 1394 code, I have removed this flag because otherwise it will be confusing for future developers. Index: calib_cparam.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/calib_cparam/calib_cparam.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** calib_cparam.c 30 Jun 2006 04:38:40 -0000 1.13 --- calib_cparam.c 15 Sep 2006 03:08:18 -0000 1.14 *************** *** 66,74 **** char *vconf = "-width=640 -height=480"; # elif defined(AR_INPUT_1394CAM) - # ifndef DRAGONFLY char *vconf = "-mode=640x480_YUV411"; - # else - char *vconf = "-mode=640x480_MONO_COLOR"; - # endif # elif defined(AR_INPUT_DV) char *vconf = ""; --- 66,70 ---- |
From: Wayne P. <ti...@us...> - 2006-09-15 03:08:45
|
Update of /cvsroot/artoolkit/artoolkit/util/mk_patt In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6406/util/mk_patt Modified Files: mk_patt.c Log Message: The DRAGONFLY flag in the Linux 1394 DC code was never implemented properly or used for anything. Since we now have proper DragonFly camera support in the video 1394 code, I have removed this flag because otherwise it will be confusing for future developers. Index: mk_patt.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/util/mk_patt/mk_patt.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mk_patt.c 30 Jun 2006 04:38:40 -0000 1.9 --- mk_patt.c 15 Sep 2006 03:08:18 -0000 1.10 *************** *** 63,71 **** char *vconf = "-width=640 -height=480"; # elif defined(AR_INPUT_1394CAM) - # ifndef DRAGONFLY char *vconf = "-mode=640x480_YUV411"; - # else - char *vconf = "-mode=640x480_MONO_COLOR"; - # endif # elif defined(AR_INPUT_DV) char *vconf = ""; --- 63,67 ---- |
From: Wayne P. <ti...@us...> - 2006-09-15 03:08:45
|
Update of /cvsroot/artoolkit/artoolkit In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6406 Modified Files: Configure Log Message: The DRAGONFLY flag in the Linux 1394 DC code was never implemented properly or used for anything. Since we now have proper DragonFly camera support in the video 1394 code, I have removed this flag because otherwise it will be confusing for future developers. Index: Configure =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/Configure,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Configure 30 Jun 2006 13:13:13 -0000 1.7 --- Configure 15 Sep 2006 03:08:17 -0000 1.8 *************** *** 75,92 **** LIBS="-lglut -lGLU -lGL -lXi -lXmu -lX11 -lm -lraw1394 -ldc1394_control" CONFIG="AR_INPUT_1394CAM" - - echo "Do you use a DragonFly as the default camera? (y or n)" - echo -n "Enter : " - read ANS - if ( [ "$ANS" = "y" ] || [ "$ANS" = "Y" ] || [ "$ANS" = "yes" ] || [ "$ANS" = "YES" ]) - then - DRAGON="y" - elif ( [ "$ANS" = "n" ] || [ "$ANS" = "N" ] || [ "$ANS" = "no" ] || [ "$ANS" = "NO" ]) - then - DRAGON="n" - else - echo "Please enter y or n." - exit 0 - fi elif [ "$ANS" = "5" ] then --- 75,78 ---- *************** *** 206,216 **** fi - if [ "$DRAGON" = "y" ] - then - cat >> $SED <<EOF - s/#undef DRAGONFLY/#define DRAGONFLY/ - EOF - fi - if [ "$APPLE_FAST_TEX" = "y" ] then --- 192,195 ---- |
From: Wayne P. <ti...@us...> - 2006-09-15 03:08:45
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6406/include/AR Modified Files: config.h.in Log Message: The DRAGONFLY flag in the Linux 1394 DC code was never implemented properly or used for anything. Since we now have proper DragonFly camera support in the video 1394 code, I have removed this flag because otherwise it will be confusing for future developers. Index: config.h.in =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/config.h.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** config.h.in 30 Jun 2006 04:38:40 -0000 1.8 --- config.h.in 15 Sep 2006 03:08:18 -0000 1.9 *************** *** 124,128 **** # ifdef AR_INPUT_1394CAM - #undef DRAGONFLY # define VIDEO_NODE_ANY -1 # define VIDEO_MODE_320x240_YUV422 32 --- 124,127 ---- *************** *** 140,148 **** # 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 --- 139,143 ---- # define VIDEO_FRAME_RATE_60 6 # define DEFAULT_VIDEO_NODE VIDEO_NODE_ANY ! # define DEFAULT_VIDEO_MODE VIDEO_MODE_640x480_YUV411_HALF # define DEFAULT_VIDEO_FRAME_RATE VIDEO_FRAME_RATE_30 # endif |
From: Wayne P. <ti...@us...> - 2006-09-04 08:49:26
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28025/lib/SRC/VideoLinux1394Cam Modified Files: video.c Log Message: Need to use AR_PIX_SIZE_DEFAULT now Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** video.c 4 Sep 2006 08:43:12 -0000 1.6 --- video.c 4 Sep 2006 08:49:20 -0000 1.7 *************** *** 564,568 **** } ! arMalloc( vid->image, ARUint8, (vid->camera.frame_width * vid->camera.frame_height * AR_PIX_SIZE) ); return vid; --- 564,568 ---- } ! arMalloc( vid->image, ARUint8, (vid->camera.frame_width * vid->camera.frame_height * AR_PIX_SIZE_DEFAULT) ); return vid; |
From: Wayne P. <ti...@us...> - 2006-09-04 08:43:15
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv25008 Modified Files: video.c Log Message: This is a major change which includes a number of new features. I have added support for Bayer image decoding, which is needed to get colour images from high-end cameras like those from Point Gray like the Dragonfly. This support was added by integrating in files from the grabdma demo from Point Gray. It is basically done transparently and it will auto-detect the type of camera that you have and use this code if the camera shows up as being mono. A number of other patches were also merged in, fixing up various little bugs, incorrect exit codes, better error messages, and so forth. Also, the licensing information was updated in this file to reflect that the VideoLinux1394 code (but nothing else) is dual-licensed under LGPL and GPL. You can chose the license of your choice. I asked permission from all the copyright holders (Kato, Kiyokawa, and myself Piekarski) and we all agreed that it was ok to do this. So the VideoLinux1394 code can be used in other LGPL projects as well. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** video.c 23 May 2006 01:42:41 -0000 1.5 --- video.c 4 Sep 2006 08:43:12 -0000 1.6 *************** *** 1,2 **** --- 1,46 ---- + /* + 1394 Linux Firewire Digital Camera Interface + Copyright (C) 2002 - 2006 + Kiyoshi Kiyokawa (ki...@cr...) + Hirokazu Kato (ka...@sy...) + Wayne Piekarski (wa...@cs...) + + $Id$ + This source file is dual licensed under either the GPL or the LGPL license + by the authors of this software. + + -- + + This program 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. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + -- + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + /* * Revision: 1.0 Date: 2002/01/01 *************** *** 13,18 **** * - 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. * */ --- 57,75 ---- * - 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. ! * - (Removed in later 1.3 changes by Wayne) ! * ! * ! * Revision: 1.2 Date: 2005/07/20 ! * Modifications by Wayne Piekarski ( wa...@cs... ) ! * - Added support for Bayer image tiling for Point Grey DragonFly cameras ! * ! * ! * Revision: 1.3 Date: 2006/09/4 ( wa...@cs... ) ! * - Stabilised interfaces around latest libdc1394 libraries ! * - Added various other cleanups and bug fixes to make the code more stable ! * - Added licensing allowing LGPL or existing GPL with permission from original authors * */ *************** *** 46,51 **** /* ----------------------- MAKE ANY #define CHANGES HERE ONLY -------------------------------- */ ! /* This define controls if we use the new or old libDC1394 API functions. The new code is much ! more stable for multiple cameras and so is recommended */ // #define LIBDC_8 // #define LIBDC_9 --- 103,109 ---- /* ----------------------- MAKE ANY #define CHANGES HERE ONLY -------------------------------- */ ! /* This define controls if we use the new or old libDC1394 API functions. In the past there were ! many development releases, but the latest 1.0.0 release is stable and modern Linux distributions ! have all standardised on this, so there is no need to make changes here any more. */ // #define LIBDC_8 // #define LIBDC_9 *************** *** 68,82 **** #ifdef LIBDC_9 ! #warning Compiling using the newer and safer 0.9.1 libDC library (multiple camera support) - debian: libdc1394-9-dev #define LIBDC_DEF #endif #ifdef LIBDC_10 ! #warning Compiling using the newer and safer 0.9.5 libDC library (multiple camera support) - debian: libdc1394-10-dev #define LIBDC_DEF #endif #ifdef LIBDC_11 ! #warning Compiling using the 1.0.0 libDC library #define LIBDC_DEF #endif --- 126,140 ---- #ifdef LIBDC_9 ! #warning Compiling using an older 0.9.1 libDC library (multiple camera support) - debian: libdc1394-9-dev #define LIBDC_DEF #endif #ifdef LIBDC_10 ! #warning Compiling using an older 0.9.5 libDC library (multiple camera support) - debian: libdc1394-10-dev #define LIBDC_DEF #endif #ifdef LIBDC_11 ! // #warning Compiling using the stable 1.0.0 libDC library (multiple camera support) - debian: libdc1394-11-dev #define LIBDC_DEF #endif *************** *** 89,92 **** --- 147,157 ---- + /* Here are some extra definitions to support Point Grey DragonFly cameras */ + #include "conversions.h" + int ar2Video_dragonfly = -1; + + + + static AR2VideoParamT *gVid = NULL; *************** *** 110,120 **** int arVideoClose( void ) { ! int result; ! ! if( gVid == NULL ) return -1; ! ! result = ar2VideoClose(gVid); ! gVid = NULL; ! return (result); } --- 175,185 ---- int arVideoClose( void ) { ! int result; ! ! if( gVid == NULL ) return -1; ! ! result = ar2VideoClose(gVid); ! gVid = NULL; ! return (result); } *************** *** 184,188 **** printf(" (value must be a legal value for this parameter - use coriander to find what they are\n"); printf("\n"); ! return 0; } --- 249,253 ---- printf(" (value must be a legal value for this parameter - use coriander to find what they are\n"); printf("\n"); ! return 0; } *************** *** 196,200 **** char *a, line[256]; int i; ! int brightness = -1; int iris = -1; --- 261,265 ---- char *a, line[256]; int i; ! int brightness = -1; int iris = -1; *************** *** 216,220 **** vid->debug = 0; vid->status = 0; ! a = config; if( a != NULL) { --- 281,287 ---- vid->debug = 0; vid->status = 0; ! ! printf ("Processing config string [%s]\n", config); ! a = config; if( a != NULL) { *************** *** 301,304 **** --- 368,374 ---- vid->debug = 1; } + else if( strncmp( a, "-adjust", 7 ) == 0 ) { + /* Do nothing - this is for V4L compatibility */ + } else { ar2VideoDispOption(); *************** *** 310,336 **** } } ! if( initFlag == 0 ) { if( ar2Video1394Init(vid->debug, &vid->card, &vid->node) < 0 ) ! exit(0); initFlag = 1; ! } ! ! switch( vid->mode ) { ! case VIDEO_MODE_320x240_YUV422: ! vid->int_mode = MODE_320x240_YUV422; ! break; ! case VIDEO_MODE_640x480_YUV411: ! vid->int_mode = MODE_640x480_YUV411; ! break; ! case VIDEO_MODE_640x480_RGB: ! vid->int_mode = MODE_640x480_RGB; ! break; ! default: ! printf("Sorry, Unsupported Video Format for IEEE1394 Camera.\n"); ! exit(1); ! } switch( vid->rate ) { case VIDEO_FRAME_RATE_1_875: --- 380,413 ---- } } ! if( initFlag == 0 ) { if( ar2Video1394Init(vid->debug, &vid->card, &vid->node) < 0 ) ! { ! fprintf (stderr, "Could not initialise 1394\n"); ! exit(1); ! } initFlag = 1; ! } ! ! switch( vid->mode ) ! { ! case VIDEO_MODE_320x240_YUV422: ! vid->int_mode = MODE_320x240_YUV422; ! break; ! case VIDEO_MODE_640x480_YUV411: ! vid->int_mode = MODE_640x480_YUV411; ! break; ! case VIDEO_MODE_640x480_RGB: ! vid->int_mode = MODE_640x480_RGB; ! break; ! default: ! printf("Sorry, Unsupported Video Format for IEEE1394 Camera.\n"); ! exit(1); ! break; ! } ! ! switch( vid->rate ) { case VIDEO_FRAME_RATE_1_875: *************** *** 356,360 **** exit(1); } ! /*-----------------------------------------------------------------------*/ /* report camera's features */ --- 433,441 ---- exit(1); } ! ! ! ! ! /*-----------------------------------------------------------------------*/ /* report camera's features */ *************** *** 368,372 **** dc1394_print_feature_set( &(vid->features) ); } ! /* Change the camera settings if we need to */ --- 449,453 ---- dc1394_print_feature_set( &(vid->features) ); } ! /* Change the camera settings if we need to */ *************** *** 383,389 **** ! /* Dump out the new parameters now */ ! if (vid->debug) ! dc1394_print_feature_set( &(vid->features) ); --- 464,470 ---- ! /* Dump out the new parameters now - this is only for code testing */ ! /* if (vid->debug) ! dc1394_print_feature_set( &(vid->features) ); */ *************** *** 392,396 **** /*-----------------------------------------------------------------------*/ if( dc1394_query_supported_formats(arV1394.handle, vid->node, &value) != DC1394_SUCCESS ) { ! fprintf( stderr, "unable to query_supported_formats\n"); } i = 31 - (FORMAT_VGA_NONCOMPRESSED - FORMAT_MIN); --- 473,477 ---- /*-----------------------------------------------------------------------*/ if( dc1394_query_supported_formats(arV1394.handle, vid->node, &value) != DC1394_SUCCESS ) { ! fprintf( stderr, "unable to query_supported_formats\n"); } i = 31 - (FORMAT_VGA_NONCOMPRESSED - FORMAT_MIN); *************** *** 401,413 **** exit(0); } dc1394_query_supported_modes(arV1394.handle, vid->node, FORMAT_VGA_NONCOMPRESSED, &value); i = 31 - (vid->int_mode - MODE_FORMAT0_MIN); p1 = 1 << i; p2 = value & p1; ! if( p2 == 0 ) { ! fprintf( stderr, "Unsupported Mode for the specified camera.\n"); ! ar2VideoDispOption(); ! exit(0); ! } dc1394_query_supported_framerates(arV1394.handle, vid->node, FORMAT_VGA_NONCOMPRESSED, vid->int_mode, &value); i = 31 - (vid->int_rate - FRAMERATE_MIN); --- 482,511 ---- exit(0); } + + /* Check that the camera supports the particular video mode we asked for */ dc1394_query_supported_modes(arV1394.handle, vid->node, FORMAT_VGA_NONCOMPRESSED, &value); i = 31 - (vid->int_mode - MODE_FORMAT0_MIN); p1 = 1 << i; p2 = value & p1; ! if( p2 == 0 ) ! { ! /* Test if the camera supports mono, if so then it is probably a dragonfly camera which uses mono but with Bayer encoding */ ! i = 31 - (MODE_640x480_MONO - MODE_FORMAT0_MIN); ! p1 = 1 << i; ! p2 = value & p1; ! if (p2 == 0) ! { ! fprintf( stderr, "Unsupported Mode for the specified camera.\n"); ! ar2VideoDispOption(); ! exit(0); ! } ! else ! { ! fprintf (stderr, "Detected a mono camera, assuming DragonFly camera with Bayer image decoding\n"); ! vid->int_mode = MODE_640x480_MONO; ! ar2Video_dragonfly = 1; ! } ! } ! dc1394_query_supported_framerates(arV1394.handle, vid->node, FORMAT_VGA_NONCOMPRESSED, vid->int_mode, &value); i = 31 - (vid->int_rate - FRAMERATE_MIN); *************** *** 419,427 **** exit(0); } ! /*-----------------------------------------------------------------------*/ /* setup capture */ /*-----------------------------------------------------------------------*/ - sprintf (video1394devname, "/dev/video1394/%d", vid->card); if( dc1394_dma_setup_capture(arV1394.handle, vid->node, --- 517,534 ---- exit(0); } ! ! ! /* Decide on where the video1394 device nodes are, they can be either at ! /dev/video1394/* or /dev/video1394-* depending on the distribution */ ! struct stat video_stat; ! if (stat ("/dev/video1394", &video_stat) < 0) ! sprintf (video1394devname, "/dev/video1394-%d", vid->card); ! else ! sprintf (video1394devname, "/dev/video1394/%d", vid->card); ! ! /*-----------------------------------------------------------------------*/ /* setup capture */ /*-----------------------------------------------------------------------*/ if( dc1394_dma_setup_capture(arV1394.handle, vid->node, *************** *** 439,443 **** 0, /* do_extra_buffering */ #endif ! #if !defined(LIBDC_8) || defined(LIBDC_11) 1, video1394devname, /* drop_frames, dma_device_file */ #endif --- 546,550 ---- 0, /* do_extra_buffering */ #endif ! #ifndef LIBDC_8 1, video1394devname, /* drop_frames, dma_device_file */ #endif *************** *** 449,453 **** "supported by your camera\n", __LINE__,__FILE__); ! exit(0); } --- 556,560 ---- "supported by your camera\n", __LINE__,__FILE__); ! exit(1); } *************** *** 456,462 **** fprintf( stderr, "unable to set camera trigger mode (ignored)\n"); } ! ! arMalloc( vid->image, ARUint8, (vid->camera.frame_width * vid->camera.frame_height * AR_PIX_SIZE_DEFAULT) ); ! return vid; } --- 563,569 ---- fprintf( stderr, "unable to set camera trigger mode (ignored)\n"); } ! ! arMalloc( vid->image, ARUint8, (vid->camera.frame_width * vid->camera.frame_height * AR_PIX_SIZE) ); ! return vid; } *************** *** 466,470 **** int i; ! if (vid->status == 1 || vid->status == 2) ar2VideoCapStop(vid); #if 0 --- 573,577 ---- int i; ! if( vid->status > 0 ) ar2VideoCapStop( vid ); #if 0 *************** *** 475,480 **** raw1394_destroy_handle(arV1394.handle); ! initFlag = 0; ! return 0; } --- 582,587 ---- raw1394_destroy_handle(arV1394.handle); ! initFlag = 0; ! return 0; } *************** *** 489,497 **** return -1; } ! /*-----------------------------------------------------------------------*/ /* setup capture */ /*-----------------------------------------------------------------------*/ ! sprintf (video1394devname, "/dev/video1394/%d", vid->card); if( vid->status == 3 ) { if( dc1394_dma_setup_capture(arV1394.handle, --- 596,608 ---- return -1; } ! /*-----------------------------------------------------------------------*/ /* setup capture */ /*-----------------------------------------------------------------------*/ ! struct stat video_stat; ! if (stat ("/dev/video1394", &video_stat) < 0) ! sprintf (video1394devname, "/dev/video1394-%d", vid->card); ! else ! sprintf (video1394devname, "/dev/video1394/%d", vid->card); if( vid->status == 3 ) { if( dc1394_dma_setup_capture(arV1394.handle, *************** *** 510,514 **** 0, /* do_extra_buffering */ #endif ! #if !defined(LIBDC_8) || defined(LIBDC_11) 1, video1394devname, /* drop_frames, dma_device_file */ #endif --- 621,625 ---- 0, /* do_extra_buffering */ #endif ! #ifndef LIBDC_8 1, video1394devname, /* drop_frames, dma_device_file */ #endif *************** *** 520,524 **** "supported by your camera\n", __LINE__,__FILE__); ! exit(0); } } --- 631,635 ---- "supported by your camera\n", __LINE__,__FILE__); ! exit(1); } } *************** *** 605,609 **** case MODE_640x480_RGB: return (ARUint8 *)vid->camera.capture_buffer; ! case MODE_640x480_YUV411: buf = vid->image; --- 716,789 ---- case MODE_640x480_RGB: return (ARUint8 *)vid->camera.capture_buffer; ! ! ! case MODE_640x480_MONO: ! { ! /* We only currently support Bayer image decoding from Point Grey cameras */ ! if (ar2Video_dragonfly < 0) ! { ! fprintf (stderr, "It is not possible to be in mono mode without the dragonfly flag being set previously\n"); ! exit (1); ! } ! ! /* If the image data is NULL then we should immediately return to avoid doing an image conversion which probably won't work! */ ! if (vid->camera.capture_buffer == NULL) ! return ((ARUint8 *)vid->camera.capture_buffer); ! ! /* This Bayer code was copied from LGPL'd code by Don Murray <do...@pt...>, and I then modified it to fix up a few things */ ! ! /* Query the camera to detect the Bayer pattern type */ ! quadlet_t qValue; ! GetCameraControlRegister (arV1394.handle, vid->node, 0x1040, &qValue); ! bayer_pattern_t pattern = BAYER_PATTERN_BGGR; ! static bayer_pattern_t prev_pattern = -1; ! switch( qValue ) ! { ! case 0x42474752: /* BGGR */ ! pattern = BAYER_PATTERN_BGGR; ! break; ! case 0x47524247: /* GRBG */ ! pattern = BAYER_PATTERN_GRBG; ! break; ! case 0x52474742: /* RGGB */ ! pattern = BAYER_PATTERN_RGGB; ! break; ! case 0x47425247: /* GBRG */ ! pattern = BAYER_PATTERN_GBRG; ! break; ! case 0x59595959: /* YYYY = BW */ ! printf ("Camera is black and white, Bayer conversion is not possible\n"); ! exit (1); ! default: ! if (prev_pattern == -1) ! { ! printf ("Camera BAYER_TILE_MAPPING register has an unexpected value 0x%x on initial startup, which should not occur\n", qValue); ! exit (1); ! } ! else ! { ! /* This is a wierd bug where occasionally you get an invalid register value and I have no idea why this is */ ! printf ("WARNING! The BAYER_TILE_MAPPING register has an unexpected value 0x%x, but I was able to use the previous stored result\n", qValue); ! pattern = prev_pattern; ! } ! } ! ! /* Store the previous Bayer pattern value */ ! prev_pattern = pattern; ! ! /* Do the Bayer image conversion now */ ! unsigned char *dest = vid->image; ! unsigned char *src = (ARUint8 *)vid->camera.capture_buffer; ! BayerNearestNeighbor( src, ! dest, ! vid->camera.frame_width, ! vid->camera.frame_height, ! pattern ); ! ! /* Image is done, we can now return it! */ ! return (vid->image); ! } ! ! case MODE_640x480_YUV411: buf = vid->image; *************** *** 738,742 **** ((*card != -1) && (*node == -1))) { ! fprintf (stderr, "Card value is %d and node value is %d, you must either auto-detect both or specify both\n"); exit (1); } --- 918,922 ---- ((*card != -1) && (*node == -1))) { ! fprintf (stderr, "Card value is %d and node value is %d, you must either auto-detect both or specify both\n", *card, *node); exit (1); } |