Public Member Functions | Protected Attributes | Private Member Functions
pcl::people::HOG Class Reference

HOG represents a class for computing the HOG descriptor described in Dalal, N. and Triggs, B., "Histograms of oriented gradients for human detection", CVPR 2005. More...

#include <hog.h>

List of all members.

Public Member Functions

void compute (float *I, int h, int w, int n_channels, int bin_size, int n_orients, bool soft_bin, float *descriptor)
 Compute HOG descriptor.
void compute (float *I, float *descriptor) const
 Compute HOG descriptor with default parameters.
void gradHist (float *M, float *O, int h, int w, int bin_size, int n_orients, bool soft_bin, float *H) const
 Compute n_orients gradient histograms per bin_size x bin_size block of pixels.
void gradMag (float *I, int h, int w, int d, float *M, float *O) const
 Compute gradient magnitude and orientation at each location (uses sse).
 HOG ()
 Constructor.
void normalization (float *H, int h, int w, int bin_size, int n_orients, float clip, float *G) const
 Normalize histogram of gradients.
virtual ~HOG ()
 Destructor.

Protected Attributes

int bin_size_
 spatial bin size (default = 8)
float clip_
 value at which to clip histogram bins (default = 0.2)
int h_
 image height (default = 128)
int n_channels_
 image number of channels (default = 3)
int n_orients_
 number of orientation bins (default = 9)
bool soft_bin_
 if true, each pixel can contribute to multiple spatial bins (using bilinear interpolation) (default = true)
int w_
 image width (default = 64)

Private Member Functions

float * acosTable () const
 Build lookup table a[] s.t. a[dx/2.02*n]~=acos(dx).
void alFree (void *aligned) const
 Platform independent aligned memory de-allocation (see also alMalloc).
void * alMalloc (size_t size, int alignment) const
 Platform independent aligned memory allocation (see also alFree).
void grad1 (float *I, float *Gx, float *Gy, int h, int w, int x) const
 Compute x and y gradients for just one column (uses sse).
void gradQuantize (float *O, float *M, int *O0, int *O1, float *M0, float *M1, int n_orients, int nb, int n, float norm) const
 Helper for gradHist, quantize O and M into O0, O1 and M0, M1 (uses sse).

Detailed Description

HOG represents a class for computing the HOG descriptor described in Dalal, N. and Triggs, B., "Histograms of oriented gradients for human detection", CVPR 2005.

Author:
Matteo Munaro, Stefano Ghidoni, Stefano Michieletto

Definition at line 55 of file hog.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 55 of file hog.cpp.

pcl::people::HOG::~HOG ( ) [virtual]

Destructor.

Definition at line 68 of file hog.cpp.


Member Function Documentation

float * pcl::people::HOG::acosTable ( ) const [private]

Build lookup table a[] s.t. a[dx/2.02*n]~=acos(dx).

Definition at line 419 of file hog.cpp.

void pcl::people::HOG::alFree ( void *  aligned) const [inline, private]

Platform independent aligned memory de-allocation (see also alMalloc).

Definition at line 488 of file hog.cpp.

void * pcl::people::HOG::alMalloc ( size_t  size,
int  alignment 
) const [inline, private]

Platform independent aligned memory allocation (see also alFree).

Definition at line 478 of file hog.cpp.

void pcl::people::HOG::compute ( float *  I,
int  h,
int  w,
int  n_channels,
int  bin_size,
int  n_orients,
bool  soft_bin,
float *  descriptor 
)

Compute HOG descriptor.

Parameters:
[in]IImage as array of float between 0 and 1.
[in]hImage height.
[in]wImage width.
[in]n_channelsImage number of channels.
[in]bin_sizeSpatial bin size.
[in]n_orientsNumber of orientation bins.
[in]soft_binIf true, each pixel can contribute to multiple spatial bins (using bilinear interpolation).
[out]descriptorHOG descriptor.

Definition at line 309 of file hog.cpp.

void pcl::people::HOG::compute ( float *  I,
float *  descriptor 
) const

Compute HOG descriptor with default parameters.

Parameters:
[in]IImage as array of float between 0 and 1.
[out]descriptorHOG descriptor.

Definition at line 322 of file hog.cpp.

void pcl::people::HOG::grad1 ( float *  I,
float *  Gx,
float *  Gy,
int  h,
int  w,
int  x 
) const [private]

Compute x and y gradients for just one column (uses sse).

Definition at line 357 of file hog.cpp.

void pcl::people::HOG::gradHist ( float *  M,
float *  O,
int  h,
int  w,
int  bin_size,
int  n_orients,
bool  soft_bin,
float *  H 
) const

Compute n_orients gradient histograms per bin_size x bin_size block of pixels.

Parameters:
[in]MGradient magnitude for each image point.
[in]OGradient orientation for each image point.
[in]hImage height.
[in]wImage width.
[in]bin_sizeSpatial bin size.
[in]n_orientsNumber of orientation bins.
[in]soft_binIf true, each pixel can contribute to multiple spatial bins (using bilinear interpolation).
[out]HGradient histograms.

Definition at line 171 of file hog.cpp.

void pcl::people::HOG::gradMag ( float *  I,
int  h,
int  w,
int  d,
float *  M,
float *  O 
) const

Compute gradient magnitude and orientation at each location (uses sse).

Parameters:
[in]IImage as array of float.
[in]hImage height.
[in]wImage width.
[in]dImage number of channels.
[out]MGradient magnitude for each image point.
[out]OGradient orientation for each image point.

Definition at line 71 of file hog.cpp.

void pcl::people::HOG::gradQuantize ( float *  O,
float *  M,
int *  O0,
int *  O1,
float *  M0,
float *  M1,
int  n_orients,
int  nb,
int  n,
float  norm 
) const [private]

Helper for gradHist, quantize O and M into O0, O1 and M0, M1 (uses sse).

Definition at line 434 of file hog.cpp.

void pcl::people::HOG::normalization ( float *  H,
int  h,
int  w,
int  bin_size,
int  n_orients,
float  clip,
float *  G 
) const

Normalize histogram of gradients.

Parameters:
[in]HGradient histograms.
[in]hImage height.
[in]wImage width.
[in]bin_sizeSpatial bin size.
[in]n_orientsNumber of orientation bins.
[in]clipValue at which to clip histogram bins.
[out]GNormalized gradient histograms.

Definition at line 284 of file hog.cpp.


Member Data Documentation

int pcl::people::HOG::bin_size_ [protected]

spatial bin size (default = 8)

Definition at line 175 of file hog.h.

float pcl::people::HOG::clip_ [protected]

value at which to clip histogram bins (default = 0.2)

Definition at line 184 of file hog.h.

int pcl::people::HOG::h_ [protected]

image height (default = 128)

Definition at line 166 of file hog.h.

image number of channels (default = 3)

Definition at line 172 of file hog.h.

number of orientation bins (default = 9)

Definition at line 178 of file hog.h.

bool pcl::people::HOG::soft_bin_ [protected]

if true, each pixel can contribute to multiple spatial bins (using bilinear interpolation) (default = true)

Definition at line 181 of file hog.h.

int pcl::people::HOG::w_ [protected]

image width (default = 64)

Definition at line 169 of file hog.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:44:32