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