Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2f6559b7006594cad03af173263c219e > files > 258

mrpt-doc-0.9.4-0.1.20110110svn2383.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>The MRPT project: CCameraSensor.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.2 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
          <span class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </span><span class="right"></span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>CCameraSensor.h</h1>  </div>
</div>
<div class="contents">
<a href="_c_camera_sensor_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* +---------------------------------------------------------------------------+</span>
<a name="l00002"></a>00002 <span class="comment">   |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |</span>
<a name="l00003"></a>00003 <span class="comment">   |                                                                           |</span>
<a name="l00004"></a>00004 <span class="comment">   |                   http://mrpt.sourceforge.net/                            |</span>
<a name="l00005"></a>00005 <span class="comment">   |                                                                           |</span>
<a name="l00006"></a>00006 <span class="comment">   |   Copyright (C) 2005-2011  University of Malaga                           |</span>
<a name="l00007"></a>00007 <span class="comment">   |                                                                           |</span>
<a name="l00008"></a>00008 <span class="comment">   |    This software was written by the Machine Perception and Intelligent    |</span>
<a name="l00009"></a>00009 <span class="comment">   |      Robotics Lab, University of Malaga (Spain).                          |</span>
<a name="l00010"></a>00010 <span class="comment">   |    Contact: Jose-Luis Blanco  &lt;jlblanco@ctima.uma.es&gt;                     |</span>
<a name="l00011"></a>00011 <span class="comment">   |                                                                           |</span>
<a name="l00012"></a>00012 <span class="comment">   |  This file is part of the MRPT project.                                   |</span>
<a name="l00013"></a>00013 <span class="comment">   |                                                                           |</span>
<a name="l00014"></a>00014 <span class="comment">   |     MRPT is free software: you can redistribute it and/or modify          |</span>
<a name="l00015"></a>00015 <span class="comment">   |     it under the terms of the GNU General Public License as published by  |</span>
<a name="l00016"></a>00016 <span class="comment">   |     the Free Software Foundation, either version 3 of the License, or     |</span>
<a name="l00017"></a>00017 <span class="comment">   |     (at your option) any later version.                                   |</span>
<a name="l00018"></a>00018 <span class="comment">   |                                                                           |</span>
<a name="l00019"></a>00019 <span class="comment">   |   MRPT is distributed in the hope that it will be useful,                 |</span>
<a name="l00020"></a>00020 <span class="comment">   |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |</span>
<a name="l00021"></a>00021 <span class="comment">   |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |</span>
<a name="l00022"></a>00022 <span class="comment">   |     GNU General Public License for more details.                          |</span>
<a name="l00023"></a>00023 <span class="comment">   |                                                                           |</span>
<a name="l00024"></a>00024 <span class="comment">   |     You should have received a copy of the GNU General Public License     |</span>
<a name="l00025"></a>00025 <span class="comment">   |     along with MRPT.  If not, see &lt;http://www.gnu.org/licenses/&gt;.         |</span>
<a name="l00026"></a>00026 <span class="comment">   |                                                                           |</span>
<a name="l00027"></a>00027 <span class="comment">   +---------------------------------------------------------------------------+ */</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#ifndef CCameraSensor_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define CCameraSensor_H</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="_c_pose3_d_8h.html">mrpt/poses/CPose3D.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="_c_observation_8h.html">mrpt/slam/CObservation.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="code" href="_c_debug_output_capable_8h.html">mrpt/utils/CDebugOutputCapable.h</a>&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;<a class="code" href="_c_config_file_base_8h.html">mrpt/utils/CConfigFileBase.h</a>&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;<a class="code" href="_c_generic_sensor_8h.html">mrpt/hwdrivers/CGenericSensor.h</a>&gt;</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;<a class="code" href="_c_f_f_m_p_e_g___input_stream_8h.html">mrpt/hwdrivers/CFFMPEG_InputStream.h</a>&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;<a class="code" href="_c_image_grabber___open_c_v_8h.html">mrpt/hwdrivers/CImageGrabber_OpenCV.h</a>&gt;</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &lt;<a class="code" href="_c_image_grabber__dc1394_8h.html">mrpt/hwdrivers/CImageGrabber_dc1394.h</a>&gt;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;<a class="code" href="_c_stereo_grabber___bumblebee_8h.html">mrpt/hwdrivers/CStereoGrabber_Bumblebee.h</a>&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &lt;<a class="code" href="_c_swiss_ranger3_d_camera_8h.html">mrpt/hwdrivers/CSwissRanger3DCamera.h</a>&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;<a class="code" href="_c_kinect_8h.html">mrpt/hwdrivers/CKinect.h</a>&gt;</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="preprocessor">#include &lt;<a class="code" href="_c_file_g_z_input_stream_8h.html">mrpt/utils/CFileGZInputStream.h</a>&gt;</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;<a class="code" href="_c_stereo_grabber___s_v_s_8h.html">mrpt/hwdrivers/CStereoGrabber_SVS.h</a>&gt;</span>
<a name="l00047"></a>00047 
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;<a class="code" href="_c_display_window_8h.html">mrpt/gui/CDisplayWindow.h</a>&gt;</span>
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="keyword">namespace </span>mrpt
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052         <span class="keyword">namespace </span>hwdrivers
<a name="l00053"></a>00053         {<span class="comment"></span>
<a name="l00054"></a>00054 <span class="comment">                /** The central class for camera grabbers in MRPT, implementing the &quot;generic sensor&quot; interface.</span>
<a name="l00055"></a>00055 <span class="comment">                  *   This class provides the user with a uniform interface to a variety of other classes which manage only one specific camera &quot;driver&quot; (opencv, ffmpeg, bumblebee,...)</span>
<a name="l00056"></a>00056 <span class="comment">                  *</span>
<a name="l00057"></a>00057 <span class="comment">                  *   Following the &quot;generic sensor&quot; interface, all the parameters must be passed int the form of a configuration file, which may be also formed on the fly (without being a real config file) as in this example:</span>
<a name="l00058"></a>00058 <span class="comment">                  *</span>
<a name="l00059"></a>00059 <span class="comment">                  *  \code</span>
<a name="l00060"></a>00060 <span class="comment">                  *   CCameraSensor myCam;</span>
<a name="l00061"></a>00061 <span class="comment">                  *   const string str =</span>
<a name="l00062"></a>00062 <span class="comment">                  *      &quot;[CONFIG]\n&quot;</span>
<a name="l00063"></a>00063 <span class="comment">                  *      &quot;grabber_type=opencv\n&quot;;</span>
<a name="l00064"></a>00064 <span class="comment">                  *</span>
<a name="l00065"></a>00065 <span class="comment">                  *   CConfigFileMemory cfg(str);</span>
<a name="l00066"></a>00066 <span class="comment">                  *   myCam.loadConfig(cfg,&quot;CONFIG&quot;);</span>
<a name="l00067"></a>00067 <span class="comment">                  *   myCam.initialize();</span>
<a name="l00068"></a>00068 <span class="comment">                  *   CObservationPtr obs = myCam.getNextFrame();</span>
<a name="l00069"></a>00069 <span class="comment">                  *  \endcode</span>
<a name="l00070"></a>00070 <span class="comment">                  *</span>
<a name="l00071"></a>00071 <span class="comment">                  *  Images can be retrieved through the normal &quot;doProcess()&quot; interface, or the specific method &quot;getNextFrame()&quot;.</span>
<a name="l00072"></a>00072 <span class="comment">                  *</span>
<a name="l00073"></a>00073 <span class="comment">                  * Some notes:</span>
<a name="l00074"></a>00074 <span class="comment">                  *  - &quot;grabber_type&quot; determines the class to use internally for image capturing (see below).</span>
<a name="l00075"></a>00075 <span class="comment">                  *  - For the meaning of cv_camera_type and other parameters, refer to mrpt::hwdrivers::CImageGrabber_OpenCV</span>
<a name="l00076"></a>00076 <span class="comment">                  *  - For the parameters of dc1394 parameters, refer to generic IEEE1394 documentation, and to mrpt::hwdrivers::TCaptureOptions_dc1394.</span>
<a name="l00077"></a>00077 <span class="comment">                  *  - If all the existing parameter annoy you, try the function prepareVideoSourceFromUserSelection(), which displays a GUI dialog to the user so he/she can choose the desired camera &amp; its parameters.</span>
<a name="l00078"></a>00078 <span class="comment">                  *</span>
<a name="l00079"></a>00079 <span class="comment">                  *  Images can be saved in the &quot;external storage&quot; mode. See setPathForExternalImages and setExternalImageFormat. These methods</span>
<a name="l00080"></a>00080 <span class="comment">                  *   are called automatically from rawlog-grabber.</span>
<a name="l00081"></a>00081 <span class="comment">                  *</span>
<a name="l00082"></a>00082 <span class="comment">                  *  These is the list of all accepted parameters:</span>
<a name="l00083"></a>00083 <span class="comment">                  *</span>
<a name="l00084"></a>00084 <span class="comment">                  *  \code</span>
<a name="l00085"></a>00085 <span class="comment">                  *  PARAMETERS IN THE &quot;.INI&quot;-LIKE CONFIGURATION STRINGS:</span>
<a name="l00086"></a>00086 <span class="comment">                  * -------------------------------------------------------</span>
<a name="l00087"></a>00087 <span class="comment">                  *   [supplied_section_name]</span>
<a name="l00088"></a>00088 <span class="comment">                  *    // Select one of the grabber implementations -----------------------</span>
<a name="l00089"></a>00089 <span class="comment">                  *    grabber_type       = opencv | dc1394 | bumblebee | ffmpeg | rawlog | swissranger | kinect</span>
<a name="l00090"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a77829688dace4b277b1bea69d535498b">00090</a> <span class="comment">                  *</span>
<a name="l00091"></a>00091 <span class="comment">                  *    // Options for any grabber_type ------------------------------------</span>
<a name="l00092"></a>00092 <span class="comment">                  *    preview_decimation = 0     // N&lt;=0 (or not present): No preview; N&gt;0, display 1 out of N captured frames.</span>
<a name="l00093"></a>00093 <span class="comment">                  *    preview_reduction  = 0     // 0 or 1 (or not present): The preview shows the actual image. For 2,3,..., reduces the size of the image by that factor, only for the preview window.</span>
<a name="l00094"></a>00094 <span class="comment">                  *    capture_grayscale  = 0     // 1:capture in grayscale, whenever the driver allows it. Default=0</span>
<a name="l00095"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aaf671984b5749d78b7339a36ed57d85a">00095</a> <span class="comment">                  *    // For externaly stored images, the format of image files (default=jpg)</span>
<a name="l00096"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a0fa82c35731262bd2b36c981e66888f3">00096</a> <span class="comment">                  *    //external_images_format  = jpg</span>
<a name="l00097"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#acfc86c9f3c6dd29213a966251c2374ab">00097</a> <span class="comment">                  *</span>
<a name="l00098"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a9fd6a8707ba952838a11301cbd3220fc">00098</a> <span class="comment">                  *    // For externaly stored images: whether to spawn independent threads to save the image files.</span>
<a name="l00099"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ae7db737ba5edce56c040874e9721024e">00099</a> <span class="comment">                  *    //external_images_own_thread  = 1   // 0 or 1</span>
<a name="l00100"></a>00100 <span class="comment">                  *</span>
<a name="l00101"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7397593c8b4b534cdcfc3d5eb9827a79">00101</a> <span class="comment">                  *    // If external_images_own_thread=1, this changes the number of threads to launch</span>
<a name="l00102"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#afef592f7d45f823474bcbfc062785ca3">00102</a> <span class="comment">                  *    //  to save image files. The default is determined from mrpt::system::getNumberOfProcessors()</span>
<a name="l00103"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa2adad8a0d3dda91848420dc99eb4382">00103</a> <span class="comment">                  *    //  and should be OK unless you want to save processor time for other things.</span>
<a name="l00104"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aee3e4b361bee84a661086b37911ba492">00104</a> <span class="comment">                  *    //external_images_own_thread_count = 2    // &gt;=1</span>
<a name="l00105"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ab400bbffed31c9801dede18ba0cefa8a">00105</a> <span class="comment">                  *</span>
<a name="l00106"></a>00106 <span class="comment">                  *    // (Only when external_images_format=jpg): Optional parameter to set the JPEG compression quality:</span>
<a name="l00107"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a78850d2a829f9ea8119b79d736ee4a9e">00107</a> <span class="comment">                  *    //external_images_jpeg_quality = 95    // [1-100]. Default: 95</span>
<a name="l00108"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a83abcfdfd6cd94570d9d3a35abf2e0fb">00108</a> <span class="comment">                  *</span>
<a name="l00109"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aeecca3fd7cba706a4fc52d1f68d9f676">00109</a> <span class="comment">                  *    // Pose of the sensor on the robot:</span>
<a name="l00110"></a>00110 <span class="comment">                  *    pose_x=0         ; (meters)</span>
<a name="l00111"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a873ca07aa1b01829a03efd25688256f2">00111</a> <span class="comment">                  *    pose_y=0</span>
<a name="l00112"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7bb1b9465a5a7c35c33e8c4f358f8650">00112</a> <span class="comment">                  *    pose_z=0</span>
<a name="l00113"></a>00113 <span class="comment">                  *    pose_yaw=0       ; (Angles in degrees)</span>
<a name="l00114"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a902ec02bcd95e0f0a109f0f9b9868951">00114</a> <span class="comment">                  *    pose_pitch=0</span>
<a name="l00115"></a>00115 <span class="comment">                  *    pose_roll=0</span>
<a name="l00116"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a469c2768cc14ae9473615767b85c89e1">00116</a> <span class="comment">                  *</span>
<a name="l00117"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#afecf08da5e85a5afd8f2bdc2907537ac">00117</a> <span class="comment">                  *    // Options for grabber_type= opencv  ------------------------------------</span>
<a name="l00118"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a707b6287faa95954136cdad29b6200cf">00118</a> <span class="comment">                  *    cv_camera_index  = 0       // [opencv] Number of camera to open</span>
<a name="l00119"></a>00119 <span class="comment">                  *    cv_camera_type   = CAMERA_CV_AUTODETECT</span>
<a name="l00120"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a5fd11474e01f63b10e66638ced17dda2">00120</a> <span class="comment">                  *    cv_frame_width   = 640     // [opencv] Capture width (not present or set to 0 for default)</span>
<a name="l00121"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a35af572877c5fa85fd4ae333fe868b8a">00121</a> <span class="comment">                  *    cv_frame_height  = 480     // [opencv] Capture height (not present or set to 0 for default)</span>
<a name="l00122"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a68f1e42367f23acb9b149bb307ad1ebd">00122</a> <span class="comment">                  *    cv_fps           = 15      // [opencv] IEEE1394 cams only: Capture FPS (not present or 0 for default)</span>
<a name="l00123"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa53445cc2e7ca37313439974463c13d2">00123</a> <span class="comment">                  *    cv_gain          = 0       // [opencv] Camera gain, if available (nor present or set to 0 for default).</span>
<a name="l00124"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a72e631ed218dcddd2fc736081ec48ac6">00124</a> <span class="comment">                  *</span>
<a name="l00125"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a06765ebed30fdb8f11fbbddb150b1d5c">00125</a> <span class="comment">                  *    // Options for grabber_type= dc1394 -------------------------------------</span>
<a name="l00126"></a>00126 <span class="comment">                  *    dc1394_camera_guid   = 0 | 0x11223344    // 0 (or not present): the first camera; A hexadecimal number: The GUID of the camera to open</span>
<a name="l00127"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a268b17a06e4a26aa56a8f7f69be5d645">00127</a> <span class="comment">                  *    dc1394_camera_unit   = 0                         // 0 (or not present): the first camera; 0,1,2,...: The unit number (within the given GUID) of the camera to open (Stereo cameras: 0 or 1)</span>
<a name="l00128"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a1c5b6fce23344c96cd641a695d67630f">00128</a> <span class="comment">                  *    dc1394_frame_width       = 640</span>
<a name="l00129"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a9a5845424a5e9082ae3530894544773b">00129</a> <span class="comment">                  *    dc1394_frame_height      = 480</span>
<a name="l00130"></a>00130 <span class="comment">                  *    dc1394_framerate         = 15                                    // eg: 7.5, 15, 30, 60, etc... For posibilities see mrpt::hwdrivers::TCaptureOptions_dc1394</span>
<a name="l00131"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a651913cf3d2f7f168f77f31c89ec1627">00131</a> <span class="comment">                  *    dc1394_mode7         = -1                    // -1: Ignore, i&gt;=0, set to MODE7_i</span>
<a name="l00132"></a>00132 <span class="comment">                  *    dc1394_color_coding      = COLOR_CODING_YUV422   // For posibilities see mrpt::hwdrivers::TCaptureOptions_dc1394</span>
<a name="l00133"></a>00133 <span class="comment">                  *    dc1394_shutter           = -1    // A value, or -1 (or not present) for not to change this parameter in the camera</span>
<a name="l00134"></a>00134 <span class="comment">                  *    dc1394_gain                      = -1    // A value, or -1 (or not present) for not to change this parameter in the camera</span>
<a name="l00135"></a>00135 <span class="comment">                  *    dc1394_gamma                     = -1    // A value, or -1 (or not present) for not to change this parameter in the camera</span>
<a name="l00136"></a>00136 <span class="comment">                  *    dc1394_brightness        = -1    // A value, or -1 (or not present) for not to change this parameter in the camera</span>
<a name="l00137"></a>00137 <span class="comment">                  *    dc1394_exposure          = -1    // A value, or -1 (or not present) for not to change this parameter in the camera</span>
<a name="l00138"></a>00138 <span class="comment">                  *    dc1394_sharpness         = -1    // A value, or -1 (or not present) for not to change this parameter in the camera</span>
<a name="l00139"></a>00139 <span class="comment">                  *    dc1394_white_balance     = -1    // A value, or -1 (or not present) for not to change this parameter in the camera</span>
<a name="l00140"></a>00140 <span class="comment">                  *</span>
<a name="l00141"></a>00141 <span class="comment">                  *    // Options for grabber_type= bumblebee ----------------------------------</span>
<a name="l00142"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a634f637cd8810294b592930475ec7e89">00142</a> <span class="comment">                  *    bumblebee_camera_index  = 0       // [bumblebee] Number of camera within the firewire bus to open (typically = 0)</span>
<a name="l00143"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a760ce1620646ac7d784b4710ce8baad7">00143</a> <span class="comment">                  *    bumblebee_frame_width   = 640     // [bumblebee] Capture width (not present or set to 0 for default)</span>
<a name="l00144"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aee5988a0f6ccf173b3c7770a1be4a566">00144</a> <span class="comment">                  *    bumblebee_frame_height  = 480     // [bumblebee] Capture height (not present or set to 0 for default)</span>
<a name="l00145"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#af1173a63aec70ae01ce962fc192a819d">00145</a> <span class="comment">                  *    bumblebee_fps           = 15      // [bumblebee] Capture FPS (not present or 0 for default)</span>
<a name="l00146"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ac60eb66e87c342e898721368c4474258">00146</a> <span class="comment">                  *    bumblebee_mono          = 0|1     // [bumblebee] OPTIONAL: If this parameter is present, monocular (0:left, 1:right) images will be grabbed instead of stereo pairs.</span>
<a name="l00147"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a4fec049d337e4a6c6a3c1c13629a9537">00147</a> <span class="comment">                  *    bumblebee_get_rectified = 0|1     // [bumblebee] Determines if the camera should grab rectified or raw images (1 is the default)</span>
<a name="l00148"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a0576e846b0e1760eee761b58f64f5fe2">00148</a> <span class="comment">                  *</span>
<a name="l00149"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a84e548f1d9200a557fdcfe6ca018b50b">00149</a> <span class="comment">                  *    // Options for grabber_type= ffmpeg -------------------------------------</span>
<a name="l00150"></a>00150 <span class="comment">                  *    ffmpeg_url             = rtsp://127.0.0.1      // [ffmpeg] The video file or IP camera to open</span>
<a name="l00151"></a>00151 <span class="comment">                  *</span>
<a name="l00152"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a2d77c04689ffa443122a738aafd3ced0">00152</a> <span class="comment">                  *    // Options for grabber_type= rawlog -------------------------------------</span>
<a name="l00153"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa93688ec44f664bacb93b4399ce58c00">00153</a> <span class="comment">                  *    rawlog_file            = mylog.rawlog          // [rawlog] This can be used to simulate the capture of images already grabbed in the past in the form of a MRPT rawlog.</span>
<a name="l00154"></a>00154 <span class="comment">                  *    rawlog_camera_sensor_label  = CAMERA1          // [rawlog] If this field is not present, all images found in the rawlog will be retrieved. Otherwise, only those observations with a matching sensor label.</span>
<a name="l00155"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a74b0f7f41dd5fd3efd83d51a65b8b83d">00155</a> <span class="comment">                  *</span>
<a name="l00156"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7d57a5e445b60474fee113189cc2d6e9">00156</a> <span class="comment">                  *    // Options for grabber_type= swissranger -------------------------------------</span>
<a name="l00157"></a>00157 <span class="comment">                  *    sr_use_usb         = true                // True: use USB, false: use ethernet</span>
<a name="l00158"></a>00158 <span class="comment">                  *    sr_IP              = 192.168.2.14    // If sr_use_usb=false, the camera IP</span>
<a name="l00159"></a>00159 <span class="comment">                  *    sr_grab_grayscale  = true            // whether to save the intensity channel</span>
<a name="l00160"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a2a04bc9c3cefa535b6fbdd4f0dcbdbbc">00160</a> <span class="comment">                  *    sr_grab_3d         = true            // whether to save the 3D points</span>
<a name="l00161"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a8203b2017d89347342e53bc0e3a3a32b">00161</a> <span class="comment">                  *    sr_grab_range      = true            // whether to save the range image</span>
<a name="l00162"></a>00162 <span class="comment">                  *    sr_grab_confidence = true            // whether to save the confidence image</span>
<a name="l00163"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a5d6216f668acfe011f135a5d1086117f">00163</a> <span class="comment">                  *</span>
<a name="l00164"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ac6724623cf19ade429af86cc3542d794">00164</a> <span class="comment">                  *    // Options for grabber_type= kinect -------------------------------------</span>
<a name="l00165"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a607dca476c97c764e8902043be7e6c5c">00165</a> <span class="comment">                  *    kinect_grab_intensity  = true            // whether to save the intensity (RGB) channel</span>
<a name="l00166"></a>00166 <span class="comment">                  *    kinect_grab_3d         = true            // whether to save the 3D points</span>
<a name="l00167"></a>00167 <span class="comment">                  *    kinect_grab_range      = true            // whether to save the depth image</span>
<a name="l00168"></a>00168 <span class="comment">                  *</span>
<a name="l00169"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html">00169</a> <span class="comment">                  *  \endcode</span>
<a name="l00170"></a>00170 <span class="comment">                  *</span>
<a name="l00171"></a>00171 <span class="comment">                  *  \note The execution rate (in rawlog-grabber) should be greater than the required capture FPS.</span>
<a name="l00172"></a>00172 <span class="comment">                  *  \note In Linux you may need to execute &quot;chmod 666 /dev/video1394/ * &quot; and &quot;chmod 666 /dev/raw1394&quot; for allowing any user R/W access to firewire cameras.</span>
<a name="l00173"></a>00173 <span class="comment">                  *  \sa mrpt::hwdrivers::CImageGrabber_OpenCV, mrpt::hwdrivers::CImageGrabber_dc1394, CGenericSensor, prepareVideoSourceFromUserSelection</span>
<a name="l00174"></a>00174 <span class="comment">                  */</span>
<a name="l00175"></a>00175                 <span class="keyword">class </span><a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html" title="The central class for camera grabbers in MRPT, implementing the &amp;quot;generic sensor&amp;quot; interface...">CCameraSensor</a> : <span class="keyword">public</span> utils::<a class="code" href="classmrpt_1_1utils_1_1_c_debug_output_capable.html" title="This base class provides a common printf-like method to send debug information to std::cout...">CDebugOutputCapable</a>, <span class="keyword">public</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_generic_sensor.html" title="A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...">CGenericSensor</a>
<a name="l00176"></a>00176                 {
<a name="l00177"></a>00177                         <a class="code" href="_c_generic_sensor_8h.html#ab8b72c811c520eb036fa4080d9cd9d1d" title="This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...">DEFINE_GENERIC_SENSOR</a>(<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html" title="The central class for camera grabbers in MRPT, implementing the &amp;quot;generic sensor&amp;quot; interface...">CCameraSensor</a>)
<a name="l00178"></a>00178 
<a name="l00179"></a>00179                 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00180"></a>00180 <span class="comment">                        /** Constructor</span>
<a name="l00181"></a>00181 <span class="comment">                          *  The camera is not open until &quot;initialize&quot; is called.</span>
<a name="l00182"></a>00182 <span class="comment">                          */</span>
<a name="l00183"></a>00183                         <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html" title="The central class for camera grabbers in MRPT, implementing the &amp;quot;generic sensor&amp;quot; interface...">CCameraSensor</a>();
<a name="l00184"></a>00184 <span class="comment"></span>
<a name="l00185"></a>00185 <span class="comment">                        /** Destructor</span>
<a name="l00186"></a>00186 <span class="comment">                          */</span>
<a name="l00187"></a>00187                         <span class="keyword">virtual</span> ~<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html" title="The central class for camera grabbers in MRPT, implementing the &amp;quot;generic sensor&amp;quot; interface...">CCameraSensor</a>();
<a name="l00188"></a>00188 <span class="comment"></span>
<a name="l00189"></a>00189 <span class="comment">                        /** This method should be called periodically (at least at 1Hz to capture ALL the real-time data)</span>
<a name="l00190"></a>00190 <span class="comment">                        *  It is thread safe, i.e. you can call this from one thread, then to other methods from other threads.</span>
<a name="l00191"></a>00191 <span class="comment">                        */</span>
<a name="l00192"></a>00192                         <span class="keywordtype">void</span>  doProcess();
<a name="l00193"></a>00193 <span class="comment"></span>
<a name="l00194"></a>00194 <span class="comment">                        /** Retrieves the next frame from the video source, raising an exception on any error.</span>
<a name="l00195"></a>00195 <span class="comment">                          * Note: The returned observations can be of one of these classes (you can use IS_CLASS(obs,CObservationXXX) to determine it):</span>
<a name="l00196"></a>00196 <span class="comment">                          *             - mrpt::slam::CObservationImage (For normal cameras or video sources)</span>
<a name="l00197"></a>00197 <span class="comment">                          *             - mrpt::slam::CObservationStereoImages (For stereo cameras)</span>
<a name="l00198"></a>00198 <span class="comment">                          *             - mrpt::slam::CObservation3DRangeScan (For 3D cameras)</span>
<a name="l00199"></a>00199 <span class="comment">                          */</span>
<a name="l00200"></a>00200                         <a class="code" href="structmrpt_1_1slam_1_1_c_observation_ptr.html">mrpt::slam::CObservationPtr</a> getNextFrame();
<a name="l00201"></a>00201 <span class="comment"></span>
<a name="l00202"></a>00202 <span class="comment">                        /** Tries to open the camera, after setting all the parameters with a call to loadConfig.</span>
<a name="l00203"></a>00203 <span class="comment">                          *  \exception This method must throw an exception with a descriptive message if some critical error is found.</span>
<a name="l00204"></a>00204 <span class="comment">                          */</span>
<a name="l00205"></a>00205                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> initialize();
<a name="l00206"></a>00206 <span class="comment"></span>
<a name="l00207"></a>00207 <span class="comment">                        /** Close the camera (if open).</span>
<a name="l00208"></a>00208 <span class="comment">                          *   This method is called automatically on destruction.</span>
<a name="l00209"></a>00209 <span class="comment">                          */</span>
<a name="l00210"></a>00210                         <span class="keywordtype">void</span> close();
<a name="l00211"></a>00211 <span class="comment"></span>
<a name="l00212"></a>00212 <span class="comment">                        /**  Set the path where to save off-rawlog image files (this class DOES take into account this path).</span>
<a name="l00213"></a>00213 <span class="comment">                          *  An  empty string (the default value at construction) means to save images embedded in the rawlog, instead of on separate files.</span>
<a name="l00214"></a>00214 <span class="comment">                          * \exception std::exception If the directory doesn&#39;t exists and cannot be created.</span>
<a name="l00215"></a>00215 <span class="comment">                          */</span>
<a name="l00216"></a>00216                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPathForExternalImages( <span class="keyword">const</span> std::string &amp;directory );
<a name="l00217"></a>00217 <span class="comment"></span>
<a name="l00218"></a>00218 <span class="comment">                        /** This must be called before initialize() */</span>
<a name="l00219"></a>00219                         <span class="keywordtype">void</span> enableLaunchOwnThreadForSavingImages(<span class="keywordtype">bool</span> enable=<span class="keyword">true</span>) { m_external_images_own_thread = enable; };
<a name="l00220"></a>00220 
<a name="l00221"></a>00221                 <span class="keyword">protected</span>:
<a name="l00222"></a>00222                         <a class="code" href="classmrpt_1_1poses_1_1_c_pose3_d.html" title="A class used to store a 3D pose (a 3D translation + a rotation in 3D).">poses::CPose3D</a>          m_sensorPose;
<a name="l00223"></a>00223 
<a name="l00224"></a>00224                         std::string                                                             m_grabber_type; <span class="comment">//!&lt; Can be &quot;opencv&quot;,...</span>
<a name="l00225"></a>00225 <span class="comment"></span>                        <span class="keywordtype">bool</span>                                                                    m_capture_grayscale;
<a name="l00226"></a>00226                         <span class="keywordtype">int</span>                                                                             m_cv_camera_index;
<a name="l00227"></a>00227                         std::string                                                             m_cv_camera_type;
<a name="l00228"></a>00228                         <a class="code" href="structmrpt_1_1hwdrivers_1_1_t_capture_c_v_options.html" title="Options used when creating an OpenCV capture object Some options apply to IEEE1394 cameras only...">mrpt::hwdrivers::TCaptureCVOptions</a>                      m_cv_options;
<a name="l00229"></a>00229 
<a name="l00230"></a>00230                         uint64_t                                                                m_dc1394_camera_guid;
<a name="l00231"></a>00231                         <span class="keywordtype">int</span>                                                                             m_dc1394_camera_unit;
<a name="l00232"></a>00232                         <a class="code" href="structmrpt_1_1hwdrivers_1_1_t_capture_options__dc1394.html" title="Options used when creating an dc1394 capture object All but the frame size, framerate, and color_coding can be changed dynamically by CImageGrabber_dc1394::changeCaptureOptions.">mrpt::hwdrivers::TCaptureOptions_dc1394</a> m_dc1394_options;
<a name="l00233"></a>00233                         <span class="keywordtype">int</span>                                                                             m_preview_decimation;
<a name="l00234"></a>00234                         <span class="keywordtype">int</span>                                                                             m_preview_reduction;
<a name="l00235"></a>00235 
<a name="l00236"></a>00236                         <span class="keywordtype">int</span>                                                                             m_bumblebee_camera_index;
<a name="l00237"></a>00237                         <a class="code" href="structmrpt_1_1hwdrivers_1_1_t_capture_options__bumblebee.html" title="Options used when creating a bumblebee camera capture object.">mrpt::hwdrivers::TCaptureOptions_bumblebee</a>      m_bumblebee_options;
<a name="l00238"></a>00238                         <span class="keywordtype">int</span>                                                                             m_bumblebee_monocam; <span class="comment">// 0:Left, 1: Right, &lt;0,&gt;1 -&gt; Stereo</span>
<a name="l00239"></a>00239 
<a name="l00240"></a>00240                         <span class="keywordtype">int</span>                                                                             m_svs_camera_index;
<a name="l00241"></a>00241                         <a class="code" href="structmrpt_1_1hwdrivers_1_1_t_capture_options___s_v_s.html" title="Options used when creating a STOC Videre Design camera capture object.">mrpt::hwdrivers::TCaptureOptions_SVS</a>    m_svs_options;
<a name="l00242"></a>00242 
<a name="l00243"></a>00243                         std::string                                                             m_ffmpeg_url;
<a name="l00244"></a>00244 
<a name="l00245"></a>00245                         std::string                                                             m_rawlog_file;
<a name="l00246"></a>00246                         std::string                                                             m_rawlog_camera_sensor_label;
<a name="l00247"></a>00247                         std::string                                                             m_rawlog_detected_images_dir;
<a name="l00248"></a>00248 
<a name="l00249"></a>00249                         <span class="keywordtype">bool</span>                    m_sr_open_from_usb; <span class="comment">//!&lt; true: USB, false: ETH</span>
<a name="l00250"></a>00250 <span class="comment"></span>                        std::string     m_sr_ip_address;
<a name="l00251"></a>00251                         <span class="keywordtype">bool</span>                    m_sr_save_3d;                   <span class="comment">//!&lt; Save the 3D point cloud (default: true)</span>
<a name="l00252"></a>00252 <span class="comment"></span>                        <span class="keywordtype">bool</span>                    m_sr_save_range_img;    <span class="comment">//!&lt; Save the 2D range image (default: true)</span>
<a name="l00253"></a>00253 <span class="comment"></span>                        <span class="keywordtype">bool</span>                    m_sr_save_intensity_img; <span class="comment">//!&lt; Save the 2D intensity image (default: true)</span>
<a name="l00254"></a>00254 <span class="comment"></span>                        <span class="keywordtype">bool</span>                    m_sr_save_confidence;   <span class="comment">//!&lt; Save the estimated confidence 2D image (default: false)</span>
<a name="l00255"></a>00255 <span class="comment"></span>
<a name="l00256"></a>00256                         <span class="keywordtype">bool</span>                    m_kinect_save_3d;                       <span class="comment">//!&lt; Save the 3D point cloud (default: true)</span>
<a name="l00257"></a>00257 <span class="comment"></span>                        <span class="keywordtype">bool</span>                    m_kinect_save_range_img;        <span class="comment">//!&lt; Save the 2D range image (default: true)</span>
<a name="l00258"></a>00258 <span class="comment"></span>                        <span class="keywordtype">bool</span>                    m_kinect_save_intensity_img; <span class="comment">//!&lt; Save the 2D intensity image (default: true)</span>
<a name="l00259"></a>00259 <span class="comment"></span>
<a name="l00260"></a>00260                         <span class="keywordtype">bool</span>                            m_external_images_own_thread; <span class="comment">//!&lt; Whether to launch independent thread</span>
<a name="l00261"></a>00261 <span class="comment"></span><span class="comment"></span>
<a name="l00262"></a>00262 <span class="comment">                        /** Loads specific configuration for the device from a given source of configuration parameters, for example, an &quot;.ini&quot; file, loading from the section &quot;[iniSection]&quot; (see utils::CConfigFileBase and derived classes)</span>
<a name="l00263"></a>00263 <span class="comment">                          *  See hwdrivers::CCameraSensor for the possible parameters</span>
<a name="l00264"></a>00264 <span class="comment">                          */</span>
<a name="l00265"></a>00265                         <span class="keywordtype">void</span>  loadConfig_sensorSpecific(
<a name="l00266"></a>00266                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_config_file_base.html" title="This class allows loading and storing values and vectors of different types from a configuration text...">mrpt::utils::CConfigFileBase</a> &amp;configSource,
<a name="l00267"></a>00267                                 <span class="keyword">const</span> std::string         &amp;iniSection );
<a name="l00268"></a>00268 
<a name="l00269"></a>00269                 <span class="keyword">private</span>:
<a name="l00270"></a>00270                         <span class="comment">// Only one of these will be !=NULL at a time ===========</span>
<a name="l00271"></a>00271                         <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_image_grabber___open_c_v.html" title="A class for grabing images from a &amp;quot;OpenCV&amp;quot;-compatible camera, or from an AVI video file...">CImageGrabber_OpenCV</a>                            *m_cap_cv;              <span class="comment">//!&lt; The OpenCV capture object.</span>
<a name="l00272"></a>00272 <span class="comment"></span>                        <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_image_grabber__dc1394.html" title="A class for grabing images from a IEEE1394 (Firewire) camera using the libdc1394-2 library...">CImageGrabber_dc1394</a>                            *m_cap_dc1394;  <span class="comment">//!&lt; The dc1394 capture object.</span>
<a name="l00273"></a>00273 <span class="comment"></span>                        <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_stereo_grabber___bumblebee.html" title="A class for grabing stereo images from a &amp;quot;Bumblebee&amp;quot; or &amp;quot;Bumblebee2&amp;quot; camera NOTE:...">CStereoGrabber_Bumblebee</a>                        *m_cap_bumblebee;       <span class="comment">//!&lt; The bumblebee capture object.</span>
<a name="l00274"></a>00274 <span class="comment"></span>                        <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_stereo_grabber___s_v_s.html" title="A class for grabing stereo images from a STOC camera of Videre Design NOTE:Windows:This class is not ...">mrpt::hwdrivers::CStereoGrabber_SVS</a>        *m_cap_svs;  <span class="comment">//!&lt; The svs capture object.</span>
<a name="l00275"></a>00275 <span class="comment"></span>                        <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_f_f_m_p_e_g___input_stream.html" title="A generic class which process a video file or other kind of input stream (http, rtsp) and allows the ...">CFFMPEG_InputStream</a>                                     *m_cap_ffmpeg;  <span class="comment">//!&lt; The FFMPEG capture object</span>
<a name="l00276"></a>00276 <span class="comment"></span>                        <a class="code" href="classmrpt_1_1utils_1_1_c_file_g_z_input_stream.html" title="Transparently opens a compressed &amp;quot;gz&amp;quot; file and reads uncompressed data from it...">mrpt::utils::CFileGZInputStream</a>         *m_cap_rawlog;  <span class="comment">//!&lt; The input file for rawlogs</span>
<a name="l00277"></a>00277 <span class="comment"></span>                        <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html" title="A class for grabing &amp;quot;range images&amp;quot; from a MESA imaging SwissRanger 3D cameras (SR-2...">CSwissRanger3DCamera</a>                            *m_cap_swissranger; <span class="comment">//!&lt; SR 3D camera object.</span>
<a name="l00278"></a>00278 <span class="comment"></span>                        <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_kinect.html" title="A class for grabing &amp;quot;range images&amp;quot;, intensity images and other information from an Xbox Kin...">CKinect</a>                             *m_cap_kinect;    <span class="comment">//!&lt; Kinect camera object.</span>
<a name="l00279"></a>00279 <span class="comment"></span>                        <span class="comment">// =========================</span>
<a name="l00280"></a>00280 
<a name="l00281"></a>00281                         <span class="keywordtype">int</span>                     m_camera_grab_decimator;
<a name="l00282"></a>00282                         <span class="keywordtype">int</span>                     m_camera_grab_decimator_counter;
<a name="l00283"></a>00283 
<a name="l00284"></a>00284                         <span class="keywordtype">int</span>                                                      m_preview_counter;
<a name="l00285"></a>00285                         <a class="code" href="structmrpt_1_1gui_1_1_c_display_window_ptr.html">mrpt::gui::CDisplayWindowPtr</a> m_preview_win1,m_preview_win2; <span class="comment">//!&lt; Normally we&#39;ll use only one window, but for stereo images we&#39;ll use two of them.</span>
<a name="l00286"></a>00286 <span class="comment"></span><span class="comment"></span>
<a name="l00287"></a>00287 <span class="comment">                        /** @name Stuff related to working threads to save images to disk</span>
<a name="l00288"></a>00288 <span class="comment">                            @{ */</span>
<a name="l00289"></a>00289                         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            m_external_image_saver_count; <span class="comment">//!&lt; Number of working threads. Default:1, set to 2 in quad cores.</span>
<a name="l00290"></a>00290 <span class="comment"></span>                        std::vector&lt;mrpt::system::TThreadHandle&gt;  m_threadImagesSaver;
<a name="l00291"></a>00291 
<a name="l00292"></a>00292                         <span class="keywordtype">bool</span>    m_threadImagesSaverShouldEnd;
<a name="l00293"></a>00293                         <a class="code" href="classmrpt_1_1synch_1_1_c_critical_section.html" title="This class provides simple critical sections functionality.">mrpt::synch::CCriticalSection</a>   m_csToSaveList;         <span class="comment">//!&lt; The critical section for m_toSaveList</span>
<a name="l00294"></a><a class="code" href="namespacemrpt_1_1hwdrivers.html#a3b6879dbc570ff8e371b8a87684269b4">00294</a> <span class="comment"></span>                        std::vector&lt;TListObservations&gt;  m_toSaveList;           <span class="comment">//!&lt; The queues of objects to be returned by getObservations, one for each working thread.</span>
<a name="l00295"></a>00295 <span class="comment"></span>                        <span class="keywordtype">void</span> thread_save_images(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> my_working_thread_index); <span class="comment">//!&lt; Thread to save images to files.</span>
<a name="l00296"></a>00296 <span class="comment"></span><span class="comment">                        /**  @} */</span>
<a name="l00297"></a>00297 
<a name="l00298"></a>00298                 }; <span class="comment">// end class</span>
<a name="l00299"></a>00299 
<a name="l00300"></a>00300                 <span class="keyword">typedef</span> <a class="code" href="classstlplus_1_1smart__ptr.html">stlplus::smart_ptr&lt;CCameraSensor&gt;</a>    <a class="code" href="namespacemrpt_1_1hwdrivers.html#a3b6879dbc570ff8e371b8a87684269b4" title="A smart pointer to a CCameraSensor.">CCameraSensorPtr</a>; <span class="comment">//!&lt; A smart pointer to a CCameraSensor</span>
<a name="l00301"></a>00301 <span class="comment"></span><span class="comment"></span>
<a name="l00302"></a>00302 <span class="comment">                /** Used only from MRPT apps: Use with caution since &quot;panel&quot; MUST be a &quot;mrpt::gui::CPanelCameraSelection *&quot;</span>
<a name="l00303"></a>00303 <span class="comment">                  */</span>
<a name="l00304"></a>00304                 <a class="code" href="namespacemrpt_1_1hwdrivers.html#a3b6879dbc570ff8e371b8a87684269b4" title="A smart pointer to a CCameraSensor.">CCameraSensorPtr</a> <a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a> <a class="code" href="namespacemrpt_1_1hwdrivers.html#aa0415790c846eaa233f15143acfac306" title="Used only from MRPT apps: Use with caution since &amp;quot;panel&amp;quot; MUST be a &amp;quot;mrpt::gui::CPanelC...">prepareVideoSourceFromPanel</a>(<span class="keywordtype">void</span> *panel);
<a name="l00305"></a>00305 <span class="comment"></span>
<a name="l00306"></a>00306 <span class="comment">                /** Parse the user options in the wxWidgets &quot;panel&quot; and write the configuration into the given section of the given configuration file.</span>
<a name="l00307"></a>00307 <span class="comment">                  * Use with caution since &quot;panel&quot; MUST be a &quot;mrpt::gui::CPanelCameraSelection *&quot;</span>
<a name="l00308"></a>00308 <span class="comment">                  * \sa prepareVideoSourceFromUserSelection, prepareVideoSourceFromPanel, readConfigIntoVideoSourcePanel</span>
<a name="l00309"></a>00309 <span class="comment">                  */</span>
<a name="l00310"></a>00310                 <span class="keywordtype">void</span> <a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a> <a class="code" href="namespacemrpt_1_1hwdrivers.html#ade012ef508575eda3a40a8e8af5ade10" title="Parse the user options in the wxWidgets &amp;quot;panel&amp;quot; and write the configuration into the given ...">writeConfigFromVideoSourcePanel</a>(
<a name="l00311"></a>00311                         <span class="keywordtype">void</span> *panel,
<a name="l00312"></a>00312                         <span class="keyword">const</span> std::string &amp;in_cfgfile_section_name,
<a name="l00313"></a>00313                         <a class="code" href="classmrpt_1_1utils_1_1_c_config_file_base.html" title="This class allows loading and storing values and vectors of different types from a configuration text...">mrpt::utils::CConfigFileBase</a> *out_cfgfile
<a name="l00314"></a>00314                         );
<a name="l00315"></a>00315 <span class="comment"></span>
<a name="l00316"></a>00316 <span class="comment">                /** Parse the given section of the given configuration file and set accordingly the controls of the wxWidgets &quot;panel&quot;.</span>
<a name="l00317"></a>00317 <span class="comment">                  * Use with caution since &quot;panel&quot; MUST be a &quot;mrpt::gui::CPanelCameraSelection *&quot;</span>
<a name="l00318"></a>00318 <span class="comment">                  * \sa prepareVideoSourceFromUserSelection, prepareVideoSourceFromPanel, writeConfigFromVideoSourcePanel</span>
<a name="l00319"></a>00319 <span class="comment">                  */</span>
<a name="l00320"></a>00320                 <span class="keywordtype">void</span> <a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a> <a class="code" href="namespacemrpt_1_1hwdrivers.html#ae1bc60d25c595b075be58ea224450a32" title="Parse the given section of the given configuration file and set accordingly the controls of the wxWid...">readConfigIntoVideoSourcePanel</a>(
<a name="l00321"></a>00321                         <span class="keywordtype">void</span> *panel,
<a name="l00322"></a>00322                         <span class="keyword">const</span> std::string &amp;in_cfgfile_section_name,
<a name="l00323"></a>00323                         <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_config_file_base.html" title="This class allows loading and storing values and vectors of different types from a configuration text...">mrpt::utils::CConfigFileBase</a> *in_cfgfile
<a name="l00324"></a>00324                         );
<a name="l00325"></a>00325 <span class="comment"></span>
<a name="l00326"></a>00326 <span class="comment">                /** Show to the user a list of possible camera drivers and creates and open the selected camera.</span>
<a name="l00327"></a>00327 <span class="comment">                  */</span>
<a name="l00328"></a>00328                 <a class="code" href="namespacemrpt_1_1hwdrivers.html#a3b6879dbc570ff8e371b8a87684269b4" title="A smart pointer to a CCameraSensor.">CCameraSensorPtr</a> <a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a> <a class="code" href="namespacemrpt_1_1hwdrivers.html#a9d0c0e836d0abcd45f253b11bc930641" title="Show to the user a list of possible camera drivers and creates and open the selected camera...">prepareVideoSourceFromUserSelection</a>();
<a name="l00329"></a>00329 
<a name="l00330"></a>00330 
<a name="l00331"></a>00331         } <span class="comment">// end namespace</span>
<a name="l00332"></a>00332 } <span class="comment">// end namespace</span>
<a name="l00333"></a>00333 
<a name="l00334"></a>00334 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.2</a> for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table> </body></html>