Point Cloud Library (PCL)  1.9.1-dev
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
pcl::gpu::people Namespace Reference

Namespaces

 label_skeleton
 
 trees
 

Classes

struct  Blob2
 This structure contains all parameters to describe blobs and their parent/child relations. More...
 
class  FaceDetector
 
class  OrganizedPlaneDetector
 
class  PeopleDetector
 
class  PersonAttribs
 
class  ProbabilityProcessor
 
class  RDFBodyPartsDetector
 
struct  Tree2
 This structure contains all parameters to describe the segmented tree. More...
 

Typedefs

typedef DeviceArray2D< float4 > Cloud
 
typedef DeviceArray2D< uchar4 > Image
 
typedef DeviceArray2D< unsigned short > Depth
 
typedef DeviceArray2D< unsigned char > Labels
 
typedef DeviceArray2D< float > HueImage
 
typedef DeviceArray2D< unsigned char > Mask
 

Enumerations

enum  { NO_CHILD = -3, LEAF = -2, ROOT = -1, NO_DATA = 255 }
 
enum  { NUM_PARTS = 25 }
 
enum  { MAX_CHILD = 4 }
 We have 25 body parts defined. More...
 
enum  { NR_TREES = 4 }
 a parent node has maximum 4 children More...
 
enum  { FOCAL = 525 }
 The maximum supported number of trees. More...
 
enum  { WIDTH = 640 }
 Focal length of rgb camera in pixels. More...
 
enum  { HEIGHT = 480 }
 
enum  { RATIO = WIDTH/HEIGHT }
 
enum  { XML_VERSION = 1 }
 
enum  { NUM_ATTRIBS = 2000 }
 This indicates the current used xml file version (for people lib only) More...
 
enum  { NUM_LABELS = 32 }
 
enum  part_t {
  Lfoot = 0, Lleg = 1, Lknee = 2, Lthigh = 3,
  Rfoot = 4, Rleg = 5, Rknee = 6, Rthigh = 7,
  Rhips = 8, Lhips = 9, Neck = 10, Rarm = 11,
  Relbow = 12, Rforearm = 13, Rhand = 14, Larm = 15,
  Lelbow = 16, Lforearm = 17, Lhand = 18, FaceLB = 19,
  FaceRB = 20, FaceLT = 21, FaceRT = 22, Rchest = 23,
  Lchest = 24, Lshoulder = 25, Rshoulder = 26, Groundplane = 27,
  Ceiling = 28, Background = 29, Plane = 30, NOLABEL = 31
}
 Our code is forseen to use maximal use 32 labels. More...
 

Functions

pcl::RGB getLColor (unsigned char l)
 gives a label and returns the color out of the colormap More...
 
pcl::RGB getLColor (pcl::Label l)
 gives a label and returns the color out of the colormap More...
 
void colorLMap (int W, int H, const trees::Label *l, unsigned char *c)
 
void colorLMap (const PointCloud< pcl::Label > &cloud_in, PointCloud< pcl::RGB > &colormap_out)
 
PCL_EXPORTS void uploadColorMap (DeviceArray< pcl::RGB > &color_map)
 
PCL_EXPORTS void colorizeLabels (const DeviceArray< pcl::RGB > &color_map, const DeviceArray2D< unsigned char > &labels, DeviceArray2D< pcl::RGB > &color_labels)
 
PCL_EXPORTS void colorizeMixedLabels (const DeviceArray< RGB > &color_map, const DeviceArray2D< unsigned char > &labels, const DeviceArray2D< RGB > &image, DeviceArray2D< RGB > &color_labels)
 
void colorFG (int W, int H, const unsigned char *labels, unsigned char *c)
 
std::ostream & operator<< (std::ostream &os, const Blob2 &b)
 
std::ostream & operator<< (std::ostream &os, const Tree2 &t)
 
int leafBlobVector (std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, int label)
 This function sets the children of the leaf nodes to leaf, meaning that we came to the correct end. More...
 
int noChildBlobVector (std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, int label, int child_number)
 This function sets the specific child of the vector to no child, meaning that there are no such children. More...
 
