Classes | Typedefs | Enumerations | Functions
hog.h File Reference

Histogram of Oriented Gradients (Histogram of Oriented Gradients (HOG) features) More...

#include "generic.h"
Include dependency graph for hog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VlHog_

Typedefs

typedef struct VlHog_ VlHog
typedef enum VlHogVariant_ VlHogVariant

Enumerations

enum  VlHogVariant_ { VlHogVariantDalalTriggs, VlHogVariantUoctti }

Functions

VL_EXPORT void vl_hog_delete (VlHog *self)
 Delete a HOG object.
VL_EXPORT void vl_hog_extract (VlHog *self, float *features)
 Extract HOG features.
VL_EXPORT vl_size vl_hog_get_dimension (VlHog const *self)
 Get the dimension of the HOG features.
VL_EXPORT vl_size vl_hog_get_glyph_size (VlHog const *self)
 Get HOG glyph size.
VL_EXPORT vl_size vl_hog_get_height (VlHog *self)
 Get the height of the HOG cell array.
VL_EXPORT vl_index const * vl_hog_get_permutation (VlHog const *self)
 Get HOG left-right flip permutation.
VL_EXPORT vl_bool vl_hog_get_use_bilinear_orientation_assignments (VlHog const *self)
 Tell whether assignments use bilinear interpolation or not.
VL_EXPORT vl_size vl_hog_get_width (VlHog *self)
 Get the width of the HOG cell array.
VL_EXPORT VlHogvl_hog_new (VlHogVariant variant, vl_size numOrientations, vl_bool transposed)
 Create a new HOG object.
VL_EXPORT void vl_hog_process (VlHog *self, float *features, float const *image, vl_size width, vl_size height, vl_size numChannels, vl_size cellSize)
VL_EXPORT void vl_hog_put_image (VlHog *self, float const *image, vl_size width, vl_size height, vl_size numChannels, vl_size cellSize)
 Process features starting from an image.
VL_EXPORT void vl_hog_put_polar_field (VlHog *self, float const *modulus, float const *angle, vl_bool directed, vl_size width, vl_size height, vl_size cellSize)
 Process features starting from a field in polar notation.
VL_EXPORT void vl_hog_render (VlHog const *self, float *image, float const *features, vl_size width, vl_size height)
 Render a HOG descriptor to a glyph image.
VL_EXPORT void vl_hog_set_use_bilinear_orientation_assignments (VlHog *self, vl_bool x)
 Turn bilinear interpolation of assignments on or off.

Detailed Description

Histogram of Oriented Gradients (Histogram of Oriented Gradients (HOG) features)

Author:
Andrea Vedaldi

Definition in file hog.h.


Typedef Documentation

typedef struct VlHog_ VlHog

Definition at line 49 of file hog.h.

Definition at line 21 of file hog.h.


Enumeration Type Documentation

Enumerator:
VlHogVariantDalalTriggs 
VlHogVariantUoctti 

Definition at line 19 of file hog.h.


Function Documentation

VL_EXPORT void vl_hog_delete ( VlHog self)

Delete a HOG object.

Parameters:
selfHOG object to delete.

Definition at line 322 of file hog.c.

VL_EXPORT void vl_hog_extract ( VlHog self,
float *  features 
)

Extract HOG features.

Parameters:
selfHOG object.
featuresHOG features (output).

This method is called after vl_hog_put_image or vl_hog_put_polar_field in order to retrieve the computed HOG features. The buffer features must have the dimensions returned by vl_hog_get_width, vl_hog_get_height, and vl_hog_get_dimension.

Definition at line 854 of file hog.c.

VL_EXPORT vl_size vl_hog_get_dimension ( VlHog const *  self)

Get the dimension of the HOG features.

Parameters:
selfHOG object.
Returns:
imension of a HOG cell descriptors.

Definition at line 504 of file hog.c.

VL_EXPORT vl_size vl_hog_get_glyph_size ( VlHog const *  self)

Get HOG glyph size.

Parameters:
selfHOG object.
Returns:
size (height and width) of a glyph.

Definition at line 365 of file hog.c.

VL_EXPORT vl_size vl_hog_get_height ( VlHog self)

Get the height of the HOG cell array.

Parameters:
selfHOG object.
Returns:
number of HOG cells in the vertical direction.

