Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
pcl::people::PersonCluster< PointT > Class Template Reference

PersonCluster represents a class for representing information about a cluster containing a person. More...

#include <pcl/people/person_cluster.h>

+ Collaboration diagram for pcl::people::PersonCluster< PointT >:

Public Types

using PointCloud = pcl::PointCloud< PointT >
 
using PointCloudPtr = typename PointCloud::Ptr
 
using PointCloudConstPtr = typename PointCloud::ConstPtr
 

Public Member Functions

 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. More...
 
virtual ~PersonCluster ()
 Destructor. More...
 
float getHeight () const
 Returns the height of the cluster. More...
 
float updateHeight (const Eigen::VectorXf &ground_coeffs)
 Update the height of the cluster. More...
 
float updateHeight (const Eigen::VectorXf &ground_coeffs, float sqrt_ground_coeffs)
 Update the height of the cluster. More...
 
float getDistance () const
 Returns the distance of the cluster from the sensor. More...
 
float getAngle () const
 Returns the angle formed by the cluster's centroid with respect to the sensor (in radians). More...
 
float getAngleMin () const
 Returns the minimum angle formed by the cluster with respect to the sensor (in radians). More...
 
float getAngleMax () const
 Returns the maximum angle formed by the cluster with respect to the sensor (in radians). More...
 
pcl::PointIndicesgetIndices ()
 Returns the indices of the point cloud points corresponding to the cluster. More...
 
Eigen::Vector3f & getTTop ()
 Returns the theoretical top point. More...
 
Eigen::Vector3f & getTBottom ()
 Returns the theoretical bottom point. More...
 
Eigen::Vector3f & getTCenter ()
 Returns the theoretical centroid (at half height). More...
 
Eigen::Vector3f & getTop ()
 Returns the top point. More...
 
Eigen::Vector3f & getBottom ()
 Returns the bottom point. More...
 
Eigen::Vector3f & getCenter ()
 Returns the centroid. More...
 
Eigen::Vector3f & getMin ()
 Returns the point formed by min x, min y and min z. More...
 
Eigen::Vector3f & getMax ()
 Returns the point formed by max x, max y and max z. More...
 
float getPersonConfidence () const
 Returns the HOG confidence. More...
 
int getNumberPoints () const
 Returns the number of points of the cluster. More...
 
void setHeight (float height)
 Sets the cluster height. More...
 
void setPersonConfidence (float confidence)
 Sets the HOG confidence. More...
 
void drawTBoundingBox (pcl::visualization::PCLVisualizer &viewer, int person_number)
 Draws the theoretical 3D bounding box of the cluster in the PCL visualizer. More...
 

Protected Member Functions

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. More...
 

Protected Attributes

bool head_centroid_
 
float min_x_
 Minimum x coordinate of the cluster points. More...
 
float min_y_
 Minimum y coordinate of the cluster points. More...
 
float min_z_
 Minimum z coordinate of the cluster points. More...
 
float max_x_
 Maximum x coordinate of the cluster points. More...
 
float max_y_
 Maximum y coordinate of the cluster points. More...
 
float max_z_
 Maximum z coordinate of the cluster points. More...
 
float sum_x_
 Sum of x coordinates of the cluster points. More...
 
float sum_y_
 Sum of y coordinates of the cluster points. More...
 
float sum_z_
 Sum of z coordinates of the cluster points. More...
 
int n_
 Number of cluster points. More...
 
float c_x_
 x coordinate of the cluster centroid. More...
 
float c_y_
 y coordinate of the cluster centroid. More...
 
float c_z_
 z coordinate of the cluster centroid. More...
 
float height_
 Cluster height from the ground plane. More...
 
float distance_
 Cluster distance from the sensor. More...
 
float angle_
 Cluster centroid horizontal angle with respect to z axis. More...
 
float angle_max_
 Maximum angle of the cluster points. More...
 
float angle_min_
 Minimum angle of the cluster points. More...
 
Eigen::Vector3f top_
 Cluster top point. More...
 
Eigen::Vector3f bottom_
 Cluster bottom point. More...
 
Eigen::Vector3f center_
 Cluster centroid. More...
 
Eigen::Vector3f ttop_
 Theoretical cluster top. More...
 
Eigen::Vector3f tbottom_
 Theoretical cluster bottom (lying on the ground plane). More...
 
Eigen::Vector3f tcenter_
 Theoretical cluster center (between ttop_ and tbottom_). More...
 
Eigen::Vector3f min_
 Vector containing the minimum coordinates of the cluster. More...
 
Eigen::Vector3f max_
 Vector containing the maximum coordinates of the cluster. More...
 
pcl::PointIndices points_indices_
 Point cloud indices of the cluster points. More...
 
