44 #include <pcl/sample_consensus/sac_model_plane.h>
45 #include <pcl/sample_consensus/ransac.h>
46 #include <pcl/kdtree/kdtree.h>
47 #include <pcl/people/person_cluster.h>
48 #include <pcl/people/head_based_subcluster.h>
49 #include <pcl/people/person_classifier.h>
50 #include <pcl/common/transforms.h>
67 template <
typename Po
intT>
96 setGround (Eigen::VectorXf& ground_coeffs);
144 setFOV (
float min,
float max);
370 #include <pcl/people/impl/ground_based_people_detection_app.hpp>
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
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.
PointCloudPtr getNoGroundCloud()
Get pointcloud after voxel grid filtering and ground removal.
void filter()
Reduces the input cloud to one point per voxel and limits the field of view.
float min_width_
person clusters minimum width, used to estimate how many points minimally represent a person cluster
void applyTransformationIntrinsics()
Applies the transformation to the intrinsics matrix.
PointCloudPtr cloud_filtered_
pointer to the filtered cloud
GroundBasedPeopleDetectionApp()
Constructor.
void setSamplingFactor(int sampling_factor)
Set sampling factor.
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.
typename PointCloud::Ptr PointCloudPtr
pcl::people::PersonClassifier< pcl::RGB > person_classifier_
SVM-based person classifier.
void setMinimumDistanceBetweenHeads(float heads_minimum_distance)
Set minimum distance between persons' heads.
float min_fov_
the beginning of the field of view in z-direction, should be usually set to zero
void setClassifier(pcl::people::PersonClassifier< pcl::RGB > person_classifier)
Set 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...
bool transformation_set_
flag stating whether the transformation matrix has been set or not
typename PointCloud::ConstPtr PointCloudConstPtr
PointCloudPtr cloud_
pointer to the input cloud
bool intrinsics_matrix_set_
flag stating whether the intrinsics matrix has been set or not
void setInputCloud(PointCloudPtr &cloud)
Set the pointer to the input cloud.
PointCloudPtr getFilteredCloud()
Get the filtered point cloud.
float max_fov_
the end of the field of view in z-direction
void setVoxelSize(float voxel_size)
Set voxel size.
PointCloudPtr no_ground_cloud_
pointer to the cloud after voxel grid filtering and ground removal
float max_width_
person clusters maximum width, used to estimate how many points maximally represent 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 setGround(Eigen::VectorXf &ground_coeffs)
Set the ground coefficients.
void updateMinMaxPoints()
Estimates min_points_ and max_points_ based on the minimal and maximal cluster size and the voxel siz...
void applyTransformationPointCloud()
Applies the transformation to the input point cloud.
void setIntrinsics(Eigen::Matrix3f intrinsics_matrix)
Set intrinsic parameters of the RGB camera.
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 sqrt_ground_coeffs_
ground plane normalization factor
float voxel_size_
voxel size
Eigen::VectorXf getGround()
Get floor coefficients.
Eigen::VectorXf ground_coeffs_transformed_
the transformed ground coefficients
Eigen::VectorXf ground_coeffs_
ground plane coefficients
void setFOV(float min, float max)
Set the field of view of the point cloud in z direction.
int max_points_
maximum number of points for a person cluster
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.
Eigen::Matrix3f intrinsics_matrix_transformed_
the transformed intrinsics matrix
Eigen::Matrix3f intrinsics_matrix_
intrinsic parameters matrix of the RGB camera
void setTransformation(const Eigen::Matrix3f &transformation)
Set the transformation matrix, which is used in order to transform the given point cloud,...
bool person_classifier_set_flag_
flag stating if the classifier has been set or not
float getMinimumDistanceBetweenHeads()
Get minimum distance between persons' heads.
float min_height_
person clusters minimum height from the ground plane
Eigen::Matrix3f transformation_
rotation matrix which transforms input point cloud to internal people tracker coordinate frame
void applyTransformationGround()
Applies the transformation to the ground plane.
virtual ~GroundBasedPeopleDetectionApp()
Destructor.
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.
pcl::PointCloud< pcl::RGB >::Ptr rgb_image_
pointer to a RGB cloud corresponding to cloud_
float max_height_
person clusters maximum height from the ground plane
bool ground_coeffs_set_
flag stating whether the ground coefficients have been set or not
void setSensorPortraitOrientation(bool vertical)
Set sensor orientation (vertical = true means portrait mode, vertical = false means landscape mode).
bool head_centroid_
if true, the person centroid is computed as the centroid of the cluster points belonging to the head;...
int min_points_
minimum number of points for a person cluster
int sampling_factor_
sampling factor used to downsample the point cloud
bool vertical_
if true, the sensor is considered to be vertically placed (portrait mode)
PersonCluster represents a class for representing information about a cluster containing a person.
Defines all the PCL implemented PointT point type structures.