bool hasThisLabelChildren (std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, part_t label, int child_number)
 This function test if children were found for this label. More...
 
float evaluateBlobs (Blob2 &parent, Blob2 &child, int child_nr)
 This is the evaluation function used to compare two blobs. More...
 
float evaluateBlobs (Blob2 &parent, Blob2 &child, int child_nr, PersonAttribs::Ptr person_attribs)
 This is the evaluation function used to compare two blobs. More...
 
int evaluateBlobVector (std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, unsigned int parent_label, int child_label, int child_number)
 This function evaluates an entire row of parent segments for the best child segments. More...
 
int evaluateBlobVector (std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, unsigned int parent_label, int child_label, int child_number, PersonAttribs::Ptr person_attribs)
 This function evaluates an entire row of parent segments for the best child segments. More...
 
int buildRelations (std::vector< std::vector< Blob2, Eigen::aligned_allocator< pcl::gpu::people::Blob2 > > > &sorted)
 This function goes over the sorted matrix and fills in the optimal parent and child relations. More...
 
int buildRelations (std::vector< std::vector< Blob2, Eigen::aligned_allocator< pcl::gpu::people::Blob2 > > > &sorted, PersonAttribs::Ptr person_attribs)
 This function goes over the sorted matrix and fills in the optimal parent and child relations. More...
 
int browseTree (const std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, Tree2 &tree, int part_label, int part_lid)
 
int browseTree (const std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, Tree2 &tree, int part_label, int part_lid, PersonAttribs::Ptr person_attribs)
 
int buildTree (const std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, const pcl::PointCloud< pcl::PointXYZ > &cloud_in, part_t part_label, int part_lid, Tree2 &tree)
 
int buildTree (const std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &sorted, const pcl::PointCloud< pcl::PointXYZ > &cloud_in, part_t part_label, int part_lid, Tree2 &tree, PersonAttribs::Ptr person_attribs)
 

Variables

const unsigned char LUT_COLOR_LABEL []
 
const int LUT_COLOR_LABEL_LENGTH
 
static const float LUT_max_part_size []
 This LUT contains the max primary eigenvalue for each part. More...
 
static const float LUT_ideal_length [][4]
 This LUT contains the ideal length between this part and his children. More...
 
static const float LUT_max_length_offset [][4]
 This LUT contains the max length between this part and his children. More...
 
static const unsigned int LUT_nr_children []
 This LUT contains the number of children for each parent. More...
 

Typedef Documentation

Definition at line 111 of file label_common.h.

typedef DeviceArray2D<unsigned short> pcl::gpu::people::Depth

Definition at line 114 of file label_common.h.

Definition at line 116 of file label_common.h.

Definition at line 112 of file label_common.h.

typedef DeviceArray2D<unsigned char> pcl::gpu::people::Labels

Definition at line 115 of file label_common.h.

typedef DeviceArray2D<unsigned char> pcl::gpu::people::Mask

Definition at line 117 of file label_common.h.

Enumeration Type Documentation

anonymous enum
Enumerator
NUM_LABELS 

Definition at line 72 of file label_common.h.

anonymous enum
Enumerator
NO_CHILD 
LEAF 
ROOT 
NO_DATA 

Definition at line 52 of file label_common.h.

anonymous enum
Enumerator
NUM_PARTS 

Definition at line 60 of file label_common.h.

anonymous enum

We have 25 body parts defined.

Enumerator
MAX_CHILD 

Definition at line 61 of file label_common.h.

anonymous enum

a parent node has maximum 4 children

Enumerator
NR_TREES 

Definition at line 62 of file label_common.h.

anonymous enum

The maximum supported number of trees.

Enumerator
FOCAL 

Definition at line 65 of file label_common.h.

anonymous enum

Focal length of rgb camera in pixels.

Enumerator
WIDTH 

Definition at line 66 of file label_common.h.

anonymous enum
Enumerator
HEIGHT 

Definition at line 67 of file label_common.h.

anonymous enum
Enumerator
RATIO 

Definition at line 68 of file label_common.h.

