Direct Graphical Models  v.1.7.0
Gradient.h
1 // Gradient feature extraction class interface
2 // Written by Sergey G. Kosov in 2015 for Project X
3 #pragma once
4 
5 #include "ILocalFeatureExtractor.h"
6 
7 namespace DirectGraphicalModels { namespace fex
8 {
9  const static float GRADIENT_MAX_VALUE = 255 * sqrtf(2);
10  // ================================ Gradient Class ==============================
16  {
17  friend class CHOG;
18  public:
23  DllExport CGradient(const Mat &img) : ILocalFeatureExtractor(img) {}
24  DllExport virtual ~CGradient(void) {}
25 
26  DllExport virtual Mat get(void) const {return get(m_img);}
27 
39  DllExport static Mat get(const Mat &img, float mid = GRADIENT_MAX_VALUE);
40 
41  protected:
42  static Mat getDerivativeX(const Mat &img);
43  static Mat getDerivativeY(const Mat &img);
44  };
45 } }
46 
Gradient feature extraction class.
Definition: Gradient.h:15
static Mat getDerivativeY(const Mat &img)
Definition: Gradient.cpp:49
static Mat getDerivativeX(const Mat &img)
Definition: Gradient.cpp:35
Interface class for local feature extraction algorithms.
HOG (histogram of oriented gradients) feature extraction class.
Definition: HOG.h:15
const Mat m_img
Container for the image, from which the features are to be extracted.
CGradient(const Mat &img)
Constructor.
Definition: Gradient.h:23