pcl::gpu::people::trees Namespace Reference

## Classes

struct | AttribLocation
class | Histogram
struct | HistogramPair
struct | LabeledAttrib
struct | LabeledFeature
struct | Node
struct | SplitPoint

## Typedefs

typedef int16_t | Attrib
typedef uint8_t | Label
typedef uint32_t | Label32
typedef uint16_t | Depth

## Enumerations

enum | { NUM_ATTRIBS = 2000 }
enum | { NUM_LABELS = 32 }

## Functions

std::ostream & | operator<< (std::ostream &os, const AttribLocation &aloc)
std::istream & | operator>> (std::istream &is, AttribLocation &aloc)
std::istream & | operator>> (std::istream &is, Node &n)
void | writeAttribLocs (const std::string &filename, const std::vector< AttribLocation > &alocs)
void | readAttribLocs (const std::string &filename, std::vector< AttribLocation > &alocs)
void | readThreshs (const std::string &filename, std::vector< Attrib > &threshs)
void | writeThreshs (const std::string &filename, const std::vector< Attrib > &threshs)
int | loadTree (std::istream &is, std::vector< Node > &tree, std::vector< Label > &leaves)

The stream points to ascii data that goes:

######

TreeHeight du1 dv1 du2 dv2 thresh du1 dv1 du2 dv2 thresh ............ More...

int | loadTree (const std::string &filename, std::vector< Node > &tree, std::vector< Label > &leaves)
void | runThroughTree (int maxDepth, const std::vector< Node > &tree, const std::vector< Label > &leaves, int W, int H, const uint16_t *dmap, Label *lmap)
static uint64_t | numElements (const Histogram &h)
static double | entropy (const Histogram &h)
| This is cool. More...
static double | entropy_merged (const HistogramPair &hp)
| This is a little weird. More...
static double | informationGain (const HistogramPair &hp)
| This will compute the gain in information resulting from the split. More...
static std::ostream & | operator<< (std::ostream &os, const Histogram &h)
static std::istream & | operator>> (std::istream &is, Histogram &h)
static std::ostream & | operator<< (std::ostream &os, const HistogramPair &hp)
static std::istream & | operator>> (std::istream &is, HistogramPair &hp)
static void | writeLabeledFeatureVec (std::ostream &os, const std::vector< LabeledFeature > &lfs)
std::ostream & | operator<< (std::ostream &os, const SplitPoint &sp)
std::istream & | operator>> (std::istream &is, SplitPoint &sp)
void | writeInfoFile (const std::string &filename, int attribId, Attrib threshold, double gain, const HistogramPair &HP)
void | readInfoFile (const std::string &filename, int &attribId, Attrib &threshold, double &gain, HistogramPair &HP)

## Variables

static const double | focal = 1000.

## Typedef Documentation

## Attrib

typedef int16_t pcl::gpu::people::trees::Attrib

Definition at line 73 of file tree.h.

## Depth

typedef uint16_t pcl::gpu::people::trees::Depth

Definition at line 76 of file tree.h.

## Label

typedef uint8_t pcl::gpu::people::trees::Label

Definition at line 74 of file tree.h.

## Label32

typedef uint32_t pcl::gpu::people::trees::Label32

Definition at line 75 of file tree.h.

## Enumeration Type Documentation

## anonymous enum

anonymous enum

Enumerator
NUM_ATTRIBS |

Definition at line 61 of file tree.h.

## anonymous enum

anonymous enum

Enumerator
NUM_LABELS |

Definition at line 62 of file tree.h.

## Function Documentation

## entropy()

static double pcl::gpu::people::trees::entropy | ( | const Histogram & | h | ) |

inline static

This is cool.

Definition at line 94 of file tree_train.h.

References numElements().

Referenced by entropy_merged(), and informationGain().

## entropy_merged()

static double pcl::gpu::people::trees::entropy_merged | ( | const HistogramPair & | hp | ) |

inline static

This is a little weird.

. it will just compute the entropy of the merged histograms

Definition at line 109 of file tree_train.h.

References entropy(), pcl::gpu::people::trees::HistogramPair::h_false(), pcl::gpu::people::trees::HistogramPair::h_true(), and numElements().

Referenced by informationGain().

## informationGain()

static double pcl::gpu::people::trees::informationGain | ( | const HistogramPair & | hp | ) |

inline static

This will compute the gain in information resulting from the split.

Definition at line 128 of file tree_train.h.

References entropy(), entropy_merged(), pcl::gpu::people::trees::HistogramPair::h_false(), pcl::gpu::people::trees::HistogramPair::h_true(), and numElements().

## loadTree() [1/2]

int pcl::gpu::people::trees::loadTree | ( | std::istream & | is,
|  | std::vector< Node > & | tree,
|  | std::vector< Label > & | leaves
| ) |  |

The stream points to ascii data that goes:

######

TreeHeight du1 dv1 du2 dv2 thresh du1 dv1 du2 dv2 thresh ............

label label

######

there are 2^threeheight -1 nodes ( [du1 dv1 du2 dv2 thresh] lines ) there are 2^threeheight leaves ( [label] lines )

Referenced by operator>>().

## loadTree() [2/2]

int pcl::gpu::people::trees::loadTree | ( | const std::string & | filename,
|  | std::vector< Node > & | tree,
|  | std::vector< Label > & | leaves
| ) |  |

## numElements()

static uint64_t pcl::gpu::people::trees::numElements | ( | const Histogram & | h | ) |

inline static

Definition at line 85 of file tree_train.h.