bool vertical_
 If true, the sensor is considered to be vertically placed (portrait mode). More...
 
float person_confidence_
 PersonCluster HOG confidence. More...
 

Friends

bool operator< (const PersonCluster< PointT > &c1, const PersonCluster< PointT > &c2)
 For sorting purpose: sort by distance. More...
 

Detailed Description

template<typename PointT>
class pcl::people::PersonCluster< PointT >

PersonCluster represents a class for representing information about a cluster containing a person.

Author
Filippo Basso, Matteo Munaro

Definition at line 58 of file person_cluster.h.

Member Typedef Documentation

◆ PointCloud

template<typename PointT >
using pcl::people::PersonCluster< PointT >::PointCloud = pcl::PointCloud<PointT>

Definition at line 137 of file person_cluster.h.

◆ PointCloudConstPtr

template<typename PointT >
using pcl::people::PersonCluster< PointT >::PointCloudConstPtr = typename PointCloud::ConstPtr

Definition at line 139 of file person_cluster.h.

◆ PointCloudPtr

template<typename PointT >
using pcl::people::PersonCluster< PointT >::PointCloudPtr = typename PointCloud::Ptr

Definition at line 138 of file person_cluster.h.

Constructor & Destructor Documentation

◆ PersonCluster()

template<typename PointT >
pcl::people::PersonCluster< PointT >::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.

Definition at line 47 of file person_cluster.hpp.

◆ ~PersonCluster()

template<typename PointT >
pcl::people::PersonCluster< PointT >::~PersonCluster ( )
virtualdefault

Destructor.

Member Function Documentation

◆ drawTBoundingBox()

template<typename PointT >
void pcl::people::PersonCluster< PointT >::drawTBoundingBox ( pcl::visualization::PCLVisualizer viewer,
int  person_number 
)

Draws the theoretical 3D bounding box of the cluster in the PCL visualizer.

Parameters
[in]viewerPCL visualizer.
[in]person_numberprogressive number representing the person.

Definition at line 385 of file person_cluster.hpp.

References pcl::visualization::PCLVisualizer::addCube(), pcl::visualization::PCL_VISUALIZER_COLOR, pcl::visualization::PCL_VISUALIZER_LINE_WIDTH, pcl::visualization::PCLVisualizer::removeShape(), pcl::visualization::PCLVisualizer::setShapeRenderingProperties(), and pcl::ModelCoefficients::values.

◆ getAngle()

template<typename PointT >
float pcl::people::PersonCluster< PointT >::getAngle

Returns the angle formed by the cluster's centroid with respect to the sensor (in radians).

Returns
the angle formed by the cluster's centroid with respect to the sensor (in radians).

Definition at line 343 of file person_cluster.hpp.

◆ getAngleMax()

template<typename PointT >
float pcl::people::PersonCluster< PointT >::getAngleMax

Returns the maximum angle formed by the cluster with respect to the sensor (in radians).

Returns
the maximum angle formed by the cluster with respect to the sensor (in radians).

Definition at line 349 of file person_cluster.hpp.

◆ getAngleMin()

template<typename PointT >
float pcl::people::PersonCluster< PointT >::getAngleMin

Returns the minimum angle formed by the cluster with respect to the sensor (in radians).

Returns
the minimum angle formed by the cluster with respect to the sensor (in radians).

Definition at line 355 of file person_cluster.hpp.

◆ getBottom()

template<typename PointT >
Eigen::Vector3f & pcl::people::PersonCluster< PointT >::getBottom

Returns the bottom point.

Returns
the bottom point.

Definition at line 319 of file person_cluster.hpp.

◆ getCenter()

template<typename PointT >
Eigen::Vector3f & pcl::people::PersonCluster< PointT >::getCenter

Returns the centroid.

Returns
the centroid.

Definition at line 325 of file person_cluster.hpp.

◆ getDistance()

template<typename PointT >
float pcl::people::PersonCluster< PointT >::getDistance

Returns the distance of the cluster from the sensor.

Returns
the distance of the cluster (its centroid) from the sensor without considering the y dimension.

Definition at line 289 of file person_cluster.hpp.

◆ getHeight()

template<typename PointT >
float pcl::people::PersonCluster< PointT >::getHeight

Returns the height of the cluster.

Returns
the height of the cluster.

Definition at line 261 of file person_cluster.hpp.

◆ getIndices()

template<typename PointT >
pcl::PointIndices & pcl::people::PersonCluster< PointT >::getIndices

Returns the indices of the point cloud points corresponding to the cluster.

Returns
the indices of the point cloud points corresponding to the cluster.

Definition at line 255 of file person_cluster.hpp.

