6 #include "GraphLayeredExt.h" 37 DllExport
void setGraph(
const Mat& pots)
override 53 DllExport
void addDefaultEdgesModel(
const Mat& featureVectors,
float val,
float weight = 1.0f)
override;
60 DllExport
void addDefaultEdgesModel(
const vec_mat_t& featureVectors,
float val,
float weight = 1.0f)
override;
102 DllExport
void fillEdges(
const CTrainEdge& edgeTrainer,
const Mat& featureVectors,
const vec_float_t& vParams,
float weight = 1.0f)
116 DllExport
void fillEdges(
const CTrainEdge& edgeTrainer,
const vec_mat_t& featureVectors,
const vec_float_t& vParams,
float weight = 1.0f)
137 DllExport
void setEdges(std::optional<byte> group,
const Mat &pot)
CGraphPairwiseExt(IGraphPairwise &graph, byte gType=GRAPH_EDGES_GRID)
Constructor.
void addFeatureVecs(CTrainEdge &edgeTrainer, const vec_mat_t &featureVectors, const Mat >)
Adds a block of new feature vectors.
void fillEdges(const CTrainEdge &edgeTrainer, const Mat &featureVectors, const vec_float_t &vParams, float weight=1.0f)
Fills the graph edges with potentials.
Vertical and horizontal edges.
Extended Pairwise graph class for 2D image classifaction.
Base abstract class for edge potentials training.
Size getSize() const override
Returns the size of the graph.
General graph extension abstract class for 2D image classifaction.
byte getType(void) const
Returns the type of the graph.
Extended Pairwise Layered graph class.
void defineEdgeGroup(float A, float B, float C, byte group)
Assign the edges, which cross the given line to the grop group.
void addDefaultEdgesModel(float val, float weight=1.0f) override
Adds default data-independet edge model.
void setGraph(const Mat &pots) override
Fills an existing 2D graph with potentials or builds a new 2D graph of size corresponding to pots...
void addFeatureVecs(CTrainEdge &edgeTrainer, const Mat &featureVectors, const Mat >)
Adds a block of new feature vectors.
void buildGraph(Size graphSize) override
Builds a 2D graph of size corresponding to the image resolution.
Interface class for graphical models.
std::unique_ptr< CGraphLayeredExt > m_pGraphLayeredExt
void fillEdges(const CTrainEdge &edgeTrainer, const vec_mat_t &featureVectors, const vec_float_t &vParams, float weight=1.0f)
Fills the graph edges with potentials.
virtual ~CGraphPairwiseExt(void)=default
void setEdges(std::optional< byte > group, const Mat &pot)
Sets potential pot to all edges in the group group.