Sophie

Sophie

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

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>CSwissRanger3DCamera.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">CSwissRanger3DCamera.h</div>  </div>
</div>
<div class="contents">
<a href="_c_swiss_ranger3_d_camera_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 <span class="preprocessor">#ifndef CSwissRanger3DCamera_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define CSwissRanger3DCamera_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;<a class="code" href="_c_generic_sensor_8h.html">mrpt/hwdrivers/CGenericSensor.h</a>&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="_c_observation_image_8h.html">mrpt/slam/CObservationImage.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="_c_observation3_d_range_scan_8h.html">mrpt/slam/CObservation3DRangeScan.h</a>&gt;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;<a class="code" href="_c_display_window_8h.html">mrpt/gui/CDisplayWindow.h</a>&gt;</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;<a class="code" href="hwdrivers_2include_2mrpt_2hwdrivers_2link__pragmas_8h.html">mrpt/hwdrivers/link_pragmas.h</a>&gt;</span>
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="keyword">namespace </span>mrpt
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041         <span class="keyword">namespace </span>hwdrivers
<a name="l00042"></a>00042         {<span class="comment"></span>
<a name="l00043"></a>00043 <span class="comment">                /** A class for grabing &quot;range images&quot; from a MESA imaging SwissRanger 3D cameras (SR-2, SR-3000, SR-4k).</span>
<a name="l00044"></a>00044 <span class="comment">                  * </span>
<a name="l00045"></a>00045 <span class="comment">                  * NOTES:</span>
<a name="l00046"></a>00046 <span class="comment">                  *             - This class requires a vendor specific driver installed in the system in order to build MRPT with support for this sensor. Download and install the driver from: http://www.mesa-imaging.ch/drivers.php</span>
<a name="l00047"></a>00047 <span class="comment">                  *             - The intensity channel (grayscale image) is converted from 16bit to standard 8bit-per-pixel using a logarithmic, modified A-law compression. This allows exploiting the full dynamic range of the sensor and provides quite good results.</span>
<a name="l00048"></a>00048 <span class="comment">                  *</span>
<a name="l00049"></a>00049 <span class="comment">                  * As with any other CGenericSensor class, the normal sequence of methods to be called is:</span>
<a name="l00050"></a>00050 <span class="comment">                  *   - loadConfig() - Or calls to the individual setXXX() to configure the camera parameters.</span>
<a name="l00051"></a>00051 <span class="comment">                  *   - initialize() - to init the comms with the camera</span>
<a name="l00052"></a>00052 <span class="comment">                  *   - call getNextObservation() for getting the frames.</span>
<a name="l00053"></a>00053 <span class="comment">                  *</span>
<a name="l00054"></a>00054 <span class="comment">                  *  This sensor can be also used from within rawlog-grabber.</span>
<a name="l00055"></a>00055 <span class="comment">                  *</span>
<a name="l00056"></a>00056 <span class="comment">                  *  \code</span>
<a name="l00057"></a>00057 <span class="comment">                  *  PARAMETERS IN THE &quot;.INI&quot;-LIKE CONFIGURATION STRINGS:</span>
<a name="l00058"></a>00058 <span class="comment">                  * -------------------------------------------------------</span>
<a name="l00059"></a>00059 <span class="comment">                  *   [supplied_section_name]</span>
<a name="l00060"></a>00060 <span class="comment">                  *    sensorLabel  = CAM3D         // A text description</span>
<a name="l00061"></a>00061 <span class="comment">                  *    preview_window  = true       // Show a window with a preview of the grabbed data in real-time</span>
<a name="l00062"></a>00062 <span class="comment">                  *</span>
<a name="l00063"></a>00063 <span class="comment">                  *    open_USB     = true          // false means ethernet (default: true)</span>
<a name="l00064"></a>00064 <span class="comment">                  *    USB_serial   = 0x4000002f    // only for open_USB=true. If not set, the first camera will be open. Serial is the last part of S/N (e.g.  for the camera SN: 00-00-40-00-00-2F).</span>
<a name="l00065"></a>00065 <span class="comment">                  *    IP_address   = 192.168.2.14  // only for open_USB=false. The IP of the camera.</span>
<a name="l00066"></a>00066 <span class="comment">                  *</span>
<a name="l00067"></a>00067 <span class="comment">                  *    // Options for the data to save in each CObservation3DRangeScan</span>
<a name="l00068"></a>00068 <span class="comment">                  *    save_3d            = true                        // Save the 3D point cloud (default: true)</span>
<a name="l00069"></a>00069 <span class="comment">                  *    save_range_img     = true                        // Save the 2D range image (default: true)</span>
<a name="l00070"></a>00070 <span class="comment">                  *    save_intensity_img = true                        // Save the 2D intensity image (default: true)</span>
<a name="l00071"></a>00071 <span class="comment">                  *    save_confidence    = true                        // Save the estimated confidence 2D image (default: false)</span>
<a name="l00072"></a>00072 <span class="comment">                  *</span>
<a name="l00073"></a>00073 <span class="comment">                  *    enable_img_hist_equal = false            // Enable intensity image histogram equalization (default: false)</span>
<a name="l00074"></a>00074 <span class="comment">                  *    enable_median_filter  = true                     // Enable median filter in range data (default: true)</span>
<a name="l00075"></a>00075 <span class="comment">                  *    enable_mediancross_filter = false        // Enable median cross-filter (default: false)</span>
<a name="l00076"></a>00076 <span class="comment">                  *    enable_conv_gray      = false            // Enable intensity image scale with range (default: false)</span>
<a name="l00077"></a>00077 <span class="comment">                  *    enable_denoise_anf    = true                     // Enable this noise filter (default: true)</span>
<a name="l00078"></a>00078 <span class="comment">                  *</span>
<a name="l00079"></a>00079 <span class="comment">                  *    // Camera calibration parameters: See mrpt::utils::TCamera</span>
<a name="l00080"></a>00080 <span class="comment">                  *    //  If not provided, a set of default parameters for a SR4000 camera will be loaded.</span>
<a name="l00081"></a>00081 <span class="comment">                  *    resolution = [176 144]</span>
<a name="l00082"></a>00082 <span class="comment">                  *    cx         = 87.99958</span>
<a name="l00083"></a>00083 <span class="comment">                  *    cy         = 68.99957</span>
<a name="l00084"></a>00084 <span class="comment">                  *    fx         = 262.9201</span>
<a name="l00085"></a>00085 <span class="comment">                  *    fy         = 262.9218</span>
<a name="l00086"></a>00086 <span class="comment">                  *    dist       = [-8.258543e-01 6.561022e-01 2.699818e-06 -3.263559e-05 0]</span>
<a name="l00087"></a>00087 <span class="comment">                  *</span>
<a name="l00088"></a>00088 <span class="comment">                  *    // For externaly stored images, the format of image files (default=jpg)</span>
<a name="l00089"></a>00089 <span class="comment">                  *    //external_images_format  = jpg</span>
<a name="l00090"></a>00090 <span class="comment">                  *    // (Only when external_images_format=jpg): Optional parameter to set the JPEG compression quality:</span>
<a name="l00091"></a>00091 <span class="comment">                  *    //external_images_jpeg_quality = 95    // [1-100]. Default: 95</span>
<a name="l00092"></a>00092 <span class="comment">                  *</span>
<a name="l00093"></a>00093 <span class="comment">                  *    pose_x=0.21      // Camera position in the robot (meters)</span>
<a name="l00094"></a>00094 <span class="comment">                  *    pose_y=0</span>
<a name="l00095"></a>00095 <span class="comment">                  *    pose_z=0.34</span>
<a name="l00096"></a>00096 <span class="comment">                  *    pose_yaw=0       // Angles in degrees</span>
<a name="l00097"></a>00097 <span class="comment">                  *    pose_pitch=0</span>
<a name="l00098"></a>00098 <span class="comment">                  *    pose_roll=0</span>
<a name="l00099"></a>00099 <span class="comment">                  *</span>
<a name="l00100"></a>00100 <span class="comment">                  *  \endcode</span>
<a name="l00101"></a>00101 <span class="comment">                  * \ingroup mrpt_hwdrivers_grp</span>
<a name="l00102"></a>00102 <span class="comment">                  */</span>
<a name="l00103"></a>00103                 <span class="keyword">class </span><a class="code" href="hwdrivers__impexp_8h.html#a5bcf681973c7e4e76310bd0791f1b612">HWDRIVERS_IMPEXP</a>  CSwissRanger3DCamera : <span class="keyword">public</span> mrpt::hwdrivers::<a class="code" href="namespacemrpt_1_1hwdrivers.html#a3f369b2dbc16368a52f0ddab62ba5702">CGenericSensor</a>
<a name="l00104"></a>00104                 {
<a name="l00105"></a>00105                         <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>(CSwissRanger3DCamera)
<a name="l00106"></a>00106 
<a name="l00107"></a>00107                 public:
<a name="l00108"></a>00108                         CSwissRanger3DCamera();  <span class="comment">//!&lt; Default ctor</span>
<a name="l00109"></a>00109 <span class="comment"></span>                        ~CSwissRanger3DCamera();         <span class="comment">//!&lt; Default ctor</span>
<a name="l00110"></a>00110 <span class="comment"></span><span class="comment"></span>
<a name="l00111"></a>00111 <span class="comment">                        /** Initializes the 3D camera - should be invoked after calling loadConfig()</span>
<a name="l00112"></a>00112 <span class="comment">                          *  \exception This method must throw an exception with a descriptive message if some critical error is found.</span>
<a name="l00113"></a>00113 <span class="comment">                          */</span>
<a name="l00114"></a>00114                         virtual <span class="keywordtype">void</span> initialize();
<a name="l00115"></a>00115 <span class="comment"></span>
<a name="l00116"></a>00116 <span class="comment">                        /** To be called  at a high rate (&gt;XX Hz), this method populates the internal buffer of received observations.</span>
<a name="l00117"></a>00117 <span class="comment">                          *  This method is mainly intended for usage within rawlog-grabber or similar programs.</span>
<a name="l00118"></a>00118 <span class="comment">                          *  For an alternative, see getNextObservation()</span>
<a name="l00119"></a>00119 <span class="comment">                          *  \exception This method must throw an exception with a descriptive message if some critical error is found.</span>
<a name="l00120"></a>00120 <span class="comment">                          * \sa getNextObservation</span>
<a name="l00121"></a>00121 <span class="comment">                          */</span>
<a name="l00122"></a>00122                         virtual <span class="keywordtype">void</span> doProcess();
<a name="l00123"></a>00123 <span class="comment"></span>
<a name="l00124"></a>00124 <span class="comment">                        /** The main data retrieving function, to be called after calling loadConfig() and initialize().</span>
<a name="l00125"></a>00125 <span class="comment">                          *  \param out_obs The output retrieved observation (only if there_is_obs=true).</span>
<a name="l00126"></a>00126 <span class="comment">                          *  \param there_is_obs If set to false, there was no new observation.</span>
<a name="l00127"></a>00127 <span class="comment">                          *  \param hardware_error True on hardware/comms error.</span>
<a name="l00128"></a>00128 <span class="comment">                          *</span>
<a name="l00129"></a>00129 <span class="comment">                          * \sa doProcess</span>
<a name="l00130"></a>00130 <span class="comment">                          */</span>
<a name="l00131"></a>00131                         <span class="keywordtype">void</span> getNextObservation( mrpt::slam::CObservation3DRangeScan &amp;out_obs, <span class="keywordtype">bool</span> &amp;there_is_obs, <span class="keywordtype">bool</span> &amp;hardware_error );
<a name="l00132"></a>00132 
<a name="l00133"></a>00133 
<a name="l00134"></a>00134                         <span class="keywordtype">bool</span> open(); <span class="comment">//!&lt; return false on error - Called automatically from initialize(), no need normally for the user to call this.</span>
<a name="l00135"></a>00135 <span class="comment"></span>                        <span class="keywordtype">void</span> close();
<a name="l00136"></a>00136 
<a name="l00137"></a>00137                         <span class="keywordtype">bool</span> isOpen() const; <span class="comment">//!&lt; whether the camera is open and comms work ok. To be called after initialize()</span>
<a name="l00138"></a>00138 <span class="comment"></span><span class="comment"></span>
<a name="l00139"></a>00139 <span class="comment">                        /** Get the row count in the camera images, loaded automatically upon camera open(). */</span>
<a name="l00140"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ac1051d0d55e65c7bd4168825eb35aab1">00140</a>                         <span class="keywordtype">size_t</span> <a class="code" href="eigen__plugins_8h.html#a61275d6dcd40b0676f9a430be46ef876" title="Get number of rows.">getRowCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_rows; }<span class="comment"></span>
<a name="l00141"></a>00141 <span class="comment">                        /** Get the col count in the camera images, loaded automatically upon camera open(). */</span>
<a name="l00142"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aad326ea395f685e9a310ff75cfacf666">00142</a>                         <span class="keywordtype">size_t</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aad326ea395f685e9a310ff75cfacf666" title="Get the col count in the camera images, loaded automatically upon camera open().">getColCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_cols; }
<a name="l00143"></a>00143 <span class="comment"></span>
<a name="l00144"></a>00144 <span class="comment">                        /** Get the camera serial number, loaded automatically upon camera open(). */</span>
<a name="l00145"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ad57ad09c399f8eac837c0d90b80e7d77">00145</a>                         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ad57ad09c399f8eac837c0d90b80e7d77" title="Get the camera serial number, loaded automatically upon camera open().">getCameraSerialNumber</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_cam_serial_num; }
<a name="l00146"></a>00146 <span class="comment"></span>
<a name="l00147"></a>00147 <span class="comment">                        /** Returns the maximum camera range, as deduced from its operating frequency. */</span>
<a name="l00148"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a9190a9b758961eaddc74b787cd59dbc4">00148</a>                         <span class="keywordtype">double</span>  <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a9190a9b758961eaddc74b787cd59dbc4" title="Returns the maximum camera range, as deduced from its operating frequency.">getMaxRange</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_maxRange; }
<a name="l00149"></a>00149 <span class="comment"></span>
<a name="l00150"></a>00150 <span class="comment">                        /**  Set the path where to save off-rawlog image files (this class DOES take into account this path).</span>
<a name="l00151"></a>00151 <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="l00152"></a>00152 <span class="comment">                          * \exception std::exception If the directory doesn&#39;t exists and cannot be created.</span>
<a name="l00153"></a>00153 <span class="comment">                          */</span>
<a name="l00154"></a>00154                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPathForExternalImages( <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;directory );
<a name="l00155"></a>00155 <span class="comment"></span>
<a name="l00156"></a>00156 <span class="comment">                        /** @name Capture configuration methods (apart from loadConfig)</span>
<a name="l00157"></a>00157 <span class="comment">                            @{ */</span>
<a name="l00158"></a>00158 <span class="comment"></span>
<a name="l00159"></a>00159 <span class="comment">                        /** true: open from USB, false: open from ethernet. */</span>
<a name="l00160"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ad713b3d86e65da3b0db5508ad356aff5">00160</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ad713b3d86e65da3b0db5508ad356aff5" title="true: open from USB, false: open from ethernet.">setOpenFromUSB</a>(<span class="keywordtype">bool</span> USB) { m_open_from_usb = USB; }
<a name="l00161"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a37d8a75ad7901d8f72adb31f72275f2d">00161</a>                         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a37d8a75ad7901d8f72adb31f72275f2d">getOpenFromUSBMode</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_open_from_usb; }
<a name="l00162"></a>00162 
<a name="l00163"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a6303d91703abe9a6bb582d61f0ed190d">00163</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a6303d91703abe9a6bb582d61f0ed190d">setOpenIPAddress</a>(<span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;IP)  { m_ip_address = IP; }
<a name="l00164"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ad8c048ee8da7f2f87be75559b330f2fa">00164</a>                         <span class="keyword">inline</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_swiss_ranger3_d_camera.html#ad8c048ee8da7f2f87be75559b330f2fa">getOpenIPAddress</a>()<span class="keyword"> const  </span>{ <span class="keywordflow">return</span> m_ip_address; }
<a name="l00165"></a>00165 
<a name="l00166"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a7a73eee28f2db2f8113a904cf8051b2e">00166</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a7a73eee28f2db2f8113a904cf8051b2e">setSave3D</a>(<span class="keywordtype">bool</span> save) { m_save_3d = save; }
<a name="l00167"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a5e3504b855a0426b26be06ee6bd8fe00">00167</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a5e3504b855a0426b26be06ee6bd8fe00">setSaveRangeImage</a>(<span class="keywordtype">bool</span> save) { m_save_range_img = save; }
<a name="l00168"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a173551bc0741aed90a40c66d447b5d86">00168</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a173551bc0741aed90a40c66d447b5d86">setSaveIntensityImage</a>(<span class="keywordtype">bool</span> save) { m_save_intensity_img = save; }
<a name="l00169"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ab8ca58fc1e63c104df619c92871a9070">00169</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ab8ca58fc1e63c104df619c92871a9070">setSaveConfidenceImage</a>(<span class="keywordtype">bool</span> save) { m_save_confidence = save; }
<a name="l00170"></a>00170 
<a name="l00171"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#afeb1f66f9f9dbc2ed065f876ff75b8c9">00171</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#afeb1f66f9f9dbc2ed065f876ff75b8c9">enableImageHistEqualization</a>(<span class="keywordtype">bool</span> enable) { m_enable_img_hist_equal = enable; }
<a name="l00172"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a9629d70fef76dfbd63c36d4e654d0be8">00172</a>                         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a9629d70fef76dfbd63c36d4e654d0be8">isEnabledImageHistEqualization</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_enable_img_hist_equal; }
<a name="l00173"></a>00173 
<a name="l00174"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a640b961e7b3ad0a3227dcd981494795e">00174</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a640b961e7b3ad0a3227dcd981494795e">enableMedianFilter</a>(<span class="keywordtype">bool</span> enable) { m_enable_median_filter = enable; internal_resendParamsToCamera(); }
<a name="l00175"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a7899c41124e309883ad60b2d4c111227">00175</a>                         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a7899c41124e309883ad60b2d4c111227">isEnabledMedianFilter</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_enable_median_filter;   }
<a name="l00176"></a>00176 
<a name="l00177"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a947add98e3739df486ddfde8fce5ef59">00177</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a947add98e3739df486ddfde8fce5ef59">enableMedianCrossFilter</a>(<span class="keywordtype">bool</span> enable) { m_enable_mediancross_filter = enable; internal_resendParamsToCamera(); }
<a name="l00178"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aca91a9f838913a02076c7643311ffb5b">00178</a>                         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aca91a9f838913a02076c7643311ffb5b">isEnabledMedianCrossFilter</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_enable_mediancross_filter; }
<a name="l00179"></a>00179 
<a name="l00180"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a96a375052bb7c84a190897526e0e5354">00180</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a96a375052bb7c84a190897526e0e5354">enableConvGray</a>(<span class="keywordtype">bool</span> enable) { m_enable_conv_gray = enable; internal_resendParamsToCamera(); }
<a name="l00181"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ac82aa9da0b23eca7bd7f394cb1823a61">00181</a>                         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ac82aa9da0b23eca7bd7f394cb1823a61">isEnabledConvGray</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_enable_conv_gray;  }
<a name="l00182"></a>00182 
<a name="l00183"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a774fa649e6312c4ec4cf42f34b17e888">00183</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a774fa649e6312c4ec4cf42f34b17e888">enableDenoiseANF</a>(<span class="keywordtype">bool</span> enable) { m_enable_denoise_anf = enable; internal_resendParamsToCamera(); }
<a name="l00184"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#af39adc920314640182a3ffd8fbad3d64">00184</a>                         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#af39adc920314640182a3ffd8fbad3d64">isEnabledDenoiseANF</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_enable_denoise_anf;  }
<a name="l00185"></a>00185 
<a name="l00186"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a78337342a3978b783cfc177ea731f85e">00186</a>                         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a78337342a3978b783cfc177ea731f85e">enablePreviewWindow</a>(<span class="keywordtype">bool</span> enable=<span class="keyword">true</span>) { m_preview_window = enable; }
<a name="l00187"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ad144a80927a395fd16c24e5c278ef370">00187</a>                         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ad144a80927a395fd16c24e5c278ef370">isEnabledPreviewWindow</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_preview_window; }
<a name="l00188"></a>00188 <span class="comment"></span>
<a name="l00189"></a>00189 <span class="comment">                        /** @} */</span>
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 
<a name="l00192"></a>00192                         <span class="comment">// List of small functions to be implemented differently in Win/Lin.</span>
<a name="l00193"></a>00193 <span class="comment"></span>
<a name="l00194"></a>00194 <span class="comment">                        /** Get the version of the MESA library.</span>
<a name="l00195"></a>00195 <span class="comment">                          * \return false on error</span>
<a name="l00196"></a>00196 <span class="comment">                          */</span>
<a name="l00197"></a>00197                         <span class="keywordtype">bool</span> getMesaLibVersion(<a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;out_version) <span class="keyword">const</span>;
<a name="l00198"></a>00198 
<a name="l00199"></a>00199 
<a name="l00200"></a>00200                 <span class="keyword">protected</span>:<span class="comment"></span>
<a name="l00201"></a>00201 <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="l00202"></a>00202 <span class="comment">                          *  \exception This method must throw an exception with a descriptive message if some critical parameter is missing or has an invalid value.</span>
<a name="l00203"></a>00203 <span class="comment">                          */</span>
<a name="l00204"></a>00204                         <span class="keyword">virtual</span> <span class="keywordtype">void</span>  loadConfig_sensorSpecific(
<a name="l00205"></a>00205                                 <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="l00206"></a>00206                                 <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a>                       &amp;section );
<a name="l00207"></a>00207 
<a name="l00208"></a>00208                         <span class="keywordtype">void</span> internal_resendParamsToCamera() <span class="keyword">const</span>;
<a name="l00209"></a>00209 
<a name="l00210"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#afb0e17059843df1fe9de70b68f730fae">00210</a>                         mrpt<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>    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#afb0e17059843df1fe9de70b68f730fae">m_sensorPoseOnRobot</a>;
<a name="l00211"></a>00211 
<a name="l00212"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ac24076997c06ad538c6575f0ff62cb7d">00212</a>                         <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ac24076997c06ad538c6575f0ff62cb7d" title="Save the 3D point cloud (default: true)">m_save_3d</a>;                 <span class="comment">//!&lt; Save the 3D point cloud (default: true)</span>
<a name="l00213"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a08dd0db77f8a82bc2427ffb23f84f388">00213</a> <span class="comment"></span>                        <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a08dd0db77f8a82bc2427ffb23f84f388" title="Save the 2D range image (default: true)">m_save_range_img</a>;  <span class="comment">//!&lt; Save the 2D range image (default: true)</span>
<a name="l00214"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aaee931883288a5882c2e9027bc3d3ba9">00214</a> <span class="comment"></span>                        <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aaee931883288a5882c2e9027bc3d3ba9" title="Save the 2D intensity image (default: true)">m_save_intensity_img</a>; <span class="comment">//!&lt; Save the 2D intensity image (default: true)</span>
<a name="l00215"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aee8f4ad10f0567519fac4d4296ed2b4d">00215</a> <span class="comment"></span>                        <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aee8f4ad10f0567519fac4d4296ed2b4d" title="Save the estimated confidence 2D image (default: false)">m_save_confidence</a>; <span class="comment">//!&lt; Save the estimated confidence 2D image (default: false)</span>
<a name="l00216"></a>00216 <span class="comment"></span>
<a name="l00217"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a8e2987c0c0e8e650a2a343d174ffb7d8">00217</a>                         <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a8e2987c0c0e8e650a2a343d174ffb7d8">m_enable_img_hist_equal</a>;
<a name="l00218"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a1815e303b965adbc3d23ded5b5b3562a">00218</a>                         <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a1815e303b965adbc3d23ded5b5b3562a">m_enable_median_filter</a>;
<a name="l00219"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a3e397a7f8c48669577a2a490a72da7f0">00219</a>                         <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a3e397a7f8c48669577a2a490a72da7f0">m_enable_mediancross_filter</a>;
<a name="l00220"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ac000992c4fba73b3cfe79e3293aac99c">00220</a>                         <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ac000992c4fba73b3cfe79e3293aac99c">m_enable_conv_gray</a>;
<a name="l00221"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a30552b6766f4b56e50bac0f200cd1098">00221</a>                         <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a30552b6766f4b56e50bac0f200cd1098">m_enable_denoise_anf</a>;
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 
<a name="l00224"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a02bf732f15c57df9df15cfd8f4ef49ca">00224</a>                         <span class="keywordtype">bool</span>    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a02bf732f15c57df9df15cfd8f4ef49ca" title="true: USB, false: ETH">m_open_from_usb</a>; <span class="comment">//!&lt; true: USB, false: ETH</span>
<a name="l00225"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a05a64bea687040241de6cea6ef2a51e0">00225</a> <span class="comment"></span>                        <span class="keywordtype">size_t</span>  <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a05a64bea687040241de6cea6ef2a51e0">m_usb_serial</a>;
<a name="l00226"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a68809930553ecd96e831f2dc45a57033">00226</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_swiss_ranger3_d_camera.html#a68809930553ecd96e831f2dc45a57033">m_ip_address</a>;
<a name="l00227"></a>00227 
<a name="l00228"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aa40b9d5f0c6bc14b2b31782b51598f82">00228</a>                         <span class="keywordtype">size_t</span>  <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aa40b9d5f0c6bc14b2b31782b51598f82">m_rows</a>, m_cols; <span class="comment">//!&lt; Size of camera images, set on open()</span>
<a name="l00229"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ae85e901cf919fb69981b868c469fa1aa">00229</a> <span class="comment"></span>                        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#ae85e901cf919fb69981b868c469fa1aa" title="Serial number of the camera, set on open()">m_cam_serial_num</a>; <span class="comment">//!&lt; Serial number of the camera, set on open()</span>
<a name="l00230"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aacacc472a8628318675ab81f2ba17dfd">00230</a> <span class="comment"></span>                        <span class="keywordtype">double</span>          <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aacacc472a8628318675ab81f2ba17dfd" title="Max range, as deducted from the camera frequency.">m_maxRange</a>;     <span class="comment">//!&lt; Max range, as deducted from the camera frequency.</span>
<a name="l00231"></a>00231 <span class="comment"></span>
<a name="l00232"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a9e8058925fc9e5947eaf5fa345f73ffa">00232</a>                         <span class="keywordtype">bool</span>            <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a9e8058925fc9e5947eaf5fa345f73ffa" title="Show preview window while grabbing.">m_preview_window</a>; <span class="comment">//!&lt; Show preview window while grabbing</span>
<a name="l00233"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a0d1c80adc29c1fb6d331d0dd5741ed97">00233</a> <span class="comment"></span>                        mrpt<a class="code" href="structmrpt_1_1gui_1_1_c_display_window_ptr.html">::gui::CDisplayWindowPtr</a>  <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#a0d1c80adc29c1fb6d331d0dd5741ed97">m_win_range</a>, m_win_int;
<a name="l00234"></a>00234 
<a name="l00235"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aaaeb41e269c9e63c64bb26a8c1cf8c1d">00235</a>                         <span class="keywordtype">void</span> *<a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#aaaeb41e269c9e63c64bb26a8c1cf8c1d" title="opaque handler to SRCAM. NULL means it&#39;s not open yet.">m_cam</a>;  <span class="comment">//!&lt; opaque handler to SRCAM. NULL means it&#39;s not open yet.</span>
<a name="l00236"></a>00236 <span class="comment"></span>                        
<a name="l00237"></a><a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#af71c3e877829ecf0533afca018f755ec">00237</a>                         mrpt<a class="code" href="classmrpt_1_1utils_1_1_t_camera.html" title="Structure to hold the parameters of a pinhole camera model.">::utils::TCamera</a>    <a class="code" href="classmrpt_1_1hwdrivers_1_1_c_swiss_ranger3_d_camera.html#af71c3e877829ecf0533afca018f755ec">m_cameraParams</a>; 
<a name="l00238"></a>00238 
<a name="l00239"></a>00239                 <span class="keyword">private</span>:
<a name="l00240"></a>00240 
<a name="l00241"></a>00241                 };      <span class="comment">// End of class</span>
<a name="l00242"></a>00242 
<a name="l00243"></a>00243         } <span class="comment">// End of NS</span>
<a name="l00244"></a>00244 } <span class="comment">// End of NS</span>
<a name="l00245"></a>00245 
<a name="l00246"></a>00246 
<a name="l00247"></a>00247 <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>