<!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>tracking.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> > <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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <div class="title">tracking.h</div> </div> </div> <div class="contents"> <a href="tracking_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 <jlblanco@ctima.uma.es> |</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 <http://www.gnu.org/licenses/>. |</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 mrpt_vision_tracking_H</span> <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define mrpt_vision_tracking_H</span> <a name="l00031"></a>00031 <span class="preprocessor"></span> <a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="vision_2include_2mrpt_2vision_2types_8h.html">mrpt/vision/types.h</a>></span> <a name="l00033"></a>00033 <span class="preprocessor">#include <<a class="code" href="vision_2include_2mrpt_2vision_2link__pragmas_8h.html">mrpt/vision/link_pragmas.h</a>></span> <a name="l00034"></a>00034 <a name="l00035"></a>00035 <span class="preprocessor">#include <<a class="code" href="_c_feature_8h.html">mrpt/vision/CFeature.h</a>></span> <a name="l00036"></a>00036 <span class="preprocessor">#include <<a class="code" href="_t_simple_feature_8h.html">mrpt/vision/TSimpleFeature.h</a>></span> <a name="l00037"></a>00037 <span class="preprocessor">#include <<a class="code" href="_c_image_8h.html">mrpt/utils/CImage.h</a>></span> <a name="l00038"></a>00038 <span class="preprocessor">#include <<a class="code" href="_c_time_logger_8h.html">mrpt/utils/CTimeLogger.h</a>></span> <a name="l00039"></a>00039 <span class="preprocessor">#include <<a class="code" href="_t_parameters_8h.html">mrpt/utils/TParameters.h</a>></span> <a name="l00040"></a>00040 <a name="l00041"></a>00041 <span class="preprocessor">#include <<a class="code" href="metaprogramming_8h.html">mrpt/utils/metaprogramming.h</a>></span> <a name="l00042"></a>00042 <a name="l00043"></a>00043 <span class="preprocessor">#include <memory></span> <span class="comment">// for auto_ptr</span> <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="keyword">namespace </span>mrpt <a name="l00046"></a>00046 { <a name="l00047"></a>00047 <span class="keyword">namespace </span>vision <a name="l00048"></a>00048 { <a name="l00049"></a>00049 <span class="keyword">using namespace </span>mrpt::math; <a name="l00050"></a>00050 <span class="keyword">using namespace </span>mrpt::utils; <a name="l00051"></a>00051 <span class="comment"></span> <a name="l00052"></a>00052 <span class="comment"> /** \addtogroup vision_tracking Feature detection and tracking</span> <a name="l00053"></a>00053 <span class="comment"> * \ingroup mrpt_vision_grp</span> <a name="l00054"></a>00054 <span class="comment"> * @{ */</span> <a name="l00055"></a>00055 <span class="comment"></span> <a name="l00056"></a>00056 <span class="comment"> /** A virtual interface for all feature trackers, implementing the part of feature tracking that is common to any specific tracker implementation.</span> <a name="l00057"></a>00057 <span class="comment"> * This class provides a quite robust tracking of features, avoiding as many outliers as possible but not all of them:</span> <a name="l00058"></a>00058 <span class="comment"> * more robust tracking would require application-specific information and could be done in a number of very different approaches,</span> <a name="l00059"></a>00059 <span class="comment"> * so this class will not try to do any kind of RANSAC or any other advanced outlier rejection; instead, it should</span> <a name="l00060"></a>00060 <span class="comment"> * be done by the users or the classes that employ this class.</span> <a name="l00061"></a>00061 <span class="comment"> *</span> <a name="l00062"></a>00062 <span class="comment"> * The basic usage of this class is as follows:</span> <a name="l00063"></a>00063 <span class="comment"> * \code</span> <a name="l00064"></a>00064 <span class="comment"> * CFeatureTracker_KL tracker; // Note: CFeatureTracker_KL is the most robust implementation for now.</span> <a name="l00065"></a>00065 <span class="comment"> * tracker.extra_params["add_new_features"] = 1; // Enable detection of new features, not only tracking</span> <a name="l00066"></a>00066 <span class="comment"> * tracker.extra_params[...] = ...</span> <a name="l00067"></a>00067 <span class="comment"> * // ....</span> <a name="l00068"></a>00068 <span class="comment"> * CFeatureList theFeats; // The list of features</span> <a name="l00069"></a>00069 <span class="comment"> * mrpt::utils::CImage previous_img, current_img;</span> <a name="l00070"></a>00070 <span class="comment"> *</span> <a name="l00071"></a>00071 <span class="comment"> * while (true) {</span> <a name="l00072"></a>00072 <span class="comment"> * current_img = ... // Grab new image.</span> <a name="l00073"></a>00073 <span class="comment"> * if ( previous_img_is_ok )</span> <a name="l00074"></a>00074 <span class="comment"> * tracker.trackFeatures(previous_img, current_img, theFeats);</span> <a name="l00075"></a>00075 <span class="comment"> * previous_img = current_img;</span> <a name="l00076"></a>00076 <span class="comment"> * }</span> <a name="l00077"></a>00077 <span class="comment"> * \endcode</span> <a name="l00078"></a>00078 <span class="comment"> *</span> <a name="l00079"></a>00079 <span class="comment"> * Below follows the list of optional parameters for "extra_params" which can be set</span> <a name="l00080"></a>00080 <span class="comment"> * and will be understood by this base class for any specific tracker implementation.</span> <a name="l00081"></a>00081 <span class="comment"> * Note that all parameters are double's, but boolean flags are emulated by the values 0.0 (false) and 1.0 (true).</span> <a name="l00082"></a>00082 <span class="comment"> *</span> <a name="l00083"></a>00083 <span class="comment"> * List of parameters:</span> <a name="l00084"></a>00084 <span class="comment"> * <table border="1" ></span> <a name="l00085"></a>00085 <span class="comment"> * <tr><td align="center" > <b>Parameter name</b> </td> <td align="center" > <b>Default value</b> </td> <td align="center" > <b>Comments</b> </td> </tr></span> <a name="l00086"></a>00086 <span class="comment"> * <tr><td align="center" > add_new_features </td> <td align="center" > 0 </td></span> <a name="l00087"></a>00087 <span class="comment"> * <td> If set to "1", the class will not only track existing features, but will also perform (after doing the actual tracking) an efficient</span> <a name="l00088"></a>00088 <span class="comment"> * search for new features with the FAST detector, and will add them to the passed "CFeatureList" if they fulfill a set of restrictions,</span> <a name="l00089"></a>00089 <span class="comment"> * as stablished by the other parameters (see <i>add_new_feat_min_separation</i>,<i>add_new_feat_max_features</i>,<i>minimum_KLT_response_to_add</i>).</span> <a name="l00090"></a>00090 <span class="comment"> * </td> </tr></span> <a name="l00091"></a>00091 <span class="comment"> * <tr><td align="center" > add_new_feat_min_separation </td> <td align="center" > 15 </td></span> <a name="l00092"></a>00092 <span class="comment"> * <td> If <i>add_new_features</i>==1, this is the minimum separation (in pixels) to any other (old, or new) feature for it</span> <a name="l00093"></a>00093 <span class="comment"> * being considered a candidate to be added.</span> <a name="l00094"></a>00094 <span class="comment"> * </td> </tr></span> <a name="l00095"></a>00095 <span class="comment"> * <tr><td align="center" > desired_num_features_adapt </td> <td align="center" > (img_width*img_height)/512 </td></span> <a name="l00096"></a>00096 <span class="comment"> * <td> If <i>add_new_features</i>==1, the threshold of the FAST(ER) feature detector is dynamically adapted such as the number of</span> <a name="l00097"></a>00097 <span class="comment"> * raw FAST keypoints is around this number. This number should be much higher than the real desired numbre of features, since this</span> <a name="l00098"></a>00098 <span class="comment"> * one includes many features concentrated in space which are later discarded for the minimum distance.</span> <a name="l00099"></a>00099 <span class="comment"> * </td> </tr></span> <a name="l00100"></a>00100 <span class="comment"> * <tr><td align="center" > desired_num_features </td> <td align="center" > 100 </td></span> <a name="l00101"></a>00101 <span class="comment"> * <td> If <i>add_new_features</i>==1, the target number of the patch associated to each feature will be updated with every N'th frame. </td> </tr></span> <a name="l00102"></a>00102 <span class="comment"> * <tr><td align="center" > add_new_feat_patch_size </td> <td align="center" > 11 </td></span> <a name="l00103"></a>00103 <span class="comment"> * <td> If <i>add_new_features</i>==1, for each new added feature, this is the size of the patch to be extracted around the keypoint (set to 0 if patches are not required at all).</span> <a name="l00104"></a>00104 <span class="comment"> * </td> </tr></span> <a name="l00105"></a>00105 <span class="comment"> * <tr><td align="center" > minimum_KLT_response_to_add </td> <td align="center" > 10 </td></span> <a name="l00106"></a>00106 <span class="comment"> * <td> If <i>add_new_features</i>==1, this sets the minimum KLT response of candidate FAST features to be added in each frame, if they also fulfil the other restrictions (e.g. min.distance).</span> <a name="l00107"></a>00107 <span class="comment"> * </td> </tr></span> <a name="l00108"></a>00108 <span class="comment"> * <tr><td align="center" > check_KLT_response_every </td> <td align="center" > 0 </td></span> <a name="l00109"></a>00109 <span class="comment"> * <td> If >0, it will compute the KLT response at each feature point every <i>N</i> frames</span> <a name="l00110"></a>00110 <span class="comment"> * and those below <i>minimum_KLT_response</i> will be marked as "lost" in their "track_status" field.</span> <a name="l00111"></a>00111 <span class="comment"> * </td> </tr></span> <a name="l00112"></a>00112 <span class="comment"> * <tr><td align="center" > minimum_KLT_response </td> <td align="center" > 5 </td></span> <a name="l00113"></a>00113 <span class="comment"> * <td> See explanation of <i>check_KLT_response_every</i>.</span> <a name="l00114"></a>00114 <span class="comment"> * </td> </tr></span> <a name="l00115"></a>00115 <span class="comment"> * <tr><td align="center" > KLT_response_half_win </td> <td align="center" > 4 </td></span> <a name="l00116"></a>00116 <span class="comment"> * <td> When computing the KLT response of features (see <i>minimum_KLT_response</i> and <i>minimum_KLT_response_to_add</i>),</span> <a name="l00117"></a>00117 <span class="comment"> * the window centered at the point for its estimation will be of size (2*W+1)x(2*W+1), with <i>W</i> being this parameter value.</span> <a name="l00118"></a>00118 <span class="comment"> * </td> </tr></span> <a name="l00119"></a>00119 <span class="comment"> * <tr><td align="center" > update_patches_every </td> <td align="center" > 0 </td></span> <a name="l00120"></a>00120 <span class="comment"> * <td> If !=0, the patch associated to each feature will be updated with every N'th frame. </td> </tr></span> <a name="l00121"></a>00121 <span class="comment"> * <tr><td align="center" > remove_lost_features </td> <td align="center" > 0 </td></span> <a name="l00122"></a>00122 <span class="comment"> * <td> If !=0, out-of-bound features or those lost while tracking, will be automatically removed from the list of features.</span> <a name="l00123"></a>00123 <span class="comment"> * Otherwise, the user will have to manually remove them by checking the track_status field. </td> </tr></span> <a name="l00124"></a>00124 <span class="comment"> * </table></span> <a name="l00125"></a>00125 <span class="comment"> *</span> <a name="l00126"></a>00126 <span class="comment"> * This class also offers a time profiler, disabled by default (see getProfiler and enableTimeLogger).</span> <a name="l00127"></a>00127 <span class="comment"> *</span> <a name="l00128"></a>00128 <span class="comment"> * \sa CFeatureTracker_KL, the example application "track-video-features".</span> <a name="l00129"></a>00129 <span class="comment"> */</span> <a name="l00130"></a>00130 <span class="keyword">struct </span><a class="code" href="vision_2include_2mrpt_2vision_2link__pragmas_8h.html#aa4a17fb846aac61f4e57b17b6f784559">VISION_IMPEXP</a> CGenericFeatureTracker <a name="l00131"></a>00131 {<span class="comment"></span> <a name="l00132"></a>00132 <span class="comment"> /** Optional list of extra parameters to the algorithm. */</span> <a name="l00133"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a2b81ed2b0cb9fb13cbd9d75296bf73cf">00133</a> mrpt<a class="code" href="structmrpt_1_1utils_1_1_t_parameters.html" title="For usage when passing a dynamic number of (numeric) arguments to a function, by name.">::utils::TParametersDouble</a> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a2b81ed2b0cb9fb13cbd9d75296bf73cf" title="Optional list of extra parameters to the algorithm.">extra_params</a>; <a name="l00134"></a>00134 <span class="comment"></span> <a name="l00135"></a>00135 <span class="comment"> /** Default ctor */</span> <a name="l00136"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#aa6eb709d0f7a40c739398f0234822bc8">00136</a> <span class="keyword">inline</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html" title="A virtual interface for all feature trackers, implementing the part of feature tracking that is commo...">CGenericFeatureTracker</a>() : m_timlog(false), m_update_patches_counter(0),m_check_KLT_counter(0),m_detector_adaptive_thres(10) <a name="l00137"></a>00137 { }<span class="comment"></span> <a name="l00138"></a>00138 <span class="comment"> /** Ctor with extra parameters */</span> <a name="l00139"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#af030d71d91493fcf5289ab2fc4ea5cfb">00139</a> <span class="keyword">inline</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html" title="A virtual interface for all feature trackers, implementing the part of feature tracking that is commo...">CGenericFeatureTracker</a>(<a class="code" href="structmrpt_1_1utils_1_1_t_parameters.html" title="For usage when passing a dynamic number of (numeric) arguments to a function, by name.">mrpt::utils::TParametersDouble</a> extraParams) : extra_params(extraParams), m_timlog(false), m_update_patches_counter(0),m_check_KLT_counter(0),m_detector_adaptive_thres(10) <a name="l00140"></a>00140 { }<span class="comment"></span> <a name="l00141"></a>00141 <span class="comment"> /** Dtor */</span> <a name="l00142"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#ac0cfa7031fbb8a1f7e59f5560d891a31">00142</a> <span class="keyword">virtual</span> ~<a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html" title="A virtual interface for all feature trackers, implementing the part of feature tracking that is commo...">CGenericFeatureTracker</a>() <a name="l00143"></a>00143 { } <a name="l00144"></a>00144 <span class="comment"></span> <a name="l00145"></a>00145 <span class="comment"> /** Perform feature tracking from "old_img" to "new_img", with a (possibly empty) list of previously tracked features "inout_featureList".</span> <a name="l00146"></a>00146 <span class="comment"> * This is a list of parameters (in "extraParams") accepted by ALL implementations of feature tracker (see each derived class for more specific parameters).</span> <a name="l00147"></a>00147 <span class="comment"> * - "add_new_features" (Default=0). If set to "1", new features will be also added to the existing ones in areas of the image poor of features.</span> <a name="l00148"></a>00148 <span class="comment"> * This method does:</span> <a name="l00149"></a>00149 <span class="comment"> * - Convert old and new images to grayscale, if they're in color.</span> <a name="l00150"></a>00150 <span class="comment"> * - Call the pure virtual "trackFeatures_impl" method.</span> <a name="l00151"></a>00151 <span class="comment"> * - Implement the optional detection of new features if "add_new_features"!=0.</span> <a name="l00152"></a>00152 <span class="comment"> */</span> <a name="l00153"></a>00153 <span class="keywordtype">void</span> trackFeatures( <a name="l00154"></a>00154 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00155"></a>00155 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00156"></a>00156 <a class="code" href="structmrpt_1_1vision_1_1_t_simple_feature_list__templ.html">TSimpleFeatureList</a> &inout_featureList ); <a name="l00157"></a>00157 <span class="comment"></span> <a name="l00158"></a>00158 <span class="comment"> /** \overload This overload version uses the old (and much slower) CFeatureList */</span> <a name="l00159"></a>00159 <span class="keywordtype">void</span> trackFeatures( <a name="l00160"></a>00160 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00161"></a>00161 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00162"></a>00162 <a class="code" href="classmrpt_1_1vision_1_1_c_feature_list.html" title="A list of visual features, to be used as output by detectors, as input/output by trackers, etc.">CFeatureList</a> &inout_featureList ); <a name="l00163"></a>00163 <span class="comment"></span> <a name="l00164"></a>00164 <span class="comment"> /** A wrapper around the basic trackFeatures() method, but keeping the original list of features unmodified and returns the tracked ones in a new list. */</span> <a name="l00165"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a909e30defb4b5b9c15aded317346ec5c">00165</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> trackFeaturesNewList( <a name="l00166"></a>00166 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00167"></a>00167 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00168"></a>00168 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1vision_1_1_c_feature_list.html" title="A list of visual features, to be used as output by detectors, as input/output by trackers, etc.">vision::CFeatureList</a> &in_featureList, <a name="l00169"></a>00169 <a class="code" href="classmrpt_1_1vision_1_1_c_feature_list.html" title="A list of visual features, to be used as output by detectors, as input/output by trackers, etc.">vision::CFeatureList</a> &out_featureList <a name="l00170"></a>00170 ) <a name="l00171"></a>00171 { <a name="l00172"></a>00172 out_featureList = in_featureList; <a name="l00173"></a>00173 std::for_each( <a name="l00174"></a>00174 out_featureList.<a class="code" href="classmrpt_1_1vision_1_1_c_feature_list.html#a51d87725bb158a2a648b18e0b99ddad0">begin</a>(),out_featureList.<a class="code" href="classmrpt_1_1vision_1_1_c_feature_list.html#a8aeaa665d175d6586be382752a2cef41">end</a>(), <a name="l00175"></a>00175 <a class="code" href="structmrpt_1_1utils_1_1metaprogramming_1_1_object_make_unique.html" title="An object for making smart pointers unique (ie, making copies if necessary), intended for being used ...">mrpt::utils::metaprogramming::ObjectMakeUnique</a>() ); <a name="l00176"></a>00176 this->trackFeatures(old_img, new_img, out_featureList); <a name="l00177"></a>00177 } <a name="l00178"></a>00178 <span class="comment"></span> <a name="l00179"></a>00179 <span class="comment"> /** Returns a read-only reference to the internal time logger */</span> <a name="l00180"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a9c210bd84d54c5ce72fe1e93933b49bf">00180</a> <span class="keyword">inline</span> <span class="keyword">const</span> mrpt<a class="code" href="classmrpt_1_1utils_1_1_c_time_logger.html" title="A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats.">::utils::CTimeLogger</a> & <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a9c210bd84d54c5ce72fe1e93933b49bf" title="Returns a read-only reference to the internal time logger.">getProfiler</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_timlog; }<span class="comment"></span> <a name="l00181"></a>00181 <span class="comment"> /** Returns a reference to the internal time logger */</span> <a name="l00182"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#af5538fb8d752b810c7bac461a7043f3d">00182</a> <span class="keyword">inline</span> mrpt<a class="code" href="classmrpt_1_1utils_1_1_c_time_logger.html" title="A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats.">::utils::CTimeLogger</a> & <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#af5538fb8d752b810c7bac461a7043f3d" title="Returns a reference to the internal time logger.">getProfiler</a>() { <span class="keywordflow">return</span> m_timlog; } <a name="l00183"></a>00183 <span class="comment"></span> <a name="l00184"></a>00184 <span class="comment"> /** Returns a read-only reference to the internal time logger */</span> <a name="l00185"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#aa9453970afc0eda64c1be01ccf7f4566">00185</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#aa9453970afc0eda64c1be01ccf7f4566" title="Returns a read-only reference to the internal time logger.">enableTimeLogger</a>(<span class="keywordtype">bool</span> enable=<span class="keyword">true</span>) { m_timlog.enable(enable); } <a name="l00186"></a>00186 <span class="comment"></span> <a name="l00187"></a>00187 <span class="comment"> /** Returns the current adaptive threshold used by the FAST(ER) detector to find out new features in empty areas */</span> <a name="l00188"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#ad1d65969e0219c7e132c1cb9f27d2484">00188</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#ad1d65969e0219c7e132c1cb9f27d2484" title="Returns the current adaptive threshold used by the FAST(ER) detector to find out new features in empt...">getDetectorAdaptiveThreshold</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_detector_adaptive_thres; } <a name="l00189"></a>00189 <a name="l00190"></a>00190 <span class="keyword">struct </span><a class="code" href="vision_2include_2mrpt_2vision_2link__pragmas_8h.html#aa4a17fb846aac61f4e57b17b6f784559">VISION_IMPEXP</a> TExtraOutputInfo <a name="l00191"></a>00191 { <a name="l00192"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker_1_1_t_extra_output_info.html#aadcdfc855fb8efac587106f8de03da5b">00192</a> <span class="keywordtype">size_t</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker_1_1_t_extra_output_info.html#aadcdfc855fb8efac587106f8de03da5b" title="In the new_img with the last adaptive threshold.">raw_FAST_feats_detected</a>; <span class="comment">//!< In the new_img with the last adaptive threshold</span> <a name="l00193"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker_1_1_t_extra_output_info.html#aa5e3777e89fc3bcdb44ff1ec15cbafbc">00193</a> <span class="comment"></span> <span class="keywordtype">size_t</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker_1_1_t_extra_output_info.html#aa5e3777e89fc3bcdb44ff1ec15cbafbc" title="The number of features which were deleted due to OOB, bad tracking, etc... (only if "remove_lost_feat...">num_deleted_feats</a>; <span class="comment">//!< The number of features which were deleted due to OOB, bad tracking, etc... (only if "remove_lost_features" is enabled)</span> <a name="l00194"></a>00194 <span class="comment"></span> }; <a name="l00195"></a>00195 <a name="l00196"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a8d097a7479a5363be5a282fa49d7366a">00196</a> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker_1_1_t_extra_output_info.html">TExtraOutputInfo</a> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a8d097a7479a5363be5a282fa49d7366a" title="Updated with each call to trackFeatures()">last_execution_extra_info</a>; <span class="comment">//!< Updated with each call to trackFeatures()</span> <a name="l00197"></a>00197 <span class="comment"></span> <a name="l00198"></a>00198 <span class="keyword">protected</span>:<span class="comment"></span> <a name="l00199"></a>00199 <span class="comment"> /** The tracking method implementation, to be implemented in children classes. */</span> <a name="l00200"></a>00200 <span class="keyword">virtual</span> <span class="keywordtype">void</span> trackFeatures_impl( <a name="l00201"></a>00201 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00202"></a>00202 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00203"></a>00203 <a class="code" href="structmrpt_1_1vision_1_1_t_simple_feature_list__templ.html">TSimpleFeatureList</a> &inout_featureList ) = 0; <a name="l00204"></a>00204 <span class="comment"></span> <a name="l00205"></a>00205 <span class="comment"> /** This version falls back to the version with TSimpleFeatureList if the derived class does not implement it. */</span> <a name="l00206"></a>00206 <span class="keyword">virtual</span> <span class="keywordtype">void</span> trackFeatures_impl( <a name="l00207"></a>00207 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00208"></a>00208 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00209"></a>00209 <a class="code" href="classmrpt_1_1vision_1_1_c_feature_list.html" title="A list of visual features, to be used as output by detectors, as input/output by trackers, etc.">CFeatureList</a> &inout_featureList ) = 0; <a name="l00210"></a>00210 <a name="l00211"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#af9203d9f912c98716ba879041f58ff6e">00211</a> mrpt<a class="code" href="classmrpt_1_1utils_1_1_c_time_logger.html" title="A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats.">::utils::CTimeLogger</a> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#af9203d9f912c98716ba879041f58ff6e" title="the internal time logger, disabled by default.">m_timlog</a>; <span class="comment">//!< the internal time logger, disabled by default.</span> <a name="l00212"></a>00212 <span class="comment"></span><span class="comment"></span> <a name="l00213"></a>00213 <span class="comment"> /** This field is clared by \a trackFeatures() before calling \a trackFeatures_impl(), and</span> <a name="l00214"></a>00214 <span class="comment"> * can be filled out with newly defected FAST(ER) features in the latter.</span> <a name="l00215"></a>00215 <span class="comment"> * If it's not the case, feats will be computed anyway if the user enabled the "add_new_features" option.</span> <a name="l00216"></a>00216 <span class="comment"> */</span> <a name="l00217"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#aa80dc7e788fa6aee664d04fa49bdd4e5">00217</a> mrpt<a class="code" href="structmrpt_1_1vision_1_1_t_simple_feature_list__templ.html">::vision::TSimpleFeatureList</a> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#aa80dc7e788fa6aee664d04fa49bdd4e5" title="This field is clared by trackFeatures() before calling trackFeatures_impl(), and can be filled out wi...">m_newly_detected_feats</a>; <a name="l00218"></a>00218 <span class="comment"></span> <a name="l00219"></a>00219 <span class="comment"> /** Adapts the threshold \a m_detector_adaptive_thres according to the real and desired number of features just detected */</span> <a name="l00220"></a>00220 <span class="keywordtype">void</span> updateAdaptiveNewFeatsThreshold( <a name="l00221"></a>00221 <span class="keyword">const</span> <span class="keywordtype">size_t</span> nNewlyDetectedFeats, <a name="l00222"></a>00222 <span class="keyword">const</span> <span class="keywordtype">size_t</span> desired_num_features); <a name="l00223"></a>00223 <a name="l00224"></a>00224 <span class="keyword">private</span>: <a name="l00225"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#acb2586a70ebfbfb1b666f9d02fadbb90">00225</a> <span class="keywordtype">size_t</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#acb2586a70ebfbfb1b666f9d02fadbb90" title="for use when "update_patches_every">=1">m_update_patches_counter</a>; <span class="comment">//!< for use when "update_patches_every">=1</span> <a name="l00226"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a2eb5188b9edfae41afed07cd0156d397">00226</a> <span class="comment"></span> <span class="keywordtype">size_t</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a2eb5188b9edfae41afed07cd0156d397" title="For use when "check_KLT_response_every">=1.">m_check_KLT_counter</a>; <span class="comment">//!< For use when "check_KLT_response_every">=1</span> <a name="l00227"></a><a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a2db465f40cfd3dcd97a18498495242c5">00227</a> <span class="comment"></span> <span class="keywordtype">int</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html#a2db465f40cfd3dcd97a18498495242c5" title="For use in "add_new_features" == true.">m_detector_adaptive_thres</a>; <span class="comment">//!< For use in "add_new_features" == true</span> <a name="l00228"></a>00228 <span class="comment"></span> <a name="l00229"></a>00229 <a name="l00230"></a>00230 <span class="keyword">template</span> <<span class="keyword">typename</span> FEATLIST> <a name="l00231"></a>00231 <span class="keywordtype">void</span> internal_trackFeatures( <a name="l00232"></a>00232 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00233"></a>00233 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00234"></a>00234 FEATLIST &inout_featureList ); <a name="l00235"></a>00235 }; <a name="l00236"></a>00236 <a name="l00237"></a><a class="code" href="group__vision__tracking.html#ga999b0935b3d00169b4c7b64c9a363ea6">00237</a> <span class="keyword">typedef</span> std<a class="code" href="classstd_1_1auto__ptr.html" title="STL class.">::auto_ptr<CGenericFeatureTracker></a> <a class="code" href="group__vision__tracking.html#ga999b0935b3d00169b4c7b64c9a363ea6">CGenericFeatureTrackerAutoPtr</a>; <a name="l00238"></a>00238 <a name="l00239"></a>00239 <span class="comment"></span> <a name="l00240"></a>00240 <span class="comment"> /** Track a set of features from old_img -> new_img using sparse optimal flow (classic KL method).</span> <a name="l00241"></a>00241 <span class="comment"> *</span> <a name="l00242"></a>00242 <span class="comment"> * See CGenericFeatureTracker for a more detailed explanation on how to use this class.</span> <a name="l00243"></a>00243 <span class="comment"> *</span> <a name="l00244"></a>00244 <span class="comment"> * List of additional parameters in "extra_params" (apart from those in CGenericFeatureTracker) accepted by this class:</span> <a name="l00245"></a>00245 <span class="comment"> * - "window_width" (Default=15)</span> <a name="l00246"></a>00246 <span class="comment"> * - "window_height" (Default=15)</span> <a name="l00247"></a>00247 <span class="comment"> * - "LK_levels" (Default=3) Number of pyramids to build for LK tracking (this parameter only has effects when tracking with CImage's, not with CImagePyramid's).</span> <a name="l00248"></a>00248 <span class="comment"> * - "LK_max_iters" (Default=10) Max. number of iterations in LK tracking.</span> <a name="l00249"></a>00249 <span class="comment"> * - "LK_epsilon" (Default=0.1) Minimum epsilon step in interations of LK_tracking.</span> <a name="l00250"></a>00250 <span class="comment"> * - "LK_max_tracking_error" (Default=150.0) The maximum "tracking error" of LK tracking such as a feature is marked as "lost".</span> <a name="l00251"></a>00251 <span class="comment"> *</span> <a name="l00252"></a>00252 <span class="comment"> * \sa OpenCV's method cvCalcOpticalFlowPyrLK</span> <a name="l00253"></a>00253 <span class="comment"> */</span> <a name="l00254"></a>00254 <span class="keyword">struct </span><a class="code" href="vision_2include_2mrpt_2vision_2link__pragmas_8h.html#aa4a17fb846aac61f4e57b17b6f784559">VISION_IMPEXP</a> <a class="code" href="structmrpt_1_1vision_1_1_c_feature_tracker___k_l.html" title="Track a set of features from old_img -> new_img using sparse optimal flow (classic KL method)...">CFeatureTracker_KL</a> : <span class="keyword">public</span> <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html" title="A virtual interface for all feature trackers, implementing the part of feature tracking that is commo...">CGenericFeatureTracker</a> <a name="l00255"></a>00255 {<span class="comment"></span> <a name="l00256"></a>00256 <span class="comment"> /** Default ctor */</span> <a name="l00257"></a><a class="code" href="structmrpt_1_1vision_1_1_c_feature_tracker___k_l.html#a373ad62f96b95208a133a5b5a6cc2251">00257</a> <span class="keyword">inline</span> <a class="code" href="structmrpt_1_1vision_1_1_c_feature_tracker___k_l.html#a373ad62f96b95208a133a5b5a6cc2251" title="Default ctor.">CFeatureTracker_KL</a>() { }<span class="comment"></span> <a name="l00258"></a>00258 <span class="comment"> /** Ctor with extra parameters */</span> <a name="l00259"></a><a class="code" href="structmrpt_1_1vision_1_1_c_feature_tracker___k_l.html#ace6e4e53b82d1144ffa8072396c8b6d7">00259</a> <span class="keyword">inline</span> <a class="code" href="structmrpt_1_1vision_1_1_c_feature_tracker___k_l.html#ace6e4e53b82d1144ffa8072396c8b6d7" title="Ctor with extra parameters.">CFeatureTracker_KL</a>(<a class="code" href="structmrpt_1_1utils_1_1_t_parameters.html" title="For usage when passing a dynamic number of (numeric) arguments to a function, by name.">mrpt::utils::TParametersDouble</a> extraParams) : <a class="code" href="structmrpt_1_1vision_1_1_c_generic_feature_tracker.html" title="A virtual interface for all feature trackers, implementing the part of feature tracking that is commo...">CGenericFeatureTracker</a>(extraParams) { } <a name="l00260"></a>00260 <a name="l00261"></a>00261 <span class="keyword">protected</span>: <a name="l00262"></a>00262 <span class="keyword">virtual</span> <span class="keywordtype">void</span> trackFeatures_impl( <a name="l00263"></a>00263 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00264"></a>00264 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00265"></a>00265 <a class="code" href="classmrpt_1_1vision_1_1_c_feature_list.html" title="A list of visual features, to be used as output by detectors, as input/output by trackers, etc.">vision::CFeatureList</a> &inout_featureList ); <a name="l00266"></a>00266 <span class="comment"></span> <a name="l00267"></a>00267 <span class="comment"> /** The tracking method implementation, to be implemented in children classes. */</span> <a name="l00268"></a>00268 <span class="keyword">virtual</span> <span class="keywordtype">void</span> trackFeatures_impl( <a name="l00269"></a>00269 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00270"></a>00270 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00271"></a>00271 <a class="code" href="structmrpt_1_1vision_1_1_t_simple_feature_list__templ.html">TSimpleFeatureList</a> &inout_featureList ); <a name="l00272"></a>00272 <a name="l00273"></a>00273 <span class="keyword">private</span>: <a name="l00274"></a>00274 <span class="keyword">template</span> <<span class="keyword">typename</span> FEATLIST> <a name="l00275"></a>00275 <span class="keywordtype">void</span> trackFeatures_impl_templ( <a name="l00276"></a>00276 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00277"></a>00277 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00278"></a>00278 FEATLIST &inout_featureList ); <a name="l00279"></a>00279 <a name="l00280"></a>00280 }; <a name="l00281"></a>00281 <span class="comment"></span> <a name="l00282"></a>00282 <span class="comment"> /** Track a set of features from old_img -> new_img by patch correlation over the closest FAST features, using a KD-tree for looking closest correspondences.</span> <a name="l00283"></a>00283 <span class="comment"> * See CGenericFeatureTracker for a more detailed explanation on how to use this class.</span> <a name="l00284"></a>00284 <span class="comment"> *</span> <a name="l00285"></a>00285 <span class="comment"> * List of additional parameters in "extra_params" (apart from those in CGenericFeatureTracker) accepted by this class:</span> <a name="l00286"></a>00286 <span class="comment"> * - "window_width" (Default=15)</span> <a name="l00287"></a>00287 <span class="comment"> * - "window_height" (Default=15)</span> <a name="l00288"></a>00288 <span class="comment"> *</span> <a name="l00289"></a>00289 <span class="comment"> */</span> <a name="l00290"></a>00290 <span class="keyword">struct </span><a class="code" href="vision_2include_2mrpt_2vision_2link__pragmas_8h.html#aa4a17fb846aac61f4e57b17b6f784559">VISION_IMPEXP</a> CFeatureTracker_FAST : <span class="keyword">public</span> CGenericFeatureTracker <a name="l00291"></a>00291 {<span class="comment"></span> <a name="l00292"></a>00292 <span class="comment"> /** Ctor */</span> <a name="l00293"></a>00293 CFeatureTracker_FAST(<span class="keyword">const</span> <a class="code" href="structmrpt_1_1utils_1_1_t_parameters.html" title="For usage when passing a dynamic number of (numeric) arguments to a function, by name.">mrpt::utils::TParametersDouble</a> & extraParams = <a class="code" href="structmrpt_1_1utils_1_1_t_parameters.html" title="For usage when passing a dynamic number of (numeric) arguments to a function, by name.">mrpt::utils::TParametersDouble</a>() ); <a name="l00294"></a>00294 <a name="l00295"></a>00295 <span class="keyword">protected</span>: <a name="l00296"></a>00296 <span class="keyword">virtual</span> <span class="keywordtype">void</span> trackFeatures_impl( <a name="l00297"></a>00297 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00298"></a>00298 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00299"></a>00299 <a class="code" href="classmrpt_1_1vision_1_1_c_feature_list.html" title="A list of visual features, to be used as output by detectors, as input/output by trackers, etc.">vision::CFeatureList</a> &inout_featureList ); <a name="l00300"></a>00300 <a name="l00301"></a>00301 <span class="keyword">virtual</span> <span class="keywordtype">void</span> trackFeatures_impl( <a name="l00302"></a>00302 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00303"></a>00303 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00304"></a>00304 <a class="code" href="group__mrptvision__features.html#ga1a3cacefe1829fabd578ba8cc6fe6638" title="A list of image features using the structure TSimpleFeature for each feature - capable of KD-tree com...">TSimpleFeatureList</a> &inout_featureList ); <a name="l00305"></a>00305 <a name="l00306"></a>00306 }; <a name="l00307"></a>00307 <a name="l00308"></a>00308 <span class="comment"></span> <a name="l00309"></a>00309 <span class="comment"> /** Track a set of features from old_img -> new_img by patch matching over a fixed window centered at each feature's previous location.</span> <a name="l00310"></a>00310 <span class="comment"> * See CGenericFeatureTracker for a more detailed explanation on how to use this class.</span> <a name="l00311"></a>00311 <span class="comment"> *</span> <a name="l00312"></a>00312 <span class="comment"> * List of additional parameters in "extra_params" (apart from those in CGenericFeatureTracker) accepted by this class:</span> <a name="l00313"></a>00313 <span class="comment"> * - "window_width" (Default=15)</span> <a name="l00314"></a>00314 <span class="comment"> * - "window_height" (Default=15)</span> <a name="l00315"></a>00315 <span class="comment"> *</span> <a name="l00316"></a>00316 <span class="comment"> */</span> <a name="l00317"></a>00317 <span class="keyword">struct </span><a class="code" href="vision_2include_2mrpt_2vision_2link__pragmas_8h.html#aa4a17fb846aac61f4e57b17b6f784559">VISION_IMPEXP</a> CFeatureTracker_PatchMatch : <span class="keyword">public</span> CGenericFeatureTracker <a name="l00318"></a>00318 {<span class="comment"></span> <a name="l00319"></a>00319 <span class="comment"> /** Ctor */</span> <a name="l00320"></a>00320 CFeatureTracker_PatchMatch(<span class="keyword">const</span> <a class="code" href="structmrpt_1_1utils_1_1_t_parameters.html" title="For usage when passing a dynamic number of (numeric) arguments to a function, by name.">mrpt::utils::TParametersDouble</a> & extraParams = <a class="code" href="structmrpt_1_1utils_1_1_t_parameters.html" title="For usage when passing a dynamic number of (numeric) arguments to a function, by name.">mrpt::utils::TParametersDouble</a>() ); <a name="l00321"></a>00321 <a name="l00322"></a>00322 <span class="keyword">protected</span>: <a name="l00323"></a>00323 <span class="keyword">virtual</span> <span class="keywordtype">void</span> trackFeatures_impl( <a name="l00324"></a>00324 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &old_img, <a name="l00325"></a>00325 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_image.html" title="A class for storing images as grayscale or RGB bitmaps.">CImage</a> &new_img, <a name="l00326"></a>00326 vision::CFeatureList &inout_featureList ); <a name="l00327"></a>00327 }; <a name="l00328"></a>00328 <span class="comment"></span> <a name="l00329"></a>00329 <span class="comment"> /** Search for correspondences which are not in the same row and deletes them</span> <a name="l00330"></a>00330 <span class="comment"> * ...</span> <a name="l00331"></a>00331 <span class="comment"> */</span> <a name="l00332"></a>00332 <span class="keywordtype">void</span> <a class="code" href="vision_2include_2mrpt_2vision_2link__pragmas_8h.html#aa4a17fb846aac61f4e57b17b6f784559">VISION_IMPEXP</a> <a class="code" href="group__vision__tracking.html#ga448561282b2b497927a68d87b89c031b" title="Search for correspondences which are not in the same row and deletes them ...">checkTrackedFeatures</a>( CFeatureList &leftList, <a name="l00333"></a>00333 CFeatureList &rightList, <a name="l00334"></a>00334 vision::TMatchingOptions options); <a name="l00335"></a>00335 <a name="l00336"></a>00336 <span class="comment"></span> <a name="l00337"></a>00337 <span class="comment"> /** Filter bad correspondences by distance</span> <a name="l00338"></a>00338 <span class="comment"> * ...</span> <a name="l00339"></a>00339 <span class="comment"> */</span> <a name="l00340"></a>00340 <span class="keywordtype">void</span> <a class="code" href="vision_2include_2mrpt_2vision_2link__pragmas_8h.html#aa4a17fb846aac61f4e57b17b6f784559">VISION_IMPEXP</a> <a class="code" href="group__vision__tracking.html#ga695207179df350c26c75928d23ebec0e" title="Filter bad correspondences by distance ...">filterBadCorrsByDistance</a>( <a class="code" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html" title="A list of TMatchingPair.">mrpt::utils::TMatchingPairList</a> &list, <span class="comment">// The list of correspondences</span> <a name="l00341"></a>00341 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numberOfSigmas ); <span class="comment">// Threshold</span> <a name="l00342"></a>00342 <a name="l00343"></a>00343 <a name="l00344"></a>00344 <span class="comment"></span> <a name="l00345"></a>00345 <span class="comment"> /** @} */</span> <span class="comment">// end of grouping</span> <a name="l00346"></a>00346 } <a name="l00347"></a>00347 } <a name="l00348"></a>00348 <a name="l00349"></a>00349 <a name="l00350"></a>00350 <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>