Sophie

Sophie

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

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>[mrpt-scanmatching]</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><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>
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">[mrpt-scanmatching]</div>  </div>
</div>
<div class="contents">
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p><small> <a href="index.html#libs">Back to list of all libraries</a> | <a href="modules.html">See all modules</a> </small> <br/>
 </p>
<h2>Library <code>mrpt-scanmatching</code></h2>
<hr/>
<p>Under this name we find functions in charge of solving the optimization problem of aligning a set of correspondences, both in 2D and in 3D. Note that this does not includes the iterative ICP algorithm (see <a class="el" href="classmrpt_1_1slam_1_1_c_i_c_p.html" title="Several implementations of ICP (Iterative closest point) algorithms for aligning two point maps or a ...">mrpt::slam::CICP</a>), included in another library (mrpt-slam).</p>
<p>See <a class="el" href="namespacemrpt_1_1scanmatching.html" title="A set of scan matching-related static functions.">mrpt::scanmatching</a> </p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1scanmatching.html">mrpt::scanmatching</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>A set of scan matching-related static functions. </p>
<br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double SCANMATCHING_IMPEXP&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mrpt__scanmatching__grp.html#gabb4485481a609553e61fe7bc262cf50b">mrpt::scanmatching::HornMethod</a> (const vector_double &amp;inPoints, vector_double &amp;outQuat, bool forceScaleToUnity=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function implements the Horn method for computing the change in pose between two coordinate systems.  <a href="#gabb4485481a609553e61fe7bc262cf50b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double SCANMATCHING_IMPEXP&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mrpt__scanmatching__grp.html#gadf0d4ff0062847dfa27474a377368c45">mrpt::scanmatching::HornMethod</a> (const vector_double &amp;inPoints, <a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d_quat.html">mrpt::poses::CPose3DQuat</a> &amp;outQuat, bool forceScaleToUnity=false)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool SCANMATCHING_IMPEXP&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mrpt__scanmatching__grp.html#ga95a1eefeb19509da16a45b30a65806a3">mrpt::scanmatching::leastSquareErrorRigidTransformation6D</a> (const <a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;in_correspondences, <a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d_quat.html">CPose3DQuat</a> &amp;out_transformation, double &amp;out_scale, const bool forceScaleToUnity=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method provides the closed-form solution of absolute orientation using unit quaternions to a set of over-constrained correspondences for finding the 6D rigid transformation between two cloud of 3D points.  <a href="#ga95a1eefeb19509da16a45b30a65806a3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mrpt__scanmatching__grp.html#gae1c6f78a5efeb0071854b349e5190f01">mrpt::scanmatching::leastSquareErrorRigidTransformation6D</a> (const <a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;in_correspondences, <a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d.html">CPose3D</a> &amp;out_transformation, double &amp;out_scale, const bool forceScaleToUnity=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method provides the closed-form solution of absolute orientation using unit quaternions to a set of over-constrained correspondences for finding the 6D rigid transformation between two cloud of 3D points.  <a href="#gae1c6f78a5efeb0071854b349e5190f01"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool SCANMATCHING_IMPEXP&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mrpt__scanmatching__grp.html#ga96a45b6eb34d06a8d0fd9f38dcd696de">mrpt::scanmatching::leastSquareErrorRigidTransformation6DRANSAC</a> (const <a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;in_correspondences, <a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d.html">CPose3D</a> &amp;out_transformation, double &amp;out_scale, vector_int &amp;out_inliers_idx, const unsigned int ransac_minSetSize=5, const unsigned int ransac_nmaxSimulations=50, const double ransac_maxSetSizePct=0.7, const bool forceScaleToUnity=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method provides the closed-form solution of absolute orientation using unit quaternions to a set of over-constrained correspondences for finding the 6D rigid transformation between two cloud of 3D points using RANSAC.  <a href="#ga96a45b6eb34d06a8d0fd9f38dcd696de"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool SCANMATCHING_IMPEXP&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mrpt__scanmatching__grp.html#ga7a5ed1b5f7e14adbcd2ec35198327ae7">mrpt::scanmatching::leastSquareErrorRigidTransformation</a> (<a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;in_correspondences, <a class="el" href="classmrpt_1_1poses_1_1_c_pose2_d.html">CPose2D</a> &amp;out_transformation, <a class="el" href="namespacemrpt_1_1math.html#a58d0ee60eee38e990848ccb8b83e8338">CMatrixDouble33</a> *out_estimateCovariance=NULL)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method provides the basic least-square-error solution to a set of over-constrained correspondences for finding the (x,y,phi) rigid transformation between two planes.  <a href="#ga7a5ed1b5f7e14adbcd2ec35198327ae7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool SCANMATCHING_IMPEXP&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mrpt__scanmatching__grp.html#ga89ebdf76aa2d029c189ae2312db405a9">mrpt::scanmatching::leastSquareErrorRigidTransformation</a> (<a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;in_correspondences, <a class="el" href="classmrpt_1_1poses_1_1_c_pose_p_d_f_gaussian.html">CPosePDFGaussian</a> &amp;out_transformation)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method provides the basic least-square-error solution to a set of over-constrained correspondences for finding the (x,y,phi) rigid transformation between two planes.  <a href="#ga89ebdf76aa2d029c189ae2312db405a9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void SCANMATCHING_IMPEXP&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mrpt__scanmatching__grp.html#ga1714c0f5d66a47509926ffdbfcd261d6">mrpt::scanmatching::robustRigidTransformation</a> (<a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;in_correspondences, poses::CPosePDFSOG &amp;out_transformation, float normalizationStd, unsigned int ransac_minSetSize=3, unsigned int ransac_maxSetSize=20, float ransac_mahalanobisDistanceThreshold=3.0f, unsigned int ransac_nSimulations=0, TMatchingPairList *out_largestSubSet=NULL, bool ransac_fuseByCorrsMatch=true, float ransac_fuseMaxDiffXY=0.01f, float ransac_fuseMaxDiffPhi=DEG2RAD(0.1f), bool ransac_algorithmForLandmarks=true, double probability_find_good_model=0.999, unsigned int ransac_min_nSimulations=1500)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method implements a RANSAC-based robust estimation of the rigid transformation between two planes, returning a probability distribution over all the posibilities as a Sum of Gaussians.  <a href="#ga1714c0f5d66a47509926ffdbfcd261d6"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gabb4485481a609553e61fe7bc262cf50b"></a><!-- doxytag: member="mrpt::scanmatching::HornMethod" ref="gabb4485481a609553e61fe7bc262cf50b" args="(const vector_double &amp;inPoints, vector_double &amp;outQuat, bool forceScaleToUnity=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double SCANMATCHING_IMPEXP mrpt::scanmatching::HornMethod </td>
          <td>(</td>
          <td class="paramtype">const vector_double &amp;&#160;</td>
          <td class="paramname"><em>inPoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector_double &amp;&#160;</td>
          <td class="paramname"><em>outQuat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>forceScaleToUnity</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function implements the Horn method for computing the change in pose between two coordinate systems. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">inPoints</td><td>A vector containing the coordinates of the input points in the format: [x11 y11 z11, x12 y12 z12, x21 y21 z21, x22 y22 z22, x31 y31 z31, x32 y32 z32, ... ] where [xi1 yi1 zi1] and [xi2 yi2 zi2] represent the i-th pair of corresponding 3D points in the two coordinate systems "1" and "2" </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">outQuat</td><td>A 7D vector containing the traslation and rotation (in a quaternion form) which indicates the change in pose of system "2" wrt "1". </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">forceScaleToUnity</td><td>Whether or not force the scale employed to rotate the coordinate systems to one (rigid transformation)</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The computed scale of the optimal transformation (will be 1.0 for a perfectly rigid translation + rotation). </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>THornMethodOpts </dd></dl>

</div>
</div>
<a class="anchor" id="gadf0d4ff0062847dfa27474a377368c45"></a><!-- doxytag: member="mrpt::scanmatching::HornMethod" ref="gadf0d4ff0062847dfa27474a377368c45" args="(const vector_double &amp;inPoints, mrpt::poses::CPose3DQuat &amp;outQuat, bool forceScaleToUnity=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double SCANMATCHING_IMPEXP mrpt::scanmatching::HornMethod </td>
          <td>(</td>
          <td class="paramtype">const vector_double &amp;&#160;</td>
          <td class="paramname"><em>inPoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d_quat.html">mrpt::poses::CPose3DQuat</a> &amp;&#160;</td>
          <td class="paramname"><em>outQuat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>forceScaleToUnity</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a class="anchor" id="ga7a5ed1b5f7e14adbcd2ec35198327ae7"></a><!-- doxytag: member="mrpt::scanmatching::leastSquareErrorRigidTransformation" ref="ga7a5ed1b5f7e14adbcd2ec35198327ae7" args="(TMatchingPairList &amp;in_correspondences, CPose2D &amp;out_transformation, CMatrixDouble33 *out_estimateCovariance=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SCANMATCHING_IMPEXP mrpt::scanmatching::leastSquareErrorRigidTransformation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;&#160;</td>
          <td class="paramname"><em>in_correspondences</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1poses_1_1_c_pose2_d.html">CPose2D</a> &amp;&#160;</td>
          <td class="paramname"><em>out_transformation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacemrpt_1_1math.html#a58d0ee60eee38e990848ccb8b83e8338">CMatrixDouble33</a> *&#160;</td>
          <td class="paramname"><em>out_estimateCovariance</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method provides the basic least-square-error solution to a set of over-constrained correspondences for finding the (x,y,phi) rigid transformation between two planes. </p>
<p>The optimal transformation q fulfills: <img class="formulaInl" alt="$ point_this = q \oplus point_other $" src="form_108.png"/> </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">in_correspondences</td><td>The set of correspondences. </td></tr>
    <tr><td class="paramname">out_transformation</td><td>The pose that minimizes the mean-square-error between all the correspondences. </td></tr>
    <tr><td class="paramname">out_estimateCovariance</td><td>If provided (!=NULL) this will contain on return a 3x3 covariance matrix with the NORMALIZED optimal estimate uncertainty. This matrix must be multiplied by <img class="formulaInl" alt="$\sigma^2_p$" src="form_109.png"/>, the variance of matched points in <img class="formulaInl" alt="$x$" src="form_110.png"/> and <img class="formulaInl" alt="$y$" src="form_111.png"/> (see paper <a href="http://www.mrpt.org/Paper:Occupancy_Grid_Matching">http://www.mrpt.org/Paper:Occupancy_Grid_Matching</a>) </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname">Raises</td><td>a <a class="el" href="classstd_1_1exception.html" title="STL class.">std::exception</a> if the list "in_correspondences" has not a minimum of two correspondences. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there are at least two correspondences, or false if one or none, thus we cannot establish any correspondence. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__mrpt__scanmatching__grp.html#ga1714c0f5d66a47509926ffdbfcd261d6" title="This method implements a RANSAC-based robust estimation of the rigid transformation between two plane...">robustRigidTransformation</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga89ebdf76aa2d029c189ae2312db405a9"></a><!-- doxytag: member="mrpt::scanmatching::leastSquareErrorRigidTransformation" ref="ga89ebdf76aa2d029c189ae2312db405a9" args="(TMatchingPairList &amp;in_correspondences, CPosePDFGaussian &amp;out_transformation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SCANMATCHING_IMPEXP mrpt::scanmatching::leastSquareErrorRigidTransformation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;&#160;</td>
          <td class="paramname"><em>in_correspondences</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1poses_1_1_c_pose_p_d_f_gaussian.html">CPosePDFGaussian</a> &amp;&#160;</td>
          <td class="paramname"><em>out_transformation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method provides the basic least-square-error solution to a set of over-constrained correspondences for finding the (x,y,phi) rigid transformation between two planes. </p>
<p>The optimal transformation q fulfills: <img class="formulaInl" alt="$ point_this = q \oplus point_other $" src="form_108.png"/> </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">in_correspondences</td><td>The set of correspondences. </td></tr>
    <tr><td class="paramname">out_transformation</td><td>The pose that minimizes the mean-square-error between all the correspondences. </td></tr>
    <tr><td class="paramname">out_estimateCovariance</td><td>If provided (!=NULL) this will contain on return a 3x3 covariance matrix with the NORMALIZED optimal estimate uncertainty. This matrix must be multiplied by <img class="formulaInl" alt="$\sigma^2_p$" src="form_109.png"/>, the variance of matched points in <img class="formulaInl" alt="$x$" src="form_110.png"/> and <img class="formulaInl" alt="$y$" src="form_111.png"/> (see paper <a href="http://www.mrpt.org/Paper:Occupancy_Grid_Matching">http://www.mrpt.org/Paper:Occupancy_Grid_Matching</a>) </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname">Raises</td><td>a <a class="el" href="classstd_1_1exception.html" title="STL class.">std::exception</a> if the list "in_correspondences" has not a minimum of two correspondences. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there are at least two correspondences, or false if one or none, thus we cannot establish any correspondence. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__mrpt__scanmatching__grp.html#ga1714c0f5d66a47509926ffdbfcd261d6" title="This method implements a RANSAC-based robust estimation of the rigid transformation between two plane...">robustRigidTransformation</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga95a1eefeb19509da16a45b30a65806a3"></a><!-- doxytag: member="mrpt::scanmatching::leastSquareErrorRigidTransformation6D" ref="ga95a1eefeb19509da16a45b30a65806a3" args="(const TMatchingPairList &amp;in_correspondences, CPose3DQuat &amp;out_transformation, double &amp;out_scale, const bool forceScaleToUnity=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SCANMATCHING_IMPEXP mrpt::scanmatching::leastSquareErrorRigidTransformation6D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;&#160;</td>
          <td class="paramname"><em>in_correspondences</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d_quat.html">CPose3DQuat</a> &amp;&#160;</td>
          <td class="paramname"><em>out_transformation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>out_scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>forceScaleToUnity</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method provides the closed-form solution of absolute orientation using unit quaternions to a set of over-constrained correspondences for finding the 6D rigid transformation between two cloud of 3D points. </p>
<p>The output 3D pose is computed using the method described in "Closed-form solution of absolute orientation using unit quaternions", BKP Horn, Journal of the Optical Society of America, 1987.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">in_correspondences</td><td>The set of correspondences in TMatchingPairList form ("this" and "other"). </td></tr>
    <tr><td class="paramname">out_transformation</td><td>The change in pose (CPose3DQuat) of the "other" reference system wrt "this" reference system which minimizes the mean-square-error between all the correspondences. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname">Raises</td><td>a <a class="el" href="classstd_1_1exception.html" title="STL class.">std::exception</a> if the list "in_correspondences" has not a minimum of three correspondences. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there are at least three correspondences, or false otherwise, thus we cannot establish any correspondence. Implemented by FAMD, 2007. Revised in 2010. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__mrpt__scanmatching__grp.html#ga1714c0f5d66a47509926ffdbfcd261d6" title="This method implements a RANSAC-based robust estimation of the rigid transformation between two plane...">robustRigidTransformation</a> </dd></dl>

<p>Referenced by <a class="el" href="scanmatching_2scan__matching_8h_source.html#l00107">mrpt::scanmatching::leastSquareErrorRigidTransformation6D()</a>.</p>

</div>
</div>
<a class="anchor" id="gae1c6f78a5efeb0071854b349e5190f01"></a><!-- doxytag: member="mrpt::scanmatching::leastSquareErrorRigidTransformation6D" ref="gae1c6f78a5efeb0071854b349e5190f01" args="(const TMatchingPairList &amp;in_correspondences, CPose3D &amp;out_transformation, double &amp;out_scale, const bool forceScaleToUnity=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mrpt::scanmatching::leastSquareErrorRigidTransformation6D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;&#160;</td>
          <td class="paramname"><em>in_correspondences</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d.html">CPose3D</a> &amp;&#160;</td>
          <td class="paramname"><em>out_transformation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>out_scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>forceScaleToUnity</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method provides the closed-form solution of absolute orientation using unit quaternions to a set of over-constrained correspondences for finding the 6D rigid transformation between two cloud of 3D points. </p>
<p>The output 3D pose is computed using the method described in "Closed-form solution of absolute orientation using unit quaternions", BKP Horn, Journal of the Optical Society of America, 1987.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">in_correspondences</td><td>The set of correspondences. </td></tr>
    <tr><td class="paramname">out_transformation</td><td>The change in pose (CPose3DQuat) of the "other" reference system wrt "this" reference system which minimizes the mean-square-error between all the correspondences. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname">Raises</td><td>a <a class="el" href="classstd_1_1exception.html" title="STL class.">std::exception</a> if the list "in_correspondences" has not a minimum of two correspondences. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there are at least two correspondences, or false if one or none, thus we cannot establish any correspondence. Implemented by FAMD, 2007. Revised in 2010 </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__mrpt__scanmatching__grp.html#ga1714c0f5d66a47509926ffdbfcd261d6" title="This method implements a RANSAC-based robust estimation of the rigid transformation between two plane...">robustRigidTransformation</a> </dd></dl>

<p>Definition at line <a class="el" href="scanmatching_2scan__matching_8h_source.html#l00107">107</a> of file <a class="el" href="scanmatching_2scan__matching_8h_source.html">scanmatching/scan_matching.h</a>.</p>

<p>References <a class="el" href="mrpt__macros_8h_source.html#l00370">MRPT_START</a>, <a class="el" href="_c_quaternion_8h_source.html#l00042">mrpt::math::UNINITIALIZED_QUATERNION</a>, <a class="el" href="group__mrpt__scanmatching__grp.html#ga95a1eefeb19509da16a45b30a65806a3">mrpt::scanmatching::leastSquareErrorRigidTransformation6D()</a>, and <a class="el" href="mrpt__macros_8h_source.html#l00374">MRPT_END</a>.</p>

</div>
</div>
<a class="anchor" id="ga96a45b6eb34d06a8d0fd9f38dcd696de"></a><!-- doxytag: member="mrpt::scanmatching::leastSquareErrorRigidTransformation6DRANSAC" ref="ga96a45b6eb34d06a8d0fd9f38dcd696de" args="(const TMatchingPairList &amp;in_correspondences, CPose3D &amp;out_transformation, double &amp;out_scale, vector_int &amp;out_inliers_idx, const unsigned int ransac_minSetSize=5, const unsigned int ransac_nmaxSimulations=50, const double ransac_maxSetSizePct=0.7, const bool forceScaleToUnity=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SCANMATCHING_IMPEXP mrpt::scanmatching::leastSquareErrorRigidTransformation6DRANSAC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;&#160;</td>
          <td class="paramname"><em>in_correspondences</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1poses_1_1_c_pose3_d.html">CPose3D</a> &amp;&#160;</td>
          <td class="paramname"><em>out_transformation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>out_scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector_int &amp;&#160;</td>
          <td class="paramname"><em>out_inliers_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned int&#160;</td>
          <td class="paramname"><em>ransac_minSetSize</em> = <code>5</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned int&#160;</td>
          <td class="paramname"><em>ransac_nmaxSimulations</em> = <code>50</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>ransac_maxSetSizePct</em> = <code>0.7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>forceScaleToUnity</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method provides the closed-form solution of absolute orientation using unit quaternions to a set of over-constrained correspondences for finding the 6D rigid transformation between two cloud of 3D points using RANSAC. </p>
<p>The output 3D pose is computed using the method described in "Closed-form solution of absolute orientation using unit quaternions", BKP Horn, Journal of the Optical Society of America, 1987. If supplied, the output covariance matrix is computed using... TODO </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000006">Todo:</a></b></dt><dd>Explain covariance!!</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">in_correspondences</td><td>The set of correspondences. </td></tr>
    <tr><td class="paramname">out_transformation</td><td>The pose that minimizes the mean-square-error between all the correspondences. </td></tr>
    <tr><td class="paramname">out_scale</td><td>The estimated scale of the rigid transformation (should be very close to 1.0) </td></tr>
    <tr><td class="paramname">out_inliers_idx</td><td>Indexes within the "in_correspondences" list which corresponds with inliers </td></tr>
    <tr><td class="paramname">ransac_minSetSize</td><td>The minimum amount of points in the set </td></tr>
    <tr><td class="paramname">ransac_nmaxSimulations</td><td>The maximum number of iterations of the RANSAC algorithm </td></tr>
    <tr><td class="paramname">ransac_maxSetSizePct</td><td>The (minimum) assumed percent (0.0 - 1.0) of the input set to be considered as inliers </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname">Raises</td><td>a <a class="el" href="classstd_1_1exception.html" title="STL class.">std::exception</a> if the list "in_correspondences" has not a minimum of two correspondences. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if there are at least two correspondences, or false if one or none, thus we cannot establish any correspondence. Implemented by FAMD, 2008. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__mrpt__scanmatching__grp.html#ga1714c0f5d66a47509926ffdbfcd261d6" title="This method implements a RANSAC-based robust estimation of the rigid transformation between two plane...">robustRigidTransformation</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga1714c0f5d66a47509926ffdbfcd261d6"></a><!-- doxytag: member="mrpt::scanmatching::robustRigidTransformation" ref="ga1714c0f5d66a47509926ffdbfcd261d6" args="(TMatchingPairList &amp;in_correspondences, poses::CPosePDFSOG &amp;out_transformation, float normalizationStd, unsigned int ransac_minSetSize=3, unsigned int ransac_maxSetSize=20, float ransac_mahalanobisDistanceThreshold=3.0f, unsigned int ransac_nSimulations=0, TMatchingPairList *out_largestSubSet=NULL, bool ransac_fuseByCorrsMatch=true, float ransac_fuseMaxDiffXY=0.01f, float ransac_fuseMaxDiffPhi=DEG2RAD(0.1f), bool ransac_algorithmForLandmarks=true, double probability_find_good_model=0.999, unsigned int ransac_min_nSimulations=1500)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SCANMATCHING_IMPEXP mrpt::scanmatching::robustRigidTransformation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> &amp;&#160;</td>
          <td class="paramname"><em>in_correspondences</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">poses::CPosePDFSOG &amp;&#160;</td>
          <td class="paramname"><em>out_transformation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>normalizationStd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>ransac_minSetSize</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>ransac_maxSetSize</em> = <code>20</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>ransac_mahalanobisDistanceThreshold</em> = <code>3.0f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>ransac_nSimulations</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1utils_1_1_t_matching_pair_list.html">TMatchingPairList</a> *&#160;</td>
          <td class="paramname"><em>out_largestSubSet</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>ransac_fuseByCorrsMatch</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>ransac_fuseMaxDiffXY</em> = <code>0.01f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>ransac_fuseMaxDiffPhi</em> = <code>DEG2RAD(0.1f)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>ransac_algorithmForLandmarks</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>probability_find_good_model</em> = <code>0.999</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>ransac_min_nSimulations</em> = <code>1500</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method implements a RANSAC-based robust estimation of the rigid transformation between two planes, returning a probability distribution over all the posibilities as a Sum of Gaussians. </p>
<p>This works are follows:</p>
<ul>
<li>Repeat "ransac_nSimulations" times:<ul>
<li>Randomly pick TWO correspondences from the set "in_correspondences".</li>
<li>Compute the associated rigid transformation.</li>
<li>For "ransac_maxSetSize" randomly selected correspondences, test for "consensus" with the current group:<ul>
<li>If if is compatible (ransac_mahalanobisDistanceThreshold), grow the "consensus set"</li>
<li>If not, do not add it.</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>For more details refer to the tutorial on <a href="http://www.mrpt.org/Scan_Matching_Algorithms">scan matching methods</a>. NOTE:</p>
<ul>
<li>If a pointer is supplied to "out_largestSubSet", the largest consensus sub-set of correspondences will be returned there.</li>
<li>The parameter "normalizationStd" is the <b>standard deviation</b> (not variance) of landmarks being matched in X,Y. Used to normalize covariances returned as the SoG.</li>
<li>If ransac_nSimulations=0 then an adaptive algorithm is used to determine the number of iterations, such as a good model is found with a probability p=0.999, or that passed as the parameter probability_find_good_model</li>
<li>When using "probability_find_good_model", the minimum number of iterations can be set with "ransac_min_nSimulations".</li>
</ul>
<p>If ransac_fuseByCorrsMatch=true (the default), the weight of Gaussian modes will be increased when an exact match in the subset of correspondences for the modes is found. Otherwise, an approximate method is used as test by just looking at the resulting X,Y,PHI means (Threshold in this case are: ransac_fuseMaxDiffXY, ransac_fuseMaxDiffPhi).</p>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname">Raises</td><td>a <a class="el" href="classstd_1_1exception.html" title="STL class.">std::exception</a> if the list "in_correspondences" has not a minimum of two correspondences. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__mrpt__scanmatching__grp.html#ga7a5ed1b5f7e14adbcd2ec35198327ae7" title="This method provides the basic least-square-error solution to a set of over-constrained correspondenc...">leastSquareErrorRigidTransformation</a> </dd></dl>

</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>