Direct Graphical Models  v.1.5.2
DirectGraphicalModels::fex Namespace Reference

## Namespaces

global
Global-features extraction.

## Classes

class  CCommonFeatureExtractor
Common class, which unites feature extraction algorithms. More...

class  CCoordinate
Coordinate feature extraction class. More...

class  CDistance
Distance feature extraction class. More...

class  CGlobalFeatureExtractor
Interface class for global feature extraction algorithms. More...

Gradient feature extraction class. More...

class  CHOG
HOG (histogram of oriented gradients) feature extraction class. More...

class  CHSV
Hue, Saturation and Value feature extraction class. More...

class  CIntensity
Intensity feature extraction class. More...

class  CNDVI
NDVI (normalized difference vegetation index) feature extraction class. More...

class  CScale
Scale feature extraction class. More...

class  CSIFT
SIFT (scale-invariant feature transform) feature extraction class. More...

class  CSparseCoding
Sparse Coding feature extraction class. More...

class  CSparseDictionary
Sparse Dictionary Learning class. More...

class  CVariance
Variance feature extraction class. More...

class  IFeatureExtractor
Interface class for feature extraction algorithms. More...

class  ILocalFeatureExtractor
Interface class for local feature extraction algorithms. More...

struct  SqNeighbourhood
Square neighborhood structure. More...

## Typedefs

typedef struct DirectGraphicalModels::fex::SqNeighbourhood SqNeighbourhood
Square neighborhood structure. More...

## Enumerations

enum  ChannelsRGB { CH_BLUE, CH_GREEN, CH_RED }
Channels in the BGR color space. More...

enum  ChannelsHSV { CH_HUE, CH_SATURATION, CH_VALUE }
Channels in the HSV color space. More...

enum  coordinateType { COORDINATE_ORDINATE, COORDINATE_ABSCISS, COORDINATE_RADIUS }
Types of the coordinate feature. More...

enum  BasePointLocation {
BP_CENTER, BP_LEFT, BP_RIGHT, BP_TOP,
BP_BOTTOM
}
Some special cases of the base point location inside the neighborhood. More...

## Functions

byte linear_mapper (float val, float min, float max)
Linear 1D mapping. More...

byte two_linear_mapper (float val, float min, float max, float mid, byte midPoint)
Two-linear 1D mapping. More...

SqNeighbourhood sqNeighbourhood (int leftGap, int rightGap, int upperGap, int lowerGap)
Initializes the square neighborhood structure. More...

SqNeighbourhood sqNeighbourhoodAll (int R)
Initializes the square neighborhood structure with all the same values (base point in the center) More...

SqNeighbourhood sqNeighbourhood (int R, BasePointLocation location=BP_CENTER)
Initializes the square neighborhood structure with a pre-define shape. More...

## Variables

const float SC_LRATE_W = 5e-2f
Learning rate (speed) for weights $$W$$. More...

const float SC_LRATE_D = 1e-2f
Learning rate (speed) for dictionary $$D$$. More...

## Typedef Documentation

Square neighborhood structure.

This structure defines rectangular neighborhood around its base point. The size of the neighborhoood is given via four gap values: $$(leftGap+rightGap+1)\times(upperGap+lowerGap+1)$$, and its shape is defines as depicted at Figure 1.

This definition of a neighbourhood extends the classical one, where the neighborhood is represented as a square with the base point in the center.

Fig. 1

## Enumeration Type Documentation

Some special cases of the base point location inside the neighborhood.

Enumerator
BP_CENTER

The base point is located in the neighborhood's center.

BP_LEFT

The base point is located at the neighborhood's left boundry.

BP_RIGHT

The base point is located in the neighborhood's right boundry.

BP_TOP

The base point is located in the neighborhood's upper boundry.

BP_BOTTOM

The base point is located in the neighborhood's lower boundry.

Definition at line 26 of file SquareNeighborhood.h.

Channels in the HSV color space.

Enumerator
CH_HUE

Hue channel.

CH_SATURATION

Saturation channel.

CH_VALUE

Value channel.

Definition at line 30 of file CommonFeatureExtractor.h.

Channels in the BGR color space.

Enumerator
CH_BLUE

Blue channel.

CH_GREEN

Green channel.

CH_RED