anonymous enum
Enumerator
XML_VERSION 

Definition at line 69 of file label_common.h.

anonymous enum

This indicates the current used xml file version (for people lib only)

Enumerator
NUM_ATTRIBS 

Definition at line 71 of file label_common.h.

Our code is forseen to use maximal use 32 labels.

Enumerator
Lfoot 
Lleg 
Lknee 
Lthigh 
Rfoot 
Rleg 
Rknee 
Rthigh 
Rhips 
Lhips 
Neck 
Rarm 
Relbow 
Rforearm 
Rhand 
Larm 
Lelbow 
Lforearm 
Lhand 
FaceLB 
FaceRB 
FaceLT 
FaceRT 
Rchest 
Lchest 
Lshoulder 
Rshoulder 
Groundplane 
Ceiling 
Background 
Plane 
NOLABEL 

Definition at line 75 of file label_common.h.

Function Documentation

int pcl::gpu::people::browseTree ( const std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
Tree2 tree,
int  part_label,
int  part_lid 
)
inline
int pcl::gpu::people::browseTree ( const std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
Tree2 tree,
int  part_label,
int  part_lid,
PersonAttribs::Ptr  person_attribs 
)
inline
int pcl::gpu::people::buildRelations ( std::vector< std::vector< Blob2, Eigen::aligned_allocator< pcl::gpu::people::Blob2 > > > &  sorted)
inline

This function goes over the sorted matrix and fills in the optimal parent and child relations.

Parameters
[in]sorteda matrix with all found good blobs arranged according to label and order
Returns
zero if everything went well, negative on an error

Definition at line 344 of file label_tree.h.

References evaluateBlobVector(), FaceLB, FaceRB, hasThisLabelChildren(), Larm, Lchest, leafBlobVector(), Lelbow, Lforearm, Neck, Rarm, Rchest, Relbow, and Rforearm.

int pcl::gpu::people::buildRelations ( std::vector< std::vector< Blob2, Eigen::aligned_allocator< pcl::gpu::people::Blob2 > > > &  sorted,
PersonAttribs::Ptr  person_attribs 
)
inline

This function goes over the sorted matrix and fills in the optimal parent and child relations.

Parameters
[in]sorteda matrix with all found good blobs arranged according to label and order
person_attribs
Returns
zero if everything went well, negative on an error

Definition at line 447 of file label_tree.h.

References evaluateBlobVector(), FaceLB, FaceRB, hasThisLabelChildren(), Larm, Lchest, leafBlobVector(), Lelbow, Lforearm, Neck, Rarm, Rchest, Relbow, and Rforearm.

int pcl::gpu::people::buildTree ( const std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
const pcl::PointCloud< pcl::PointXYZ > &  cloud_in,
part_t  part_label,
int  part_lid,
Tree2 tree 
)
inline
int pcl::gpu::people::buildTree ( const std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
const pcl::PointCloud< pcl::PointXYZ > &  cloud_in,
part_t  part_label,
int  part_lid,
Tree2 tree,
PersonAttribs::Ptr  person_attribs 
)
inline
void pcl::gpu::people::colorFG ( int  W,
int  H,
const unsigned char *  labels,
unsigned char *  c 
)
inline

Definition at line 76 of file colormap.h.

PCL_EXPORTS void pcl::gpu::people::colorizeLabels ( const DeviceArray< pcl::RGB > &  color_map,
const DeviceArray2D< unsigned char > &  labels,
DeviceArray2D< pcl::RGB > &  color_labels 
)
PCL_EXPORTS void pcl::gpu::people::colorizeMixedLabels ( const DeviceArray< RGB > &  color_map,
const DeviceArray2D< unsigned char > &  labels,
const DeviceArray2D< RGB > &  image,
DeviceArray2D< RGB > &  color_labels 
)
void pcl::gpu::people::colorLMap ( int  W,
int  H,
const trees::Label l,
unsigned char *  c 
)
void pcl::gpu::people::colorLMap ( const PointCloud< pcl::Label > &  cloud_in,
PointCloud< pcl::RGB > &  colormap_out 
)
float pcl::gpu::people::evaluateBlobs ( Blob2 parent,
Blob2 child,
int  child_nr 
)
inline