Referenced by pcl::people::HeightMap2D< PointT >::compute(), and pcl::people::HeadBasedSubclustering< PointT >::createSubClusters().

◆ getMax()

template<typename PointT >
Eigen::Vector3f & pcl::people::PersonCluster< PointT >::getMax

Returns the point formed by max x, max y and max z.

Returns
the point formed by max x, max y and max z.

Definition at line 337 of file person_cluster.hpp.

Referenced by pcl::people::HeightMap2D< PointT >::compute().

◆ getMin()

template<typename PointT >
Eigen::Vector3f & pcl::people::PersonCluster< PointT >::getMin

Returns the point formed by min x, min y and min z.

Returns
the point formed by min x, min y and min z.

Definition at line 331 of file person_cluster.hpp.

Referenced by pcl::people::HeightMap2D< PointT >::compute().

◆ getNumberPoints()

template<typename PointT >
int pcl::people::PersonCluster< PointT >::getNumberPoints

Returns the number of points of the cluster.

Returns
the number of points of the cluster.

Definition at line 361 of file person_cluster.hpp.

◆ getPersonConfidence()

template<typename PointT >
float pcl::people::PersonCluster< PointT >::getPersonConfidence

Returns the HOG confidence.

Returns
the HOG confidence.

Definition at line 367 of file person_cluster.hpp.

◆ getTBottom()

template<typename PointT >
Eigen::Vector3f & pcl::people::PersonCluster< PointT >::getTBottom

Returns the theoretical bottom point.

Returns
the theoretical bottom point.

Definition at line 301 of file person_cluster.hpp.

◆ getTCenter()

template<typename PointT >
Eigen::Vector3f & pcl::people::PersonCluster< PointT >::getTCenter

Returns the theoretical centroid (at half height).

Returns
the theoretical centroid (at half height).

Definition at line 307 of file person_cluster.hpp.

◆ getTop()

template<typename PointT >
Eigen::Vector3f & pcl::people::PersonCluster< PointT >::getTop

Returns the top point.

Returns
the top point.

Definition at line 313 of file person_cluster.hpp.

◆ getTTop()

template<typename PointT >
Eigen::Vector3f & pcl::people::PersonCluster< PointT >::getTTop

Returns the theoretical top point.

Returns
the theoretical top point.

Definition at line 295 of file person_cluster.hpp.

◆ init()

template<typename PointT >
void pcl::people::PersonCluster< PointT >::init ( const PointCloudPtr input_cloud,
const pcl::PointIndices indices,
const Eigen::VectorXf &  ground_coeffs,
float  sqrt_ground_coeffs,
bool  head_centroid,
bool  vertical 
)
protected

PersonCluster initialization.

Definition at line 59 of file person_cluster.hpp.

References pcl::PointIndices::indices.

◆ setHeight()

template<typename PointT >
void pcl::people::PersonCluster< PointT >::setHeight ( float  height)

Sets the cluster height.

Parameters
[in]height

Definition at line 379 of file person_cluster.hpp.

◆ setPersonConfidence()

template<typename PointT >
void pcl::people::PersonCluster< PointT >::setPersonConfidence ( float  confidence)

Sets the HOG confidence.

Parameters
[in]confidence

Definition at line 373 of file person_cluster.hpp.

◆ updateHeight() [1/2]

template<typename PointT >
float pcl::people::PersonCluster< PointT >::updateHeight ( const Eigen::VectorXf &  ground_coeffs)

Update the height of the cluster.

Parameters
[in]ground_coeffsThe coefficients of the ground plane.
Returns
the height of the cluster.

Definition at line 267 of file person_cluster.hpp.

◆ updateHeight() [2/2]

template<typename PointT >
float pcl::people::PersonCluster< PointT >::updateHeight ( const Eigen::VectorXf &  ground_coeffs,
float  sqrt_ground_coeffs 
)

Update the height of the cluster.

Parameters
[in]ground_coeffsThe coefficients of the ground plane.
[in]sqrt_ground_coeffsThe norm of the vector [a, b, c] where a, b and c are the first three coefficients of the ground plane (ax + by + cz + d = 0).
Returns
the height of the cluster.

Definition at line 274 of file person_cluster.hpp.

Friends And Related Function Documentation

◆ operator<

template<typename PointT >
bool operator< ( const PersonCluster< PointT > &  c1,
const PersonCluster< PointT > &  c2 
)
friend

For sorting purpose: sort by distance.

Member Data Documentation

◆ angle_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::angle_
protected

Cluster centroid horizontal angle with respect to z axis.

Definition at line 101 of file person_cluster.h.

◆ angle_max_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::angle_max_
protected

Maximum angle of the cluster points.

Definition at line 104 of file person_cluster.h.