Red channel.

Definition at line 23 of file CommonFeatureExtractor.h.

Types of the coordinate feature.

Enumerator
COORDINATE_ORDINATE

Coordinate feature depend on the pixel's ordinate (y-coordinate).

COORDINATE_ABSCISS

Coordinate feature depend on the pixel's absciss (x-coordinate).

Coordinate feature depend on the pixel's distance to the image center.

Definition at line 12 of file Coordinate.h.

## Function Documentation

 byte DirectGraphicalModels::fex::linear_mapper ( float val, float min, float max )
inline

Linear 1D mapping.

This function perform linear mapping of the value val from one interval to another: $$val\in[min; max]\rightarrow res\in[0; 255]$$, such that:

\begin{eqnarray*} min&\rightarrow&0 \\ max&\rightarrow&255 \end{eqnarray*}

Parameters
 val The value to map. min The lower boundary of the val. max The higher bounday of the val.
Returns
The mapped value res.

Definition at line 19 of file LinearMapper.h.

Here is the caller graph for this function:

 SqNeighbourhood DirectGraphicalModels::fex::sqNeighbourhood ( int leftGap, int rightGap, int upperGap, int lowerGap )
inline

Initializes the square neighborhood structure.

Parameters
 leftGap Distance from the base point to the neighborhood's left boundary. rightGap Distance from the base point to the neighborhood's right boundary. upperGap Distance from the base point to the neighborhood's upper boundary. lowerGap Distance from the base point to the neighborhood's lower boundary.
Returns
Initialized square neighborhood of the size: $$(leftGap+rightGap+1)\times(upperGap+lowerGap+1)$$ (Ref. SqNeighbourhood).

Definition at line 42 of file SquareNeighborhood.h.

Here is the caller graph for this function:

 SqNeighbourhood DirectGraphicalModels::fex::sqNeighbourhood ( int R, BasePointLocation location = BP_CENTER )
inline

Initializes the square neighborhood structure with a pre-define shape.

Parameters
 R Distance from the base point to the neighborhood's boundaries location Flag describing the location of the base point (Ref. BasePointLocation and Figure 2) Fig. 2
Returns
Initialized square neighborhood of the size $$(2R + 1)\times(2R + 1)$$ (Ref. SqNeighbourhood)

Definition at line 64 of file SquareNeighborhood.h.

Here is the call graph for this function:

 SqNeighbourhood DirectGraphicalModels::fex::sqNeighbourhoodAll ( int R )
inline

Initializes the square neighborhood structure with all the same values (base point in the center)

Parameters
 R Distance from the base point to the neighborhood's boundaries (radius)
Returns
Initialized square neighborhood of the size $$(2R + 1)\times(2R + 1)$$ (Ref. SqNeighbourhood)

Definition at line 56 of file SquareNeighborhood.h.

Here is the call graph for this function:

Here is the caller graph for this function:

 byte DirectGraphicalModels::fex::two_linear_mapper ( float val, float min, float max, float mid, byte midPoint )
inline

Two-linear 1D mapping.

This function perform linear mapping of the value val from one interval to another: $$val\in[min; max]\rightarrow res\in[0; 255]$$, such that:

\begin{eqnarray*} min&\rightarrow&0 \\ mid&\rightarrow&midPoint \\ max&\rightarrow&255 \end{eqnarray*}

For more detail please refer to the Figure 1.

Fig. 1
Parameters
 val The value to map. min The lower boundary of the val. max The higher bounday of the val. mid The x-coordinate of the intersection point, $$mid\in(min; max)$$ (Ref. Figure 1). midPoint The y-coordinate of the intersection point, $$midPoint\in[0; 255]$$ (Ref. Figure 1).
Returns
The mapped value res.

Definition at line 38 of file LinearMapper.h.

Here is the call graph for this function:

Here is the caller graph for this function:

## Variable Documentation

 const float DirectGraphicalModels::fex::SC_LRATE_D = 1e-2f

Learning rate (speed) for dictionary $$D$$.

Definition at line 10 of file SparseDictionary.h.

 const float DirectGraphicalModels::fex::SC_LRATE_W = 5e-2f

Learning rate (speed) for weights $$W$$.

Definition at line 9 of file SparseDictionary.h.