This is the evaluation function used to compare two blobs.

Parameters
[in]parentpointer to the parent blob
[in]childpointer to the child blob
[in]child_nrthe number of the child
Returns
it returns the distance error from the ideal parent child distance, it returns -1.0 if it goes over threshold

Definition at line 181 of file label_tree.h.

References pcl::gpu::people::Blob2::label, LUT_ideal_length, LUT_max_length_offset, and pcl::gpu::people::Blob2::mean.

Referenced by evaluateBlobVector().

float pcl::gpu::people::evaluateBlobs ( Blob2 parent,
Blob2 child,
int  child_nr,
PersonAttribs::Ptr  person_attribs 
)
inline

This is the evaluation function used to compare two blobs.

Parameters
[in]parentpointer to the parent blob
[in]childpointer to the child blob
[in]child_nrthe number of the child
person_attribs
Returns
it returns the distance error from the ideal parent child distance, it returns -1.0 if it goes over threshold

Definition at line 203 of file label_tree.h.

References pcl::gpu::people::Blob2::label, and pcl::gpu::people::Blob2::mean.

int pcl::gpu::people::evaluateBlobVector ( std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
unsigned int  parent_label,
int  child_label,
int  child_number 
)
inline

This function evaluates an entire row of parent segments for the best child segments.

Parameters
[in]sortedthis is the array of all blobs
[in]parent_labelthis is the part label that indicates the row
[in]child_labelthis is the part label that indicates the childs needed to be investigated
[in]child_numberthe number of this child in the parent, some parents have multiple childs
Returns
zero if successful

Definition at line 228 of file label_tree.h.

References evaluateBlobs(), MAX_CHILD, NO_CHILD, noChildBlobVector(), and NUM_PARTS.

Referenced by buildRelations().

int pcl::gpu::people::evaluateBlobVector ( std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
unsigned int  parent_label,
int  child_label,
int  child_number,
PersonAttribs::Ptr  person_attribs 
)
inline

This function evaluates an entire row of parent segments for the best child segments.

Parameters
[in]sortedthis is the array of all blobs
[in]parent_labelthis is the part label that indicates the row
[in]child_labelthis is the part label that indicates the childs needed to be investigated
[in]child_numberthe number of this child in the parent, some parents have multiple childs
person_attribs
Returns
zero if successful

Definition at line 287 of file label_tree.h.

References evaluateBlobs(), MAX_CHILD, NO_CHILD, noChildBlobVector(), and NUM_PARTS.

pcl::RGB pcl::gpu::people::getLColor ( unsigned char  l)

gives a label and returns the color out of the colormap

pcl::RGB pcl::gpu::people::getLColor ( pcl::Label  l)

gives a label and returns the color out of the colormap

bool pcl::gpu::people::hasThisLabelChildren ( std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
part_t  label,
int  child_number 
)
inline

This function test if children were found for this label.

Returns
True if this label has valid children

Definition at line 160 of file label_tree.h.

References pcl::gpu::people::Tree2::label, LEAF, and NO_CHILD.

Referenced by buildRelations().

int pcl::gpu::people::leafBlobVector ( std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
int  label 
)
inline

This function sets the children of the leaf nodes to leaf, meaning that we came to the correct end.

Parameters
[in]sortedThe matrix of all blobs
[in]labelThe label of which all children are to be set as leafs
Returns
Zero if everything went well

Definition at line 122 of file label_tree.h.

References pcl::gpu::people::Tree2::label, LEAF, and MAX_CHILD.

Referenced by buildRelations().

int pcl::gpu::people::noChildBlobVector ( std::vector< std::vector< Blob2, Eigen::aligned_allocator< Blob2 > > > &  sorted,
int  label,
int  child_number 
)
inline

This function sets the specific child of the vector to no child, meaning that there are no such children.

Parameters
[in]sortedThe matrix of all blobs
[in]labelThe label of which the child must be set to NO_CHILD
[in]child_numberThe index of the respective child that must be set
Returns
Zero if everything went well