◆ angle_min_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::angle_min_
protected

Minimum angle of the cluster points.

Definition at line 106 of file person_cluster.h.

◆ bottom_

template<typename PointT >
Eigen::Vector3f pcl::people::PersonCluster< PointT >::bottom_
protected

Cluster bottom point.

Definition at line 111 of file person_cluster.h.

◆ c_x_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::c_x_
protected

x coordinate of the cluster centroid.

Definition at line 89 of file person_cluster.h.

◆ c_y_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::c_y_
protected

y coordinate of the cluster centroid.

Definition at line 91 of file person_cluster.h.

◆ c_z_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::c_z_
protected

z coordinate of the cluster centroid.

Definition at line 93 of file person_cluster.h.

◆ center_

template<typename PointT >
Eigen::Vector3f pcl::people::PersonCluster< PointT >::center_
protected

Cluster centroid.

Definition at line 113 of file person_cluster.h.

◆ distance_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::distance_
protected

Cluster distance from the sensor.

Definition at line 99 of file person_cluster.h.

◆ head_centroid_

template<typename PointT >
bool pcl::people::PersonCluster< PointT >::head_centroid_
protected

Definition at line 62 of file person_cluster.h.

◆ height_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::height_
protected

Cluster height from the ground plane.

Definition at line 96 of file person_cluster.h.

◆ max_

template<typename PointT >
Eigen::Vector3f pcl::people::PersonCluster< PointT >::max_
protected

Vector containing the maximum coordinates of the cluster.

Definition at line 125 of file person_cluster.h.

◆ max_x_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::max_x_
protected

Maximum x coordinate of the cluster points.

Definition at line 72 of file person_cluster.h.

◆ max_y_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::max_y_
protected

Maximum y coordinate of the cluster points.

Definition at line 74 of file person_cluster.h.

◆ max_z_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::max_z_
protected

Maximum z coordinate of the cluster points.

Definition at line 76 of file person_cluster.h.

◆ min_

template<typename PointT >
Eigen::Vector3f pcl::people::PersonCluster< PointT >::min_
protected

Vector containing the minimum coordinates of the cluster.

Definition at line 123 of file person_cluster.h.

◆ min_x_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::min_x_
protected

Minimum x coordinate of the cluster points.

Definition at line 65 of file person_cluster.h.

◆ min_y_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::min_y_
protected

Minimum y coordinate of the cluster points.

Definition at line 67 of file person_cluster.h.

◆ min_z_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::min_z_
protected

Minimum z coordinate of the cluster points.

Definition at line 69 of file person_cluster.h.

◆ n_

template<typename PointT >
int pcl::people::PersonCluster< PointT >::n_
protected

Number of cluster points.

Definition at line 86 of file person_cluster.h.

◆ person_confidence_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::person_confidence_
protected

PersonCluster HOG confidence.

Definition at line 133 of file person_cluster.h.

◆ points_indices_

template<typename PointT >
pcl::PointIndices pcl::people::PersonCluster< PointT >::points_indices_
protected

Point cloud indices of the cluster points.

Definition at line 128 of file person_cluster.h.

◆ sum_x_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::sum_x_
protected

Sum of x coordinates of the cluster points.

Definition at line 79 of file person_cluster.h.

◆ sum_y_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::sum_y_
protected

Sum of y coordinates of the cluster points.

Definition at line 81 of file person_cluster.h.

◆ sum_z_

template<typename PointT >
float pcl::people::PersonCluster< PointT >::sum_z_
protected

Sum of z coordinates of the cluster points.

Definition at line 83 of file person_cluster.h.

◆ tbottom_

template<typename PointT >
Eigen::Vector3f pcl::people::PersonCluster< PointT >::tbottom_
protected

Theoretical cluster bottom (lying on the ground plane).

Definition at line 118 of file person_cluster.h.

◆ tcenter_

template<typename PointT >
Eigen::Vector3f pcl::people::PersonCluster< PointT >::tcenter_
protected

Theoretical cluster center (between ttop_ and tbottom_).

Definition at line 120 of file person_cluster.h.

◆ top_

template<typename PointT >
Eigen::Vector3f pcl::people::PersonCluster< PointT >::top_
protected

Cluster top point.

Definition at line 109 of file person_cluster.h.

◆ ttop_

template<typename PointT >
Eigen::Vector3f pcl::people::PersonCluster< PointT >::ttop_
protected

Theoretical cluster top.

Definition at line 116 of file person_cluster.h.

◆ vertical_

template<typename PointT >
bool pcl::people::PersonCluster< PointT >::vertical_
protected

If true, the sensor is considered to be vertically placed (portrait mode).

Definition at line 131 of file person_cluster.h.


The documentation for this class was generated from the following files: