Direct Graphical Models  v.1.7.0
DirectGraphicalModels::CGraphExt Class Referenceabstract

General graph extension abstract class for 2D image classifaction. More...

#include <GraphExt.h>

Inheritance diagram for DirectGraphicalModels::CGraphExt:

Public Member Functions

 CGraphExt (void)=default
 
 CGraphExt (const CGraphExt &)=delete
 
virtual ~CGraphExt (void)=default
 
const CGraphExtoperator= (const CGraphExt &)=delete
 
virtual void buildGraph (Size graphSize)=0
 Builds a 2D graph of size corresponding to the image resolution. More...
 
virtual void setGraph (const Mat &pots)=0
 Fills an existing 2D graph with potentials or builds a new 2D graph of size corresponding to pots.size() with potentials. More...
 
virtual void addDefaultEdgesModel (float val, float weight=1.0f)=0
 Adds default data-independet edge model. More...
 
virtual void addDefaultEdgesModel (const Mat &featureVectors, float val, float weight=1.0f)=0
 Adds default contrast-sensitive edge model. More...
 
virtual void addDefaultEdgesModel (const vec_mat_t &featureVectors, float val, float weight=1.0f)=0
 Adds default contrast-sensitive edge model. More...
 
virtual Size getSize () const =0
 Returns the size of the graph. More...
 

Detailed Description

General graph extension abstract class for 2D image classifaction.

This class provides wrapper functions for simplifying operations with graphs, when they are used for 2D image classification

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 16 of file GraphExt.h.

Constructor & Destructor Documentation

◆ CGraphExt() [1/2]

DirectGraphicalModels::CGraphExt::CGraphExt ( void  )
default

◆ CGraphExt() [2/2]

DirectGraphicalModels::CGraphExt::CGraphExt ( const CGraphExt )
delete

◆ ~CGraphExt()

virtual DirectGraphicalModels::CGraphExt::~CGraphExt ( void  )
virtualdefault

Member Function Documentation

◆ addDefaultEdgesModel() [1/3]

virtual void DirectGraphicalModels::CGraphExt::addDefaultEdgesModel ( float  val,
float  weight = 1.0f 
)
pure virtual

Adds default data-independet edge model.

Parameters
valValue, specifying the smoothness strength

See concrete class implementation for more details

weightThe weighting parameter

Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.

◆ addDefaultEdgesModel() [2/3]

virtual void DirectGraphicalModels::CGraphExt::addDefaultEdgesModel ( const Mat &  featureVectors,
float  val,
float  weight = 1.0f 
)
pure virtual

Adds default contrast-sensitive edge model.

Parameters
featureVectorsMulti-channel matrix, each element of which is a multi-dimensinal point: Mat(type: CV_8UC<nFeatures>)
valValue, specifying the smoothness strength

See concrete class implementation for more details

weightThe weighting parameter

Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.

◆ addDefaultEdgesModel() [3/3]

virtual void DirectGraphicalModels::CGraphExt::addDefaultEdgesModel ( const vec_mat_t &  featureVectors,
float  val,
float  weight = 1.0f 
)
pure virtual

Adds default contrast-sensitive edge model.

Parameters
featureVectorsVector of size nFeatures, each element of which is a single feature - image: Mat(type: CV_8UC1)
valValue, specifying the smoothness strength

See concrete class implementation for more details

weightThe weighting parameter

Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.

◆ buildGraph()

virtual void DirectGraphicalModels::CGraphExt::buildGraph ( Size  graphSize)
pure virtual

Builds a 2D graph of size corresponding to the image resolution.

When called multiple times, previouse graph structure is always replaced

Parameters
graphSizeThe size of the graph (image resolution)

Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.

◆ getSize()

virtual Size DirectGraphicalModels::CGraphExt::getSize ( ) const
pure virtual

Returns the size of the graph.

Returns
The size of the Graph

Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphDenseExt, and DirectGraphicalModels::CGraphPairwiseExt.

◆ operator=()

const CGraphExt& DirectGraphicalModels::CGraphExt::operator= ( const CGraphExt )
delete

◆ setGraph()

virtual void DirectGraphicalModels::CGraphExt::setGraph ( const Mat &  pots)
pure virtual

Fills an existing 2D graph with potentials or builds a new 2D graph of size corresponding to pots.size() with potentials.

If the graph was not build beforehand, or the size of existing graph does not correspond to pots.size() this function calls first

buildGraph(pots.size())
Parameters
potsA block of node potentials: Mat(size: image width x image height; type: CV_32FC(nStates)). It may be obtained by:

Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.


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