Compute Library
 19.08
HOG Class Reference

CPU implementation of HOG data-object. More...

#include <HOG.h>

Collaboration diagram for HOG:
[legend]

Public Member Functions

 HOG ()
 Default constructor. More...
 
void init (const HOGInfo &input)
 Allocate the HOG descriptor using the given HOG's metadata. More...
 
const HOGInfoinfo () const override
 Interface to be implemented by the child class to return the HOG's metadata. More...
 
float * descriptor () const override
 Pointer to the first element of the array which stores the linear SVM coefficients of HOG descriptor. More...
 
- Public Member Functions inherited from IHOG
virtual ~IHOG ()=default
 Default virtual destructor. More...
 

Detailed Description

CPU implementation of HOG data-object.

Definition at line 36 of file HOG.h.

Constructor & Destructor Documentation

◆ HOG()

HOG ( )

Default constructor.

Definition at line 31 of file HOG.cpp.

32  : IHOG(), _info(), _descriptor()
33 {
34 }
Interface for HOG data-object.
Definition: IHOG.h:35

Member Function Documentation

◆ descriptor()

float * descriptor ( ) const
overridevirtual

Pointer to the first element of the array which stores the linear SVM coefficients of HOG descriptor.

Note
Other elements of the array can be accessed using descriptor()[idx] for idx=[0, descriptor_size() - 1]
Returns
A pointer to the first element of the array which stores the linear SVM coefficients of HOG descriptor

Implements IHOG.

Definition at line 42 of file HOG.cpp.

43 {
44  return _descriptor.data();
45 }

Referenced by HOGAccessor::descriptor().

◆ info()

const HOGInfo * info ( ) const
overridevirtual

Interface to be implemented by the child class to return the HOG's metadata.

Returns
A pointer to the HOG's metadata.

Implements IHOG.

Definition at line 47 of file HOG.cpp.

48 {
49  return &_info;
50 }

◆ init()

void init ( const HOGInfo input)

Allocate the HOG descriptor using the given HOG's metadata.

Parameters
[in]inputHOG's metadata used to allocate the HOG descriptor

Definition at line 36 of file HOG.cpp.

37 {
38  _info = input;
39  _descriptor.resize(_info.descriptor_size());
40 }
size_t descriptor_size() const
The size of HOG descriptor.
Definition: HOGInfo.cpp:131

References HOGInfo::descriptor_size().


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