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

Intensity feature extraction class. More...

#include <Intensity.h>

Inheritance diagram for DirectGraphicalModels::fex::CIntensity:
Collaboration diagram for DirectGraphicalModels::fex::CIntensity:

Public Member Functions

 CIntensity (const Mat &img)
 Constructor. More...
 
virtual ~CIntensity (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, cv::Scalar weight=CV_RGB(0.333, 0.333, 0.333))
 Extracts the intesity 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

Intensity feature extraction class.

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 14 of file Intensity.h.

Constructor & Destructor Documentation

◆ CIntensity()

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

Constructor.

Parameters
imgInput image of type CV_8UC3.

Definition at line 21 of file Intensity.h.

◆ ~CIntensity()

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

Definition at line 22 of file Intensity.h.

Member Function Documentation

◆ get() [1/2]

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

Extracts and returns the required feature.

Returns
The feature image.

Implements DirectGraphicalModels::fex::ILocalFeatureExtractor.

Definition at line 24 of file Intensity.h.

Here is the caller graph for this function:

◆ get() [2/2]

Mat DirectGraphicalModels::fex::CIntensity::get ( const Mat &  img,
cv::Scalar  weight = CV_RGB(0.333, 0.333, 0.333) 
)
static

Extracts the intesity feature.

This function calculates the intesity of the input image as follows:

\[ intensity=weight_0\cdot img.RED+weight_1\cdot img.GREEN+weight_2\cdot img.BLUE \]

Parameters
imgInput image of type CV_8UC3.
weightThe weight coefficients, which determine the contribution of each color channel to the resulting intensity.
Returns
The intesity feature image of type CV_8UC1.

Definition at line 6 of file Intensity.cpp.


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