41 #ifndef PCL_PEOPLE_GROUND_BASED_PEOPLE_DETECTION_APP_H_
42 #define PCL_PEOPLE_GROUND_BASED_PEOPLE_DETECTION_APP_H_
44 #include <pcl/point_types.h>
45 #include <pcl/sample_consensus/sac_model_plane.h>
46 #include <pcl/sample_consensus/ransac.h>
47 #include <pcl/filters/extract_indices.h>
48 #include <pcl/segmentation/extract_clusters.h>
49 #include <pcl/kdtree/kdtree.h>
50 #include <pcl/filters/voxel_grid.h>
51 #include <pcl/people/person_cluster.h>
52 #include <pcl/people/head_based_subcluster.h>
53 #include <pcl/people/person_classifier.h>
70 template <
typename Po
intT>
99 setGround (Eigen::VectorXf& ground_coeffs);
296 #include <pcl/people/impl/ground_based_people_detection_app.hpp>
void setIntrinsics(Eigen::Matrix3f intrinsics_matrix)
Set intrinsic parameters of the RGB camera.
pcl::PointCloud< pcl::RGB >::Ptr rgb_image_
pointer to a RGB cloud corresponding to cloud_
void setVoxelSize(float voxel_size)
Set voxel size.
Eigen::VectorXf ground_coeffs_
ground plane coefficients
float max_height_
person clusters maximum height from the ground plane
void setClassifier(pcl::people::PersonClassifier< pcl::RGB > person_classifier)
Set SVM-based person classifier.
pcl::people::PersonClassifier< pcl::RGB > person_classifier_
SVM-based person classifier.
void extractRGBFromPointCloud(PointCloudPtr input_cloud, pcl::PointCloud< pcl::RGB >::Ptr &output_cloud)
Extract RGB information from a point cloud and output the corresponding RGB point cloud...
float getMinimumDistanceBetweenHeads()
Get minimum distance between persons' heads.
virtual ~GroundBasedPeopleDetectionApp()
Destructor.
bool head_centroid_
if true, the person centroid is computed as the centroid of the cluster points belonging to the head;...
void setDimensionLimits(int min_points, int max_points)
Set minimum and maximum allowed number of points for a person cluster.
void setMinimumDistanceBetweenHeads(float heads_minimum_distance)
Set minimum distance between persons' heads.
void setInputCloud(PointCloudPtr &cloud)
Set the pointer to the input cloud.
int max_points_
maximum number of points for a person cluster
void getHeightLimits(float &min_height, float &max_height)
Get minimum and maximum allowed height for a person cluster.
bool dimension_limits_set_
true if min_points and max_points have been set by the user, false otherwise
int sampling_factor_
sampling factor used to downsample the point cloud
Eigen::Matrix3f intrinsics_matrix_
intrinsic parameters matrix of the RGB camera
PointCloudPtr getNoGroundCloud()
Get pointcloud after voxel grid filtering and ground removal.
float voxel_size_
voxel size
PersonCluster represents a class for representing information about a cluster containing a person...
pcl::PointCloud< PointT > PointCloud
boost::shared_ptr< const PointCloud > PointCloudConstPtr
bool person_classifier_set_flag_
flag stating if the classifier has been set or not
GroundBasedPeopleDetectionApp performs people detection on RGB-D data having as input the ground plan...
void setHeadCentroid(bool head_centroid)
Set head_centroid_ to true (person centroid is in the head) or false (person centroid is the whole bo...
void getDimensionLimits(int &min_points, int &max_points)
Get minimum and maximum allowed number of points for a person cluster.
void swapDimensions(pcl::PointCloud< pcl::RGB >::Ptr &cloud)
Swap rows/cols dimensions of a RGB point cloud (90 degrees counterclockwise rotation).
void setHeightLimits(float min_height, float max_height)
Set minimum and maximum allowed height for a person cluster.
PointCloudPtr no_ground_cloud_
pointer to the cloud after voxel grid filtering and ground removal
Eigen::VectorXf getGround()
Get floor coefficients.
bool compute(std::vector< pcl::people::PersonCluster< PointT > > &clusters)
Perform people detection on the input data and return people clusters information.
int min_points_
minimum number of points for a person cluster
boost::shared_ptr< PointCloud< PointT > > Ptr
void setSamplingFactor(int sampling_factor)
Set sampling factor.
boost::shared_ptr< PointCloud > PointCloudPtr
bool vertical_
if true, the sensor is considered to be vertically placed (portrait mode)
void setGround(Eigen::VectorXf &ground_coeffs)
Set the ground coefficients.
void setSensorPortraitOrientation(bool vertical)
Set sensor orientation (vertical = true means portrait mode, vertical = false means landscape mode)...
PointCloud represents the base class in PCL for storing collections of 3D points. ...
PointCloudPtr cloud_
pointer to the input cloud
float min_height_
person clusters minimum height from the ground plane
float heads_minimum_distance_
minimum distance between persons' heads
float sqrt_ground_coeffs_
ground plane normalization factor
GroundBasedPeopleDetectionApp()
Constructor.