height_map_2d.h
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (BSD License)
00003  *
00004  * Point Cloud Library (PCL) - www.pointclouds.org
00005  * Copyright (c) 2013-, Open Perception, Inc.
00006  *
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions
00011  * are met:
00012  *
00013  * * Redistributions of source code must retain the above copyright
00014  * notice, this list of conditions and the following disclaimer.
00015  * * Redistributions in binary form must reproduce the above
00016  * copyright notice, this list of conditions and the following
00017  * disclaimer in the documentation and/or other materials provided
00018  * with the distribution.
00019  * * Neither the name of the copyright holder(s) nor the names of its
00020  * contributors may be used to endorse or promote products derived
00021  * from this software without specific prior written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00024  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00025  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00026  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00027  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00028  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00029  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00030  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00031  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00032  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00033  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00034  * POSSIBILITY OF SUCH DAMAGE.
00035  *
00036  * height_map_2d.h
00037  * Created on: Nov 30, 2012
00038  * Author: Matteo Munaro
00039  */
00040 
00041 #ifndef PCL_PEOPLE_HEIGHT_MAP_2D_H_
00042 #define PCL_PEOPLE_HEIGHT_MAP_2D_H_
00043 
00044 #include <pcl/people/person_cluster.h>
00045 #include <pcl/point_types.h>
00046 
00047 namespace pcl
00048 {
00049   namespace people
00050   {
00055     template <typename PointT> class HeightMap2D;
00056 
00057     template <typename PointT>
00058     class HeightMap2D
00059     {
00060     public:
00061 
00062       typedef pcl::PointCloud<PointT> PointCloud;
00063       typedef boost::shared_ptr<PointCloud> PointCloudPtr;
00064       typedef boost::shared_ptr<const PointCloud> PointCloudConstPtr;
00065 
00067       HeightMap2D();
00068 
00070       virtual ~HeightMap2D ();
00071 
00077       void
00078       compute (pcl::people::PersonCluster<PointT>& cluster);
00079 
00083       void
00084       searchLocalMaxima ();
00085 
00089       void
00090       filterMaxima ();
00091 
00097       void
00098       setInputCloud (PointCloudPtr& cloud);
00099 
00105       void
00106       setGround (Eigen::VectorXf& ground_coeffs);
00107 
00113       void
00114       setBinSize (float bin_size);
00115 
00121       void
00122       setMinimumDistanceBetweenMaxima (float minimum_distance_between_maxima);
00123 
00129       void
00130       setSensorPortraitOrientation (bool vertical);
00131 
00135       std::vector<int>&
00136       getHeightMap ();
00137 
00141       float
00142       getBinSize ();
00143 
00147       float
00148       getMinimumDistanceBetweenMaxima ();
00149 
00153       int&
00154       getMaximaNumberAfterFiltering ();
00155 
00159       std::vector<int>&
00160       getMaximaCloudIndicesFiltered ();
00161 
00162     protected:
00164       Eigen::VectorXf ground_coeffs_;            
00165       
00167       float sqrt_ground_coeffs_;              
00168       
00170       PointCloudPtr cloud_;                
00171       
00173       bool vertical_;                    
00174       
00176       std::vector<int> buckets_;              
00177       
00179       std::vector<int> buckets_cloud_indices_;      
00180       
00182       float bin_size_;                  
00183       
00185       int maxima_number_;                  
00186       
00188       std::vector<int> maxima_indices_;          
00189       
00191       std::vector<int> maxima_cloud_indices_;        
00192       
00194       int maxima_number_after_filtering_;          
00195       
00197       std::vector<int> maxima_indices_filtered_;      
00198       
00200       std::vector<int> maxima_cloud_indices_filtered_;  
00201       
00203       float min_dist_between_maxima_;            
00204     };
00205 
00206   } /* namespace people */
00207 } /* namespace pcl */
00208 #include <pcl/people/impl/height_map_2d.hpp>
00209 #endif /* PCL_PEOPLE_HEIGHT_MAP_2D_H_ */


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:24:43