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>
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). | |
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.
| pcl::people::HOG::~HOG | ( | ) | [virtual] |
| float * pcl::people::HOG::acosTable | ( | ) | const [private] |
| void pcl::people::HOG::alFree | ( | void * | aligned | ) | const [inline, private] |
| void * pcl::people::HOG::alMalloc | ( | size_t | size, |
| int | alignment | ||
| ) | const [inline, private] |
| 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.
| [in] | I | Image as array of float between 0 and 1. |
| [in] | h | Image height. |
| [in] | w | Image width. |
| [in] | n_channels | Image number of channels. |
| [in] | bin_size | Spatial bin size. |
| [in] | n_orients | Number of orientation bins. |
| [in] | soft_bin | If true, each pixel can contribute to multiple spatial bins (using bilinear interpolation). |
| [out] | descriptor | HOG descriptor. |
| void pcl::people::HOG::compute | ( | float * | I, |
| float * | descriptor | ||
| ) | const |
| void pcl::people::HOG::grad1 | ( | float * | I, |
| float * | Gx, | ||
| float * | Gy, | ||
| int | h, | ||
| int | w, | ||
| int | x | ||
| ) | const [private] |
| 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.
| [in] | M | Gradient magnitude for each image point. |
| [in] | O | Gradient orientation for each image point. |
| [in] | h | Image height. |
| [in] | w | Image width. |
| [in] | bin_size | Spatial bin size. |
| [in] | n_orients | Number of orientation bins. |
| [in] | soft_bin | If true, each pixel can contribute to multiple spatial bins (using bilinear interpolation). |
| [out] | H | Gradient histograms. |
| 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).
| [in] | I | Image as array of float. |
| [in] | h | Image height. |
| [in] | w | Image width. |
| [in] | d | Image number of channels. |
| [out] | M | Gradient magnitude for each image point. |
| [out] | O | Gradient orientation for each image point. |
| 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] |
| 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.
| [in] | H | Gradient histograms. |
| [in] | h | Image height. |
| [in] | w | Image width. |
| [in] | bin_size | Spatial bin size. |
| [in] | n_orients | Number of orientation bins. |
| [in] | clip | Value at which to clip histogram bins. |
| [out] | G | Normalized gradient histograms. |
int pcl::people::HOG::bin_size_ [protected] |
float pcl::people::HOG::clip_ [protected] |
int pcl::people::HOG::h_ [protected] |
int pcl::people::HOG::n_channels_ [protected] |
int pcl::people::HOG::n_orients_ [protected] |
bool pcl::people::HOG::soft_bin_ [protected] |
int pcl::people::HOG::w_ [protected] |