Definition at line 526 of file hog.c.

VL_EXPORT vl_index const* vl_hog_get_permutation ( VlHog const *  self)

Get HOG left-right flip permutation.

Parameters:
selfHOG object.
Returns:
left-right permutation.

The function returns a pointer to an array permutation of vl_hog_get_dimension elements. Given a HOG descriptor (for a cell) hog, which is also a vector of vl_hog_get_dimension elements, the descriptor obtained for the same image flipped horizotnally is given by flippedHog[i] = hog[permutation[i]].

Definition at line 383 of file hog.c.

Tell whether assignments use bilinear interpolation or not.

Parameters:
selfHOG object.
Returns:
true if orientations are be assigned with bilinear interpolation.

Definition at line 405 of file hog.c.

VL_EXPORT vl_size vl_hog_get_width ( VlHog self)

Get the width of the HOG cell array.

Parameters:
selfHOG object.
Returns:
number of HOG cells in the horizontal direction.

Definition at line 515 of file hog.c.

VL_EXPORT VlHog* vl_hog_new ( VlHogVariant  variant,
vl_size  numOrientations,
vl_bool  transposed 
)

Create a new HOG object.

Parameters:
variantHOG descriptor variant.
numOrientationsnumber of distinguished orientations.
transposedwether images are transposed (column major).
Returns:
the new HOG object.

The function creates a new HOG object to extract descriptors of the prescribed variant. The angular resolution is set by numOrientations, which specifies the number of undirected orientations. The object can work with column major images by setting transposed to true.

Definition at line 174 of file hog.c.

VL_EXPORT void vl_hog_process ( VlHog self,
float *  features,
float const *  image,
vl_size  width,
vl_size  height,
vl_size  numChannels,
vl_size  cellSize 
)
VL_EXPORT void vl_hog_put_image ( VlHog self,
float const *  image,
vl_size  width,
vl_size  height,
vl_size  numChannels,
vl_size  cellSize 
)

Process features starting from an image.

Parameters:
selfHOG object.
imageimage to process.
widthimage width.
heightimage height.
numChannelsnumber of image channles.
cellSizesize of a HOG cell.

The buffer hog must be a three-dimensional array. The first two dimensions are (width + cellSize/2)/cellSize and (height + cellSize/2)/cellSize, where divisions are integer. This is approximately width/cellSize and height/cellSize, adjusted so that the last cell is at least half contained in the image.

The image width and height must be not smaller than three pixels and not smaller than cellSize.

Definition at line 596 of file hog.c.

VL_EXPORT void vl_hog_put_polar_field ( VlHog self,
float const *  modulus,
float const *  angle,
vl_bool  directed,
vl_size  width,
vl_size  height,
vl_size  cellSize 
)

Process features starting from a field in polar notation.

Parameters:
selfHOG object.
modulusimage gradient modulus.
angleimage gradient angle.
directedwrap the gradient angles at 2pi (directed) or pi (undirected).
widthimage width.
heightimage height.
cellSizesize of a HOG cell.

The function behaves like vl_hog_put_image, but foregoes the internal computation of the gradient field, allowing the user to specify their own. Angles are measure clockwise, the y axis pointing downwards, starting from the x axis (pointing to the right).

Definition at line 742 of file hog.c.

VL_EXPORT void vl_hog_render ( VlHog const *  self,
float *  image,
float const *  descriptor,
vl_size  width,
vl_size  height 
)

Render a HOG descriptor to a glyph image.

Parameters:
selfHOG object.
imageglyph image (output).
descriptorHOG descriptor.
widthHOG descriptor width.
heightHOG descriptor height.

The function renders the HOG descriptor or filter descriptor as an image (for visualization) and stores the result in the buffer image. This buffer must be an array of dimensions width*glyphSize by height*glyphSize elements, where glyphSize is obtained from vl_hog_get_glyph_size and is the size in pixels of the image element used to represent the descriptor of one HOG cell.

Definition at line 428 of file hog.c.

Turn bilinear interpolation of assignments on or off.

Parameters:
selfHOG object.
xtrue if orientations should be assigned with bilinear interpolation.

Definition at line 395 of file hog.c.



libvlfeat
Author(s): Andrea Vedaldi
autogenerated on Thu Jun 6 2019 20:25:52