1 #include "GraphPairwiseExt.h" 2 #include "IGraphPairwise.h" 4 #include "TrainEdgePottsCS.h" 11 if (weight != 1.0f) val = powf(val, weight);
19 const word nFeatures = featureVectors.channels();
21 fillEdges(edgeTrainer, featureVectors, { val, 0.001f }, weight);
27 const word nFeatures =
static_cast<word
>(featureVectors.size());
29 fillEdges(edgeTrainer, featureVectors, { val, 0.001f }, weight);
void fillEdges(const CTrainEdge &edgeTrainer, const Mat &featureVectors, const vec_float_t &vParams, float weight=1.0f)
Fills the graph edges with potentials.
Contrast-Sensitive Potts training class.
void addDefaultEdgesModel(float val, float weight=1.0f) override
Adds default data-independet edge model.
std::unique_ptr< CGraphLayeredExt > m_pGraphLayeredExt
static Mat getDefaultEdgePotentials(float val, byte nStates)
Returns the data-independent edge potentials.