Referenced by entropy(), entropy_merged(), and informationGain().

## operator<<() [1/4]

std::ostream& pcl::gpu::people::trees::operator<< | ( | std::ostream & | os,
|  | const AttribLocation & | aloc
| ) |  |

inline

Definition at line 107 of file tree.h.

References pcl::gpu::people::trees::AttribLocation::du1, pcl::gpu::people::trees::AttribLocation::du2, pcl::gpu::people::trees::AttribLocation::dv1, and pcl::gpu::people::trees::AttribLocation::dv2.

## operator<<() [2/4]

static std::ostream& pcl::gpu::people::trees::operator<< | ( | std::ostream & | os,
|  | const Histogram & | h
| ) |  |

inline static

Definition at line 145 of file tree_train.h.

## operator<<() [3/4]

static std::ostream& pcl::gpu::people::trees::operator<< | ( | std::ostream & | os,
|  | const HistogramPair & | hp
| ) |  |

inline static

Definition at line 159 of file tree_train.h.

References pcl::gpu::people::trees::HistogramPair::h_false(), and pcl::gpu::people::trees::HistogramPair::h_true().

## operator<<() [4/4]

std::ostream& pcl::gpu::people::trees::operator<< | ( | std::ostream & | os,
|  | const SplitPoint & | sp
| ) |  |

inline

Definition at line 187 of file tree_train.h.

References pcl::gpu::people::trees::SplitPoint::attribId, and pcl::gpu::people::trees::SplitPoint::threshold.

## operator>>() [1/5]

std::istream& pcl::gpu::people::trees::operator>> | ( | std::istream & | is,
|  | AttribLocation & | aloc
| ) |  |

inline

Definition at line 108 of file tree.h.

References pcl::gpu::people::trees::AttribLocation::du1, pcl::gpu::people::trees::AttribLocation::du2, pcl::gpu::people::trees::AttribLocation::dv1, and pcl::gpu::people::trees::AttribLocation::dv2.

## operator>>() [2/5]

std::istream& pcl::gpu::people::trees::operator>> | ( | std::istream & | is,
|  | Node & | n
| ) |  |

inline

Definition at line 109 of file tree.h.

References loadTree(), pcl::gpu::people::trees::Node::loc, readAttribLocs(), readThreshs(), runThroughTree(), pcl::gpu::people::trees::Node::thresh, writeAttribLocs(), and writeThreshs().

## operator>>() [3/5]

static std::istream& pcl::gpu::people::trees::operator>> | ( | std::istream & | is,
|  | Histogram & | h
| ) |  |

inline static

Definition at line 151 of file tree_train.h.

## operator>>() [4/5]

static std::istream& pcl::gpu::people::trees::operator>> | ( | std::istream & | is,
|  | HistogramPair & | hp
| ) |  |

inline static

Definition at line 165 of file tree_train.h.

References pcl::gpu::people::trees::HistogramPair::h_false(), and pcl::gpu::people::trees::HistogramPair::h_true().

## operator>>() [5/5]

std::istream& pcl::gpu::people::trees::operator>> | ( | std::istream & | is,
|  | SplitPoint & | sp
| ) |  |

inline

Definition at line 192 of file tree_train.h.

References pcl::gpu::people::trees::SplitPoint::attribId, and pcl::gpu::people::trees::SplitPoint::threshold.

## readAttribLocs()

void pcl::gpu::people::trees::readAttribLocs | ( | const std::string & | filename,
|  | std::vector< AttribLocation > & | alocs
| ) |  |

Referenced by operator>>().

## readInfoFile()

void pcl::gpu::people::trees::readInfoFile | ( | const std::string & | filename,
|  | int & | attribId,
|  | Attrib & | threshold,
|  | double & | gain,
|  | HistogramPair & | HP
| ) |  |

inline

Definition at line 213 of file tree_train.h.

## readThreshs()

void pcl::gpu::people::trees::readThreshs | ( | const std::string & | filename,
|  | std::vector< Attrib > & | threshs
| ) |  |

Referenced by operator>>().

## runThroughTree()

void pcl::gpu::people::trees::runThroughTree | ( | int | maxDepth,
|  | const std::vector< Node > & | tree,
|  | const std::vector< Label > & | leaves,
|  | int | W,
|  | int | H,
|  | const uint16_t * | dmap,
|  | Label * | lmap
| ) |  |

Referenced by operator>>().

## writeAttribLocs()

void pcl::gpu::people::trees::writeAttribLocs | ( | const std::string & | filename,
|  | const std::vector< AttribLocation > & | alocs
| ) |  |

Referenced by operator>>().

## writeInfoFile()

void pcl::gpu::people::trees::writeInfoFile | ( | const std::string & | filename,
|  | int | attribId,
|  | Attrib | threshold,
|  | double | gain,
|  | const HistogramPair & | HP
| ) |  |

inline

Definition at line 200 of file tree_train.h.

## writeLabeledFeatureVec()

static void pcl::gpu::people::trees::writeLabeledFeatureVec | ( | std::ostream & | os,
|  | const std::vector< LabeledFeature > & | lfs
| ) |  |

static

Definition at line 174 of file tree_train.h.

## writeThreshs()

void pcl::gpu::people::trees::writeThreshs | ( | const std::string & | filename,
|  | const std::vector< Attrib > & | threshs
| ) |  |

Referenced by operator>>().

## Variable Documentation

## focal

const double pcl::gpu::people::trees::focal = 1000.

static

Definition at line 57 of file tree.h.