Definition at line 143 of file label_tree.h.

References pcl::gpu::people::Tree2::label, and NO_CHILD.

Referenced by evaluateBlobVector().

std::ostream& pcl::gpu::people::operator<< ( std::ostream &  os,
const Blob2 b 
)
inline
std::ostream& pcl::gpu::people::operator<< ( std::ostream &  os,
const Tree2 t 
)
inline
PCL_EXPORTS void pcl::gpu::people::uploadColorMap ( DeviceArray< pcl::RGB > &  color_map)

Variable Documentation

const unsigned char pcl::gpu::people::LUT_COLOR_LABEL[]
const int pcl::gpu::people::LUT_COLOR_LABEL_LENGTH
const float pcl::gpu::people::LUT_ideal_length[][4]
static
Initial value:
=
{
{ -1.0f, -1.0f, -1.0f, -1.0f},
{ 0.2f, -1.0f, -1.0f, -1.0f},
{ 0.2f, -1.0f, -1.0f, -1.0f},
{ 0.3f, -1.0f, -1.0f, -1.0f},
{ -1.0f, -1.0f, -1.0f, -1.0f},
{ 0.2f, -1.0f, -1.0f, -1.0f},
{ 0.2f, -1.0f, -1.0f, -1.0f},
{ 0.3f, -1.0f, -1.0f, -1.0f},
{ 0.3f, -1.0f, -1.0f, -1.0f},
{ 0.3f, -1.0f, -1.0f, -1.0f},
{ 0.15f, 0.15f, 0.2f, 0.2f},
{ 0.15f, -1.0f, -1.0f, -1.0f},
{ 0.1f, -1.0f, -1.0f, -1.0f},
{ 0.15f, -1.0f, -1.0f, -1.0f},
{ -1.0f, -1.0f, -1.0f, -1.0f},
{ 0.15f, -1.0f, -1.0f, -1.0f},
{ 0.1f, -1.0f, -1.0f, -1.0f},
{ 0.15f, -1.0f, -1.0f, -1.0f},
{ -1.0f, -1.0f, -1.0f, -1.0f},
{ 0.15f, -1.0f, -1.0f, -1.0f},
{ 0.15f, -1.0f, -1.0f, -1.0f},
{ -1.0f, -1.0f, -1.0f, -1.0f},
{ -1.0f, -1.0f, -1.0f, -1.0f},
{ 0.3f, 0.3f, -1.0f, -1.0f},
{ 0.3f, 0.3f, -1.0f, -1.0f}
}

This LUT contains the ideal length between this part and his children.

Definition at line 155 of file label_common.h.

Referenced by evaluateBlobs().

const float pcl::gpu::people::LUT_max_length_offset[][4]
static
Initial value:
=
{
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.3f, 0.15f, 0.15f, 0.15f},
{ 0.3f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f},
{ 0.15f, 0.15f, 0.15f, 0.15f}
}

This LUT contains the max length between this part and his children.

Definition at line 187 of file label_common.h.

Referenced by evaluateBlobs().

const float pcl::gpu::people::LUT_max_part_size[]
static
Initial value:
=
{
0.5f,
0.7f,
0.6f,
0.6f,
0.5f,
0.7f,
0.6f,
0.6f,
0.9f,
0.9f,
0.5f,
0.7f,
0.5f,
0.7f,
0.5f,
0.7f,
0.5f,
0.7f,
0.5f,
0.5f,
0.5f,
0.5f,
0.5f,
0.9f,
0.9f
}

This LUT contains the max primary eigenvalue for each part.

Definition at line 123 of file label_common.h.

const unsigned int pcl::gpu::people::LUT_nr_children[]
static
Initial value:
=
{
0,
1,
1,
1,
0,
1,
1,
1,
1,
1,
4,
1,
1,
1,
0,
1,
1,
1,
0,
1,
1,
0,
0,
2,
2
}

This LUT contains the number of children for each parent.

Definition at line 219 of file label_common.h.

Referenced by browseTree().