00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2009 University of Malaga | 00007 | | 00008 | This software was written by the Machine Perception and Intelligent | 00009 | Robotics Lab, University of Malaga (Spain). | 00010 | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> | 00011 | | 00012 | This file is part of the MRPT project. | 00013 | | 00014 | MRPT is free software: you can redistribute it and/or modify | 00015 | it under the terms of the GNU General Public License as published by | 00016 | the Free Software Foundation, either version 3 of the License, or | 00017 | (at your option) any later version. | 00018 | | 00019 | MRPT is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00022 | GNU General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU General Public License | 00025 | along with MRPT. If not, see <http://www.gnu.org/licenses/>. | 00026 | | 00027 +---------------------------------------------------------------------------+ */ 00028 #ifndef ransac_optimizers_H 00029 #define ransac_optimizers_H 00030 00031 #include <mrpt/math/ransac.h> 00032 #include <mrpt/math/geometry.h> 00033 #include <mrpt/slam/CPointsMap.h> 00034 00035 namespace mrpt 00036 { 00037 namespace math 00038 { 00039 00040 /** @name RANSAC detectors 00041 @{ 00042 */ 00043 00044 /** Fit a number of 3-D planes to a given point cloud, automatically determining the number of existing planes by means of the provided threshold and minimum number of supporting inliers. 00045 * \param out_detected_planes The output list of pairs: number of supporting inliers, detected plane. 00046 * \param threshold The maximum distance between a point and a temptative plane such as the point is considered an inlier. 00047 * \param min_inliers_for_valid_plane The minimum number of supporting inliers to consider a plane as valid. 00048 */ 00049 template <typename NUMTYPE> 00050 void MRPTDLLIMPEXP ransac_detect_3D_planes( 00051 const std::vector<NUMTYPE> &x, 00052 const std::vector<NUMTYPE> &y, 00053 const std::vector<NUMTYPE> &z, 00054 std::vector<std::pair<size_t,TPlane> > &out_detected_planes, 00055 const double threshold, 00056 const size_t min_inliers_for_valid_plane = 10 00057 ); 00058 00059 /** Fit a number of 3-D planes to a given point cloud, automatically determining the number of existing planes by means of the provided threshold and minimum number of supporting inliers. 00060 * \param out_detected_planes The output list of pairs: number of supporting inliers, detected plane. 00061 * \param threshold The maximum distance between a point and a temptative plane such as the point is considered an inlier. 00062 * \param min_inliers_for_valid_plane The minimum number of supporting inliers to consider a plane as valid. 00063 */ 00064 void MRPTDLLIMPEXP ransac_detect_3D_planes( 00065 const mrpt::slam::CPointsMap * points_map, 00066 std::vector<std::pair<size_t,TPlane> > &out_detected_planes, 00067 const double threshold, 00068 const size_t min_inliers_for_valid_plane = 10 00069 ); 00070 00071 00072 00073 /** Fit a number of 2-D lines to a given point cloud, automatically determining the number of existing lines by means of the provided threshold and minimum number of supporting inliers. 00074 * \param out_detected_lines The output list of pairs: number of supporting inliers, detected line. 00075 * \param threshold The maximum distance between a point and a temptative line such as the point is considered an inlier. 00076 * \param min_inliers_for_valid_line The minimum number of supporting inliers to consider a line as valid. 00077 */ 00078 template <typename NUMTYPE> 00079 void MRPTDLLIMPEXP ransac_detect_2D_lines( 00080 const std::vector<NUMTYPE> &x, 00081 const std::vector<NUMTYPE> &y, 00082 std::vector<std::pair<size_t,TLine2D> > &out_detected_lines, 00083 const double threshold, 00084 const size_t min_inliers_for_valid_line = 5 00085 ); 00086 00087 /** @} */ 00088 00089 00090 } // End of namespace 00091 } // End of namespace 00092 00093 #endif
Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 23:10:56 EDT 2009 |