41 #ifndef PCL_PEOPLE_PERSON_CLUSTER_H_
42 #define PCL_PEOPLE_PERSON_CLUSTER_H_
44 #include <pcl/point_types.h>
45 #include <pcl/visualization/pcl_visualizer.h>
56 template <
typename Po
intT>
bool operator<(const PersonCluster<PointT>& c1,
const PersonCluster<PointT>& c2);
58 template <
typename Po
intT>
144 const PointCloudPtr& input_cloud,
146 const Eigen::VectorXf& ground_coeffs,
147 float sqrt_ground_coeffs,
149 bool vertical =
false);
177 updateHeight (
const Eigen::VectorXf& ground_coeffs,
float sqrt_ground_coeffs);
320 const PointCloudPtr& input_cloud,
322 const Eigen::VectorXf& ground_coeffs,
323 float sqrt_ground_coeffs,
330 #include <pcl/people/impl/person_cluster.hpp>
Eigen::Vector3f tcenter_
Theoretical cluster center (between ttop_ and tbottom_).
Eigen::Vector3f bottom_
Cluster bottom point.
float max_y_
Maximum y coordinate of the cluster points.
float person_confidence_
PersonCluster HOG confidence.
Eigen::Vector3f & getMax()
Returns the point formed by max x, max y and max z.
float angle_
Cluster centroid horizontal angle with respect to z axis.
int n_
Number of cluster points.
int getNumberPoints()
Returns the number of points of the cluster.
float c_x_
x coordinate of the cluster centroid.
boost::shared_ptr< const PointCloud > PointCloudConstPtr
PersonCluster(const PointCloudPtr &input_cloud, const pcl::PointIndices &indices, const Eigen::VectorXf &ground_coeffs, float sqrt_ground_coeffs, bool head_centroid, bool vertical=false)
Constructor.
float max_x_
Maximum x coordinate of the cluster points.
float getHeight()
Returns the height of the cluster.
float sum_z_
Sum of z coordinates of the cluster points.
pcl::PointCloud< PointT > PointCloud
float angle_max_
Maximum angle of the cluster points.
float min_z_
Minimum z coordinate of the cluster points.
Eigen::Vector3f & getCenter()
Returns the centroid.
Eigen::Vector3f & getTCenter()
Returns the theoretical centroid (at half height).
float sum_x_
Sum of x coordinates of the cluster points.
float min_y_
Minimum y coordinate of the cluster points.
float getAngle()
Returns the angle formed by the cluster's centroid with respect to the sensor (in radians)...
Eigen::Vector3f center_
Cluster centroid.
float c_y_
y coordinate of the cluster centroid.
void init(const PointCloudPtr &input_cloud, const pcl::PointIndices &indices, const Eigen::VectorXf &ground_coeffs, float sqrt_ground_coeffs, bool head_centroid, bool vertical)
PersonCluster initialization.
float getAngleMin()
Returns the minimum angle formed by the cluster with respect to the sensor (in radians).
Eigen::Vector3f & getTTop()
Returns the theoretical top point.
Eigen::Vector3f & getBottom()
Returns the bottom point.
Eigen::Vector3f ttop_
Theoretical cluster top.
PersonCluster represents a class for representing information about a cluster containing a person...
PCL Visualizer main class.
float height_
Cluster height from the ground plane.
bool vertical_
If true, the sensor is considered to be vertically placed (portrait mode).
float min_x_
Minimum x coordinate of the cluster points.
float angle_min_
Minimum angle of the cluster points.
float sum_y_
Sum of y coordinates of the cluster points.
Eigen::Vector3f & getTop()
Returns the top point.
boost::shared_ptr< PointCloud > PointCloudPtr
Eigen::Vector3f top_
Cluster top point.
virtual ~PersonCluster()
Destructor.
float getAngleMax()
Returns the maximum angle formed by the cluster with respect to the sensor (in radians).
PointCloud represents the base class in PCL for storing collections of 3D points. ...
float c_z_
z coordinate of the cluster centroid.
float distance_
Cluster distance from the sensor.
pcl::PointIndices points_indices_
Point cloud indices of the cluster points.
float getPersonConfidence()
Returns the HOG confidence.
void setPersonConfidence(float confidence)
Sets the HOG confidence.
void drawTBoundingBox(pcl::visualization::PCLVisualizer &viewer, int person_number)
Draws the theoretical 3D bounding box of the cluster in the PCL visualizer.
float getDistance()
Returns the distance of the cluster from the sensor.
Eigen::Vector3f min_
Vector containing the minimum coordinates of the cluster.
Eigen::Vector3f & getMin()
Returns the point formed by min x, min y and min z.
float max_z_
Maximum z coordinate of the cluster points.
Eigen::Vector3f max_
Vector containing the maximum coordinates of the cluster.
float updateHeight(const Eigen::VectorXf &ground_coeffs)
Update the height of the cluster.
void setHeight(float height)
Sets the cluster height.
Eigen::Vector3f tbottom_
Theoretical cluster bottom (lying on the ground plane).
pcl::PointIndices & getIndices()
Returns the indices of the point cloud points corresponding to the cluster.
Eigen::Vector3f & getTBottom()
Returns the theoretical bottom point.