Direct Graphical Models  v.1.7.0
DirectGraphicalModels::fex::CDistance Class Reference

Distance feature extraction class. More...

#include <Distance.h>

Inheritance diagram for DirectGraphicalModels::fex::CDistance:
Collaboration diagram for DirectGraphicalModels::fex::CDistance:

Public Member Functions

 CDistance (const Mat &img)
 Constructor. More...
 
virtual ~CDistance (void)
 
virtual Mat get (void) const
 Extracts and returns the required feature. More...
 
- Public Member Functions inherited from DirectGraphicalModels::fex::ILocalFeatureExtractor
 ILocalFeatureExtractor (const Mat &img)
 Constructor. More...
 
virtual ~ILocalFeatureExtractor (void)
 
- Public Member Functions inherited from DirectGraphicalModels::fex::IFeatureExtractor
 IFeatureExtractor (const Mat &img)
 Constructor. More...
 
virtual ~IFeatureExtractor (void)
 

Static Public Member Functions

static Mat get (const Mat &img, byte threshold=16, double multiplier=4.0)
 Extracts the distance feature. More...
 

Additional Inherited Members

- Protected Attributes inherited from DirectGraphicalModels::fex::IFeatureExtractor
const Mat m_img
 Container for the image, from which the features are to be extracted. More...
 

Detailed Description

Distance feature extraction class.

This class is applied to perform the distance transformation.

Author
Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de

Definition at line 15 of file Distance.h.

Constructor & Destructor Documentation

◆ CDistance()

DirectGraphicalModels::fex::CDistance::CDistance ( const Mat &  img)
inline

Constructor.

Parameters
imgInput image of type CV_8UC1 or CV_8UC3.

Definition at line 22 of file Distance.h.

◆ ~CDistance()

virtual DirectGraphicalModels::fex::CDistance::~CDistance ( void  )
inlinevirtual

Definition at line 23 of file Distance.h.

Member Function Documentation

◆ get() [1/2]

virtual Mat DirectGraphicalModels::fex::CDistance::get ( void  ) const
inlinevirtual

Extracts and returns the required feature.

Returns
The feature image.

Implements DirectGraphicalModels::fex::ILocalFeatureExtractor.

Definition at line 25 of file Distance.h.

Here is the caller graph for this function:

◆ get() [2/2]

Mat DirectGraphicalModels::fex::CDistance::get ( const Mat &  img,
byte  threshold = 16,
double  multiplier = 4.0 
)
static

Extracts the distance feature.

For each pixel of the source image this function calculates the distance to the closest pixel, which value is larger or equal to threshold. Resulting feature image is multiplied by multiplier

Parameters
imgInput image of type CV_8UC1 or CV_8UC3.
thresholdThreshold value.
multiplierAmplification coefficient for the resulting feature image.
Returns
The distance feature image of type CV_8UC1.

Definition at line 5 of file Distance.cpp.


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