Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 4bc66056a634db26a1f4d0845dc41ca6 > files > 262

mrpt-doc-0.9.5-0.1.20110925svn2670.fc16.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>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.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" 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>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <div 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>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" 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">
<div class="title">CCameraSensor.h</div>  </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://www.mrpt.org/                                |</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>00090 <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>00095 <span class="comment">                  *    // For externaly stored images, the format of image files (default=jpg)</span>
<a name="l00096"></a>00096 <span class="comment">                  *    //external_images_format  = jpg</span>
<a name="l00097"></a>00097 <span class="comment">                  *</span>
<a name="l00098"></a>00098 <span class="comment">                  *    // For externaly stored images: whether to spawn independent threads to save the image files.</span>
<a name="l00099"></a>00099 <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>00101 <span class="comment">                  *    // If external_images_own_thread=1, this changes the number of threads to launch</span>
<a name="l00102"></a>00102 <span class="comment">                  *    //  to save image files. The default is determined from mrpt::system::getNumberOfProcessors()</span>
<a name="l00103"></a>00103 <span class="comment">                  *    //  and should be OK unless you want to save processor time for other things.</span>
<a name="l00104"></a>00104 <span class="comment">                  *    //external_images_own_thread_count = 2    // &gt;=1</span>
<a name="l00105"></a>00105 <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>00107 <span class="comment">                  *    //external_images_jpeg_quality = 95    // [1-100]. Default: 95</span>
<a name="l00108"></a>00108 <span class="comment">                  *</span>
<a name="l00109"></a>00109 <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>00111 <span class="comment">                  *    pose_y=0</span>
<a name="l00112"></a>00112 <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>00114 <span class="comment">                  *    pose_pitch=0</span>
<a name="l00115"></a>00115 <span class="comment">                  *    pose_roll=0</span>
<a name="l00116"></a>00116 <span class="comment">                  *</span>
<a name="l00117"></a>00117 <span class="comment">                  *    // Options for grabber_type= opencv  ------------------------------------</span>
<a name="l00118"></a>00118 <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>00120 <span class="comment">                  *    cv_frame_width   = 640     // [opencv] Capture width (not present or set to 0 for default)</span>
<a name="l00121"></a>00121 <span class="comment">                  *    cv_frame_height  = 480     // [opencv] Capture height (not present or set to 0 for default)</span>
<a name="l00122"></a>00122 <span class="comment">                  *    cv_fps           = 15      // [opencv] IEEE1394 cams only: Capture FPS (not present or 0 for default)</span>
<a name="l00123"></a>00123 <span class="comment">                  *    cv_gain          = 0       // [opencv] Camera gain, if available (nor present or set to 0 for default).</span>
<a name="l00124"></a>00124 <span class="comment">                  *</span>
<a name="l00125"></a>00125 <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>00127 <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>00128 <span class="comment">                  *    dc1394_frame_width       = 640</span>
<a name="l00129"></a>00129 <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>00131 <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>00142 <span class="comment">                  *    bumblebee_camera_index  = 0       // [bumblebee] Number of camera within the firewire bus to open (typically = 0)</span>
<a name="l00143"></a>00143 <span class="comment">                  *    bumblebee_frame_width   = 640     // [bumblebee] Capture width (not present or set to 0 for default)</span>
<a name="l00144"></a>00144 <span class="comment">                  *    bumblebee_frame_height  = 480     // [bumblebee] Capture height (not present or set to 0 for default)</span>
<a name="l00145"></a>00145 <span class="comment">                  *    bumblebee_fps           = 15      // [bumblebee] Capture FPS (not present or 0 for default)</span>
<a name="l00146"></a>00146 <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>00147 <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>00148 <span class="comment">                  *</span>
<a name="l00149"></a>00149 <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>00152 <span class="comment">                  *    // Options for grabber_type= rawlog -------------------------------------</span>
<a name="l00153"></a>00153 <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>00155 <span class="comment">                  *</span>
<a name="l00156"></a>00156 <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>00160 <span class="comment">                  *    sr_grab_3d         = true            // whether to save the 3D points</span>
<a name="l00161"></a>00161 <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>00163 <span class="comment">                  *</span>
<a name="l00164"></a>00164 <span class="comment">                  *    // Options for grabber_type= kinect -------------------------------------</span>
<a name="l00165"></a>00165 <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>00169 <span class="comment">                  *    kinect_video_rgb       = true            // Optional. If set to &quot;false&quot;, the IR intensity channel will be grabbed instead of the color RGB channel.</span>
<a name="l00170"></a>00170 <span class="comment">                  *</span>
<a name="l00171"></a>00171 <span class="comment">                  *  \endcode</span>
<a name="l00172"></a>00172 <span class="comment">                  *</span>
<a name="l00173"></a>00173 <span class="comment">                  *  \note The execution rate (in rawlog-grabber) should be greater than the required capture FPS.</span>
<a name="l00174"></a>00174 <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="l00175"></a>00175 <span class="comment">                  *  \sa mrpt::hwdrivers::CImageGrabber_OpenCV, mrpt::hwdrivers::CImageGrabber_dc1394, CGenericSensor, prepareVideoSourceFromUserSelection</span>
<a name="l00176"></a>00176 <span class="comment">                  * \ingroup mrpt_hwdrivers_grp</span>
<a name="l00177"></a>00177 <span class="comment">                  */</span>
<a name="l00178"></a>00178                 <span class="keyword">class </span><a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a> CCameraSensor : <span class="keyword">public</span> utils::CDebugOutputCapable, <span class="keyword">public</span> <a class="code" href="namespacemrpt_1_1hwdrivers.html#a3f369b2dbc16368a52f0ddab62ba5702">CGenericSensor</a>
<a name="l00179"></a>00179                 {
<a name="l00180"></a>00180                         <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>(CCameraSensor)
<a name="l00181"></a>00181 
<a name="l00182"></a>00182                 public:<span class="comment"></span>
<a name="l00183"></a>00183 <span class="comment">                        /** Constructor</span>
<a name="l00184"></a>00184 <span class="comment">                          *  The camera is not open until &quot;initialize&quot; is called.</span>
<a name="l00185"></a>00185 <span class="comment">                          */</span>
<a name="l00186"></a>00186                         CCameraSensor();
<a name="l00187"></a>00187 <span class="comment"></span>
<a name="l00188"></a>00188 <span class="comment">                        /** Destructor</span>
<a name="l00189"></a>00189 <span class="comment">                          */</span>
<a name="l00190"></a>00190                         virtual ~CCameraSensor();
<a name="l00191"></a>00191 <span class="comment"></span>
<a name="l00192"></a>00192 <span class="comment">                        /** This method should be called periodically (at least at 1Hz to capture ALL the real-time data)</span>
<a name="l00193"></a>00193 <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="l00194"></a>00194 <span class="comment">                        */</span>
<a name="l00195"></a>00195                         <span class="keywordtype">void</span>  doProcess();
<a name="l00196"></a>00196 <span class="comment"></span>
<a name="l00197"></a>00197 <span class="comment">                        /** Retrieves the next frame from the video source, raising an exception on any error.</span>
<a name="l00198"></a>00198 <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="l00199"></a>00199 <span class="comment">                          *             - mrpt::slam::CObservationImage (For normal cameras or video sources)</span>
<a name="l00200"></a>00200 <span class="comment">                          *             - mrpt::slam::CObservationStereoImages (For stereo cameras)</span>
<a name="l00201"></a>00201 <span class="comment">                          *             - mrpt::slam::CObservation3DRangeScan (For 3D cameras)</span>
<a name="l00202"></a>00202 <span class="comment">                          */</span>
<a name="l00203"></a>00203                         mrpt::slam::CObservationPtr getNextFrame();
<a name="l00204"></a>00204 <span class="comment"></span>
<a name="l00205"></a>00205 <span class="comment">                        /** Tries to open the camera, after setting all the parameters with a call to loadConfig.</span>
<a name="l00206"></a>00206 <span class="comment">                          *  \exception This method must throw an exception with a descriptive message if some critical error is found.</span>
<a name="l00207"></a>00207 <span class="comment">                          */</span>
<a name="l00208"></a>00208                         virtual <span class="keywordtype">void</span> initialize();
<a name="l00209"></a>00209 <span class="comment"></span>
<a name="l00210"></a>00210 <span class="comment">                        /** Close the camera (if open).</span>
<a name="l00211"></a>00211 <span class="comment">                          *   This method is called automatically on destruction.</span>
<a name="l00212"></a>00212 <span class="comment">                          */</span>
<a name="l00213"></a>00213                         <span class="keywordtype">void</span> close();
<a name="l00214"></a>00214 <span class="comment"></span>
<a name="l00215"></a>00215 <span class="comment">                        /**  Set the path where to save off-rawlog image files (this class DOES take into account this path).</span>
<a name="l00216"></a>00216 <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="l00217"></a>00217 <span class="comment">                          * \exception std::exception If the directory doesn&#39;t exists and cannot be created.</span>
<a name="l00218"></a>00218 <span class="comment">                          */</span>
<a name="l00219"></a>00219                         virtual <span class="keywordtype">void</span> setPathForExternalImages( const std::<span class="keywordtype">string</span> &amp;directory );
<a name="l00220"></a>00220 <span class="comment"></span>
<a name="l00221"></a>00221 <span class="comment">                        /** This must be called before initialize() */</span>
<a name="l00222"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a77829688dace4b277b1bea69d535498b">00222</a>                         <span class="keywordtype">void</span> enableLaunchOwnThreadForSavingImages(<span class="keywordtype">bool</span> enable=true) { m_external_images_own_thread = enable; };
<a name="l00223"></a>00223 
<a name="l00224"></a>00224                 <span class="keyword">protected</span>:
<a name="l00225"></a>00225                         poses<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).">::CPose3D</a>          m_sensorPose;
<a name="l00226"></a>00226 
<a name="l00227"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aaf671984b5749d78b7339a36ed57d85a">00227</a>                         std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aaf671984b5749d78b7339a36ed57d85a" title="Can be &quot;opencv&quot;,...">m_grabber_type</a>; <span class="comment">//!&lt; Can be &quot;opencv&quot;,...</span>
<a name="l00228"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a0fa82c35731262bd2b36c981e66888f3">00228</a> <span class="comment"></span>                        <span class="keywordtype">bool</span>                                                                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a0fa82c35731262bd2b36c981e66888f3">m_capture_grayscale</a>;
<a name="l00229"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#acfc86c9f3c6dd29213a966251c2374ab">00229</a>                         <span class="keywordtype">int</span>                                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#acfc86c9f3c6dd29213a966251c2374ab">m_cv_camera_index</a>;
<a name="l00230"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a9fd6a8707ba952838a11301cbd3220fc">00230</a>                         std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a9fd6a8707ba952838a11301cbd3220fc">m_cv_camera_type</a>;
<a name="l00231"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ae7db737ba5edce56c040874e9721024e">00231</a>                         mrpt<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...">::hwdrivers::TCaptureCVOptions</a>                      <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ae7db737ba5edce56c040874e9721024e">m_cv_options</a>;
<a name="l00232"></a>00232 
<a name="l00233"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7397593c8b4b534cdcfc3d5eb9827a79">00233</a>                         uint64_t                                                                <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7397593c8b4b534cdcfc3d5eb9827a79">m_dc1394_camera_guid</a>;
<a name="l00234"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#afef592f7d45f823474bcbfc062785ca3">00234</a>                         <span class="keywordtype">int</span>                                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#afef592f7d45f823474bcbfc062785ca3">m_dc1394_camera_unit</a>;
<a name="l00235"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa2adad8a0d3dda91848420dc99eb4382">00235</a>                         mrpt<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.">::hwdrivers::TCaptureOptions_dc1394</a> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa2adad8a0d3dda91848420dc99eb4382">m_dc1394_options</a>;
<a name="l00236"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aee3e4b361bee84a661086b37911ba492">00236</a>                         <span class="keywordtype">int</span>                                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aee3e4b361bee84a661086b37911ba492">m_preview_decimation</a>;
<a name="l00237"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ab400bbffed31c9801dede18ba0cefa8a">00237</a>                         <span class="keywordtype">int</span>                                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ab400bbffed31c9801dede18ba0cefa8a">m_preview_reduction</a>;
<a name="l00238"></a>00238 
<a name="l00239"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a78850d2a829f9ea8119b79d736ee4a9e">00239</a>                         <span class="keywordtype">int</span>                                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a78850d2a829f9ea8119b79d736ee4a9e">m_bumblebee_camera_index</a>;
<a name="l00240"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a83abcfdfd6cd94570d9d3a35abf2e0fb">00240</a>                         mrpt<a class="code" href="structmrpt_1_1hwdrivers_1_1_t_capture_options__bumblebee.html" title="Options used when creating a bumblebee camera capture object.">::hwdrivers::TCaptureOptions_bumblebee</a>      <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a83abcfdfd6cd94570d9d3a35abf2e0fb">m_bumblebee_options</a>;
<a name="l00241"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aeecca3fd7cba706a4fc52d1f68d9f676">00241</a>                         <span class="keywordtype">int</span>                                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aeecca3fd7cba706a4fc52d1f68d9f676">m_bumblebee_monocam</a>; <span class="comment">// 0:Left, 1: Right, &lt;0,&gt;1 -&gt; Stereo</span>
<a name="l00242"></a>00242 
<a name="l00243"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a873ca07aa1b01829a03efd25688256f2">00243</a>                         <span class="keywordtype">int</span>                                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a873ca07aa1b01829a03efd25688256f2">m_svs_camera_index</a>;
<a name="l00244"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7bb1b9465a5a7c35c33e8c4f358f8650">00244</a>                         mrpt<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.">::hwdrivers::TCaptureOptions_SVS</a>    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7bb1b9465a5a7c35c33e8c4f358f8650">m_svs_options</a>;
<a name="l00245"></a>00245 
<a name="l00246"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a902ec02bcd95e0f0a109f0f9b9868951">00246</a>                         std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a902ec02bcd95e0f0a109f0f9b9868951">m_ffmpeg_url</a>;
<a name="l00247"></a>00247 
<a name="l00248"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a469c2768cc14ae9473615767b85c89e1">00248</a>                         std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a469c2768cc14ae9473615767b85c89e1">m_rawlog_file</a>;
<a name="l00249"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#afecf08da5e85a5afd8f2bdc2907537ac">00249</a>                         std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#afecf08da5e85a5afd8f2bdc2907537ac">m_rawlog_camera_sensor_label</a>;
<a name="l00250"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a707b6287faa95954136cdad29b6200cf">00250</a>                         std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>                                                             <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a707b6287faa95954136cdad29b6200cf">m_rawlog_detected_images_dir</a>;
<a name="l00251"></a>00251 
<a name="l00252"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a5fd11474e01f63b10e66638ced17dda2">00252</a>                         <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a5fd11474e01f63b10e66638ced17dda2" title="true: USB, false: ETH">m_sr_open_from_usb</a>; <span class="comment">//!&lt; true: USB, false: ETH</span>
<a name="l00253"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a35af572877c5fa85fd4ae333fe868b8a">00253</a> <span class="comment"></span>                        std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>     <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a35af572877c5fa85fd4ae333fe868b8a">m_sr_ip_address</a>;
<a name="l00254"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a68f1e42367f23acb9b149bb307ad1ebd">00254</a>                         <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a68f1e42367f23acb9b149bb307ad1ebd" title="Save the 3D point cloud (default: true)">m_sr_save_3d</a>;                   <span class="comment">//!&lt; Save the 3D point cloud (default: true)</span>
<a name="l00255"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa53445cc2e7ca37313439974463c13d2">00255</a> <span class="comment"></span>                        <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa53445cc2e7ca37313439974463c13d2" title="Save the 2D range image (default: true)">m_sr_save_range_img</a>;    <span class="comment">//!&lt; Save the 2D range image (default: true)</span>
<a name="l00256"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a72e631ed218dcddd2fc736081ec48ac6">00256</a> <span class="comment"></span>                        <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a72e631ed218dcddd2fc736081ec48ac6" title="Save the 2D intensity image (default: true)">m_sr_save_intensity_img</a>; <span class="comment">//!&lt; Save the 2D intensity image (default: true)</span>
<a name="l00257"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a06765ebed30fdb8f11fbbddb150b1d5c">00257</a> <span class="comment"></span>                        <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a06765ebed30fdb8f11fbbddb150b1d5c" title="Save the estimated confidence 2D image (default: false)">m_sr_save_confidence</a>;   <span class="comment">//!&lt; Save the estimated confidence 2D image (default: false)</span>
<a name="l00258"></a>00258 <span class="comment"></span>
<a name="l00259"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a268b17a06e4a26aa56a8f7f69be5d645">00259</a>                         <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a268b17a06e4a26aa56a8f7f69be5d645" title="Save the 3D point cloud (default: true)">m_kinect_save_3d</a>;                       <span class="comment">//!&lt; Save the 3D point cloud (default: true)</span>
<a name="l00260"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a1c5b6fce23344c96cd641a695d67630f">00260</a> <span class="comment"></span>                        <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a1c5b6fce23344c96cd641a695d67630f" title="Save the 2D range image (default: true)">m_kinect_save_range_img</a>;        <span class="comment">//!&lt; Save the 2D range image (default: true)</span>
<a name="l00261"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a9a5845424a5e9082ae3530894544773b">00261</a> <span class="comment"></span>                        <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a9a5845424a5e9082ae3530894544773b" title="Save the 2D intensity image (default: true)">m_kinect_save_intensity_img</a>; <span class="comment">//!&lt; Save the 2D intensity image (default: true)</span>
<a name="l00262"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a62916d64050351f6e089cc14dcd3bec2">00262</a> <span class="comment"></span>                        <span class="keywordtype">bool</span>                    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a62916d64050351f6e089cc14dcd3bec2" title="Save RGB or IR channels (default:true)">m_kinect_video_rgb</a>;                     <span class="comment">//!&lt; Save RGB or IR channels (default:true)</span>
<a name="l00263"></a>00263 <span class="comment"></span>
<a name="l00264"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a651913cf3d2f7f168f77f31c89ec1627">00264</a>                         <span class="keywordtype">bool</span>                            <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a651913cf3d2f7f168f77f31c89ec1627" title="Whether to launch independent thread.">m_external_images_own_thread</a>; <span class="comment">//!&lt; Whether to launch independent thread</span>
<a name="l00265"></a>00265 <span class="comment"></span><span class="comment"></span>
<a name="l00266"></a>00266 <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="l00267"></a>00267 <span class="comment">                          *  See hwdrivers::CCameraSensor for the possible parameters</span>
<a name="l00268"></a>00268 <span class="comment">                          */</span>
<a name="l00269"></a>00269                         <span class="keywordtype">void</span>  loadConfig_sensorSpecific(
<a name="l00270"></a>00270                                 <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="l00271"></a>00271                                 <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a>         &amp;iniSection );
<a name="l00272"></a>00272 
<a name="l00273"></a>00273                 <span class="keyword">private</span>:
<a name="l00274"></a>00274                         <span class="comment">// Only one of these will be !=NULL at a time ===========</span>
<a name="l00275"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a634f637cd8810294b592930475ec7e89">00275</a>                         <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_image_grabber___open_c_v.html" title="A class for grabing images from a &quot;OpenCV&quot;-compatible camera, or from an AVI video file...">CImageGrabber_OpenCV</a>                            *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a634f637cd8810294b592930475ec7e89" title="The OpenCV capture object.">m_cap_cv</a>;              <span class="comment">//!&lt; The OpenCV capture object.</span>
<a name="l00276"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a760ce1620646ac7d784b4710ce8baad7">00276</a> <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>                            *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a760ce1620646ac7d784b4710ce8baad7" title="The dc1394 capture object.">m_cap_dc1394</a>;  <span class="comment">//!&lt; The dc1394 capture object.</span>
<a name="l00277"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aee5988a0f6ccf173b3c7770a1be4a566">00277</a> <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 &quot;Bumblebee&quot; or &quot;Bumblebee2&quot; camera NOTE:">CStereoGrabber_Bumblebee</a>                        *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aee5988a0f6ccf173b3c7770a1be4a566" title="The bumblebee capture object.">m_cap_bumblebee</a>;       <span class="comment">//!&lt; The bumblebee capture object.</span>
<a name="l00278"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#af1173a63aec70ae01ce962fc192a819d">00278</a> <span class="comment"></span>                        mrpt<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:">::hwdrivers::CStereoGrabber_SVS</a>        *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#af1173a63aec70ae01ce962fc192a819d" title="The svs capture object.">m_cap_svs</a>;  <span class="comment">//!&lt; The svs capture object.</span>
<a name="l00279"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ac60eb66e87c342e898721368c4474258">00279</a> <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>                                     *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ac60eb66e87c342e898721368c4474258" title="The FFMPEG capture object.">m_cap_ffmpeg</a>;  <span class="comment">//!&lt; The FFMPEG capture object</span>
<a name="l00280"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a4fec049d337e4a6c6a3c1c13629a9537">00280</a> <span class="comment"></span>                        mrpt<a class="code" href="classmrpt_1_1utils_1_1_c_file_g_z_input_stream.html" title="Transparently opens a compressed &quot;gz&quot; file and reads uncompressed data from it.">::utils::CFileGZInputStream</a>         *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a4fec049d337e4a6c6a3c1c13629a9537" title="The input file for rawlogs.">m_cap_rawlog</a>;  <span class="comment">//!&lt; The input file for rawlogs</span>
<a name="l00281"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a0576e846b0e1760eee761b58f64f5fe2">00281</a> <span class="comment"></span>                        <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html" title="A class for grabing &quot;range images&quot; from a MESA imaging SwissRanger 3D cameras (SR-2, SR-3000, SR-4k).">CSwissRanger3DCamera</a>                            *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a0576e846b0e1760eee761b58f64f5fe2" title="SR 3D camera object.">m_cap_swissranger</a>; <span class="comment">//!&lt; SR 3D camera object.</span>
<a name="l00282"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a84e548f1d9200a557fdcfe6ca018b50b">00282</a> <span class="comment"></span>                        <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_kinect.html" title="A class for grabing &quot;range images&quot;, intensity images (either RGB or IR) and other information from an...">CKinect</a>                             *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a84e548f1d9200a557fdcfe6ca018b50b" title="Kinect camera object.">m_cap_kinect</a>;    <span class="comment">//!&lt; Kinect camera object.</span>
<a name="l00283"></a>00283 <span class="comment"></span>                        <span class="comment">// =========================</span>
<a name="l00284"></a>00284 
<a name="l00285"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a2d77c04689ffa443122a738aafd3ced0">00285</a>                         <span class="keywordtype">int</span>                     <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a2d77c04689ffa443122a738aafd3ced0">m_camera_grab_decimator</a>;
<a name="l00286"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa93688ec44f664bacb93b4399ce58c00">00286</a>                         <span class="keywordtype">int</span>                     <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#aa93688ec44f664bacb93b4399ce58c00">m_camera_grab_decimator_counter</a>;
<a name="l00287"></a>00287 
<a name="l00288"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a74b0f7f41dd5fd3efd83d51a65b8b83d">00288</a>                         <span class="keywordtype">int</span>                                                      <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a74b0f7f41dd5fd3efd83d51a65b8b83d">m_preview_counter</a>;
<a name="l00289"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7d57a5e445b60474fee113189cc2d6e9">00289</a>                         mrpt<a class="code" href="structmrpt_1_1gui_1_1_c_display_window_ptr.html">::gui::CDisplayWindowPtr</a> m_preview_win1,<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a7d57a5e445b60474fee113189cc2d6e9" title="Normally we&#39;ll use only one window, but for stereo images we&#39;ll use two of them.">m_preview_win2</a>; <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="l00290"></a>00290 <span class="comment"></span><span class="comment"></span>
<a name="l00291"></a>00291 <span class="comment">                        /** @name Stuff related to working threads to save images to disk</span>
<a name="l00292"></a>00292 <span class="comment">                            @{ */</span>
<a name="l00293"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a2a04bc9c3cefa535b6fbdd4f0dcbdbbc">00293</a>                         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a2a04bc9c3cefa535b6fbdd4f0dcbdbbc" title="Number of working threads. Default:1, set to 2 in quad cores.">m_external_image_saver_count</a>; <span class="comment">//!&lt; Number of working threads. Default:1, set to 2 in quad cores.</span>
<a name="l00294"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a8203b2017d89347342e53bc0e3a3a32b">00294</a> <span class="comment"></span>                        std<a class="code" href="classstd_1_1vector.html">::vector&lt;mrpt::system::TThreadHandle&gt;</a>  <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a8203b2017d89347342e53bc0e3a3a32b">m_threadImagesSaver</a>;
<a name="l00295"></a>00295 
<a name="l00296"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a5d6216f668acfe011f135a5d1086117f">00296</a>                         <span class="keywordtype">bool</span>    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a5d6216f668acfe011f135a5d1086117f">m_threadImagesSaverShouldEnd</a>;
<a name="l00297"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ac6724623cf19ade429af86cc3542d794">00297</a>                         mrpt<a class="code" href="classmrpt_1_1synch_1_1_c_critical_section.html" title="This class provides simple critical sections functionality.">::synch::CCriticalSection</a>   <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#ac6724623cf19ade429af86cc3542d794" title="The critical section for m_toSaveList.">m_csToSaveList</a>;         <span class="comment">//!&lt; The critical section for m_toSaveList</span>
<a name="l00298"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a607dca476c97c764e8902043be7e6c5c">00298</a> <span class="comment"></span>                        std<a class="code" href="classstd_1_1vector.html">::vector&lt;TListObservations&gt;</a>  <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_camera_sensor.html#a607dca476c97c764e8902043be7e6c5c" title="The queues of objects to be returned by getObservations, one for each working thread.">m_toSaveList</a>;           <span class="comment">//!&lt; The queues of objects to be returned by getObservations, one for each working thread.</span>
<a name="l00299"></a>00299 <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="l00300"></a>00300 <span class="comment"></span><span class="comment">                        /**  @} */</span>
<a name="l00301"></a>00301 
<a name="l00302"></a>00302                 }; <span class="comment">// end class</span>
<a name="l00303"></a>00303 
<a name="l00304"></a><a class="code" href="namespacemrpt_1_1hwdrivers.html#a3b6879dbc570ff8e371b8a87684269b4">00304</a>                 <span class="keyword">typedef</span> stlplus::smart_ptr&lt;CCameraSensor&gt;    <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="l00305"></a>00305 <span class="comment"></span><span class="comment"></span>
<a name="l00306"></a>00306 <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="l00307"></a>00307 <span class="comment">                  */</span>
<a name="l00308"></a>00308                 <a class="code" href="classstlplus_1_1smart__ptr.html">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 &quot;panel&quot; MUST be a &quot;mrpt::gui::CPanelCameraSelection ...">prepareVideoSourceFromPanel</a>(<span class="keywordtype">void</span> *panel);
<a name="l00309"></a>00309 <span class="comment"></span>
<a name="l00310"></a>00310 <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="l00311"></a>00311 <span class="comment">                  * Use with caution since &quot;panel&quot; MUST be a &quot;mrpt::gui::CPanelCameraSelection *&quot;</span>
<a name="l00312"></a>00312 <span class="comment">                  * \sa prepareVideoSourceFromUserSelection, prepareVideoSourceFromPanel, readConfigIntoVideoSourcePanel</span>
<a name="l00313"></a>00313 <span class="comment">                  */</span>
<a name="l00314"></a>00314                 <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 &quot;panel&quot; and write the configuration into the given section of...">writeConfigFromVideoSourcePanel</a>(
<a name="l00315"></a>00315                         <span class="keywordtype">void</span> *panel,
<a name="l00316"></a>00316                         <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;in_cfgfile_section_name,
<a name="l00317"></a>00317                         <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="l00318"></a>00318                         );
<a name="l00319"></a>00319 <span class="comment"></span>
<a name="l00320"></a>00320 <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="l00321"></a>00321 <span class="comment">                  * Use with caution since &quot;panel&quot; MUST be a &quot;mrpt::gui::CPanelCameraSelection *&quot;</span>
<a name="l00322"></a>00322 <span class="comment">                  * \sa prepareVideoSourceFromUserSelection, prepareVideoSourceFromPanel, writeConfigFromVideoSourcePanel</span>
<a name="l00323"></a>00323 <span class="comment">                  */</span>
<a name="l00324"></a>00324                 <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="l00325"></a>00325                         <span class="keywordtype">void</span> *panel,
<a name="l00326"></a>00326                         <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;in_cfgfile_section_name,
<a name="l00327"></a>00327                         <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="l00328"></a>00328                         );
<a name="l00329"></a>00329 <span class="comment"></span>
<a name="l00330"></a>00330 <span class="comment">                /** Show to the user a list of possible camera drivers and creates and open the selected camera.</span>
<a name="l00331"></a>00331 <span class="comment">                  */</span>
<a name="l00332"></a>00332                 <a class="code" href="classstlplus_1_1smart__ptr.html">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="l00333"></a>00333 
<a name="l00334"></a>00334 
<a name="l00335"></a>00335         } <span class="comment">// end namespace</span>
<a name="l00336"></a>00336 } <span class="comment">// end namespace</span>
<a name="l00337"></a>00337 
<a name="l00338"></a>00338 <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.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table>  </body></html>