![]() |
Direct Graphical Models
v.1.7.0
|
General graph extension abstract class for 2D image classifaction. More...
#include <GraphExt.h>
Public Member Functions | |
CGraphExt (void)=default | |
CGraphExt (const CGraphExt &)=delete | |
virtual | ~CGraphExt (void)=default |
const CGraphExt & | operator= (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... | |
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
Definition at line 16 of file GraphExt.h.
|
default |
|
delete |
|
virtualdefault |
|
pure virtual |
Adds default data-independet edge model.
val | Value, specifying the smoothness strength
|
weight | The weighting parameter |
Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.
|
pure virtual |
Adds default contrast-sensitive edge model.
featureVectors | Multi-channel matrix, each element of which is a multi-dimensinal point: Mat(type: CV_8UC<nFeatures>) |
val | Value, specifying the smoothness strength
|
weight | The weighting parameter |
Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.
|
pure virtual |
Adds default contrast-sensitive edge model.
featureVectors | Vector of size nFeatures, each element of which is a single feature - image: Mat(type: CV_8UC1) |
val | Value, specifying the smoothness strength
|
weight | The weighting parameter |
Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.
|
pure virtual |
Builds a 2D graph of size corresponding to the image resolution.
When called multiple times, previouse graph structure is always replaced
graphSize | The size of the graph (image resolution) |
Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphPairwiseExt, and DirectGraphicalModels::CGraphDenseExt.
|
pure virtual |
Returns the size of the graph.
Implemented in DirectGraphicalModels::CGraphLayeredExt, DirectGraphicalModels::CGraphDenseExt, and DirectGraphicalModels::CGraphPairwiseExt.
|
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
pots | A 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.