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>
54 #include <pcl/common/transforms.h>
71 template <
typename Po
intT>
100 setGround (Eigen::VectorXf& ground_coeffs);
148 setFOV (
float min,
float max);
374 #include <pcl/people/impl/ground_based_people_detection_app.hpp>
float min_width_
person clusters minimum width, used to estimate how many points minimally represent a person cluster ...
float min_fov_
the beginning of the field of view in z-direction, should be usually set to zero
GroundBasedPeopleDetectionApp performs people detection on RGB-D data having as input the ground plan...
Eigen::Matrix3f transformation_
rotation matrix which transforms input point cloud to internal people tracker coordinate frame ...
boost::shared_ptr< PointCloud< PointT > > Ptr
boost::shared_ptr< PointCloud > PointCloudPtr
float getMinimumDistanceBetweenHeads()
Get minimum distance between persons' heads.
float max_width_
person clusters maximum width, used to estimate how many points maximally represent a person cluster ...
PersonCluster represents a class for representing information about a cluster containing a person...
GroundBasedPeopleDetectionApp()
Constructor.
PointCloudPtr getNoGroundCloud()
Get pointcloud after voxel grid filtering and ground removal.
int min_points_
minimum number of points for a person cluster
Eigen::VectorXf ground_coeffs_transformed_
the transformed ground coefficients
float min_height_
person clusters minimum height from the ground plane
This file defines compatibility wrappers for low level I/O functions.
bool person_classifier_set_flag_
flag stating if the classifier has been set or not
Eigen::VectorXf ground_coeffs_
ground plane coefficients
int sampling_factor_
sampling factor used to downsample the point cloud
void applyTransformationPointCloud()
Applies the transformation to the input point cloud.
void setSamplingFactor(int sampling_factor)
Set sampling factor.
pcl::PointCloud< PointT > PointCloud
void setMinimumDistanceBetweenHeads(float heads_minimum_distance)
Set minimum distance between persons' heads.
float voxel_size_
voxel size
void setTransformation(const Eigen::Matrix3f &transformation)
Set the transformation matrix, which is used in order to transform the given point cloud...
void filter()
Reduces the input cloud to one point per voxel and limits the field of view.
bool ground_coeffs_set_
flag stating whether the ground coefficients have been set or not
void updateMinMaxPoints()
Estimates min_points_ and max_points_ based on the minimal and maximal cluster size and the voxel siz...
virtual ~GroundBasedPeopleDetectionApp()
Destructor.
Eigen::Matrix3f intrinsics_matrix_transformed_
the transformed intrinsics matrix
void setInputCloud(PointCloudPtr &cloud)
Set the pointer to the input cloud.
void swapDimensions(pcl::PointCloud< pcl::RGB >::Ptr &cloud)
Swap rows/cols dimensions of a RGB point cloud (90 degrees counterclockwise rotation).
void setPersonClusterLimits(float min_height, float max_height, float min_width, float max_width)
Set minimum and maximum allowed height and width for a person cluster.
float max_fov_
the end of the field of view in z-direction
PointCloudPtr getFilteredCloud()
Get the filtered point cloud.
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.
pcl::PointCloud< pcl::RGB >::Ptr rgb_image_
pointer to a RGB cloud corresponding to cloud_
pcl::people::PersonClassifier< pcl::RGB > person_classifier_
SVM-based person classifier.
void setHeadCentroid(bool head_centroid)
Set head_centroid_ to true (person centroid is in the head) or false (person centroid is the whole bo...
PointCloudPtr cloud_
pointer to the input cloud
PointCloudPtr cloud_filtered_
pointer to the filtered cloud
void setGround(Eigen::VectorXf &ground_coeffs)
Set the ground coefficients.
void setIntrinsics(Eigen::Matrix3f intrinsics_matrix)
Set intrinsic parameters of the RGB camera.
Eigen::Matrix3f intrinsics_matrix_
intrinsic parameters matrix of the RGB camera
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...
bool vertical_
if true, the sensor is considered to be vertically placed (portrait mode)
PointCloud represents the base class in PCL for storing collections of 3D points. ...
void applyTransformationIntrinsics()
Applies the transformation to the intrinsics matrix.
void applyTransformationGround()
Applies the transformation to the ground plane.
void setFOV(float min, float max)
Set the field of view of the point cloud in z direction.
PointCloudPtr no_ground_cloud_
pointer to the cloud after voxel grid filtering and ground removal
void setClassifier(pcl::people::PersonClassifier< pcl::RGB > person_classifier)
Set SVM-based person classifier.
void getPersonClusterLimits(float &min_height, float &max_height, float &min_width, float &max_width)
Get the minimum and maximum allowed height and width for a person cluster.
float heads_minimum_distance_
minimum distance between persons' heads
bool transformation_set_
flag stating whether the transformation matrix has been set or not
void setSensorPortraitOrientation(bool vertical)
Set sensor orientation (vertical = true means portrait mode, vertical = false means landscape mode)...
void setVoxelSize(float voxel_size)
Set voxel size.
bool head_centroid_
if true, the person centroid is computed as the centroid of the cluster points belonging to the head;...
bool intrinsics_matrix_set_
flag stating whether the intrinsics matrix has been set or not
int max_points_
maximum number of points for a person cluster
float sqrt_ground_coeffs_
ground plane normalization factor
float max_height_
person clusters maximum height from the ground plane
boost::shared_ptr< const PointCloud > PointCloudConstPtr
void getDimensionLimits(int &min_points, int &max_points)
Get minimum and maximum allowed number of points for a person cluster.