OTB
9.0.0
Orfeo Toolbox
|
#include <otbHistogramOfOrientedGradientCovariantImageFunction.h>
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef Superclass::ContinuousIndexType | ContinuousIndexType |
typedef TCoordRep | CoordRepType |
typedef Superclass::IndexType | IndexType |
typedef TInputImage | InputImageType |
typedef InputImageType::PixelType | InputPixelType |
typedef TOutputPrecision | OutputPrecisionType |
typedef Superclass::OutputType | OutputType |
typedef itk::SmartPointer< Self > | Pointer |
typedef Superclass::PointType | PointType |
typedef HistogramOfOrientedGradientCovariantImageFunction | Self |
typedef itk::ImageFunction< TInputImage, std::vector< std::vector< TOutputPrecision > >, TCoordRep > | Superclass |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
OutputType | EvaluateAtIndex (const IndexType &index) const override |
virtual const char * | GetNameOfClass () const |
Static Public Member Functions | |
static Pointer | New () |
Static Public Attributes | |
static const unsigned int | ImageDimension = InputImageType::ImageDimension |
unsigned int | m_NeighborhoodRadius |
unsigned int | m_NumberOfOrientationBins |
OutputType | Evaluate (const PointType &point) const override |
OutputType | EvaluateAtContinuousIndex (const ContinuousIndexType &cindex) const override |
virtual void | SetNeighborhoodRadius (unsigned int _arg) |
virtual const unsigned int & | GetNeighborhoodRadius () const |
virtual void | SetNumberOfOrientationBins (unsigned int _arg) |
virtual const unsigned int & | GetNumberOfOrientationBins () const |
HistogramOfOrientedGradientCovariantImageFunction () | |
~HistogramOfOrientedGradientCovariantImageFunction () override | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
HistogramOfOrientedGradientCovariantImageFunction (const Self &)=delete | |
void | operator= (const Self &)=delete |
Calculate the centered HOG features.
This filter implements the centered histogram of gradient feature. It expects a gradient covariant image as input, such as the output of the itk::GradientImageFilter. Steps of the algorithm are as follows.
In order to make the C-HOG descriptor rotation-invariant, a principal gradient orientation is first looked for. Within the m_NeighborhoodRadius ($r$), an histogram of the local orientation is computed with m_NumberOfOrientationBins bins. Values cumulated in this histogram are the gradient magnitude weighted by a gaussian kernel of $\sigma = 0.5 * r$.
From this orientation histogram, the principal orientation is computed by looking for the maximum valued bin.
Once principal orientation is computed, gradient magnitude values weighted by the gaussian kernel are cumulated in five different histograms corresponding to five distinct spatial areas : the center area (radius of the center area is computed using $r_{c}=log_{2}(r)$), and the upper-left, upper-right, lower-left and lower-right radial areas. Orientation of these radial areas is shifted to match the principal orientation, and gradient orientations to determine histogram bins are also compensated with the principal orientation. Last, each histogram is normalized by its $L_2$ norm, ensuring that they all lie in the range $[0, 1]$.
This class is templated over the input image type, the output precision (e.g. float or double) and the coordinate representation type (e.g. float or double).
Definition at line 71 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef itk::SmartPointer<const Self> otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::ConstPointer |
Definition at line 79 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef Superclass::ContinuousIndexType otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::ContinuousIndexType |
Definition at line 91 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef TCoordRep otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::CoordRepType |
Definition at line 97 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef Superclass::IndexType otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::IndexType |
Definition at line 90 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef TInputImage otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::InputImageType |
InputImageType typedef support.
Definition at line 85 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef InputImageType::PixelType otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::InputPixelType |
Definition at line 89 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef TOutputPrecision otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::OutputPrecisionType |
Definition at line 94 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef Superclass::OutputType otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::OutputType |
Definition at line 95 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef itk::SmartPointer<Self> otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::Pointer |
Definition at line 78 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef Superclass::PointType otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::PointType |
Definition at line 92 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef HistogramOfOrientedGradientCovariantImageFunction otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::Self |
Standard class typedefs.
Definition at line 76 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
typedef itk::ImageFunction<TInputImage, std::vector<std::vector<TOutputPrecision> >, TCoordRep> otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::Superclass |
Definition at line 77 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
|
protected |
Constructor
Definition at line 36 of file otbHistogramOfOrientedGradientCovariantImageFunction.hxx.
|
inlineoverrideprotected |
Evaluate the function at non-integer positions
Definition at line 136 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
|
privatedelete |
Evaluate the function at non-integer positions
virtual::itk::LightObject::Pointer otb::HistogramOfOrientedGradientCovariantImageFunction< TInputImage, TOutputPrecision, TCoordRep >::CreateAnother | ( | void | ) | const |
|
inlineoverride |
Evaluate the function at non-integer positions
Definition at line 106 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
|
inlineoverride |
Evaluate the function at non-integer positions
Definition at line 112 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
|
override |
Evalulate the function at specified index
Definition at line 50 of file otbHistogramOfOrientedGradientCovariantImageFunction.hxx.
References otb::CONST_2PI, otb::CONST_PI, and otb::CONST_PI_2.
|
virtual |
Run-time type information (and related methods).
|
virtual |
Evaluate the function at non-integer positions
|
virtual |
Evaluate the function at non-integer positions
|
static |
Method for creation through the object factory.
|
privatedelete |
Evaluate the function at non-integer positions
|
overrideprotected |
Evaluate the function at non-integer positions
Definition at line 42 of file otbHistogramOfOrientedGradientCovariantImageFunction.hxx.
|
virtual |
Get/Set the radius of the neighborhood over which the statistics are evaluated
|
virtual |
Get/Set the number of bins of the orientation histograms
|
static |
Dimension of the underlying image.
Definition at line 100 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
|
private |
Evaluate the function at non-integer positions
Definition at line 146 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.
|
private |
Evaluate the function at non-integer positions
Definition at line 149 of file otbHistogramOfOrientedGradientCovariantImageFunction.h.