5 #include "IEdgeModel.h" 6 #include "permutohedral/permutohedral.h" 31 CEdgeModelPotts(
const Mat& features,
float weight = 1.0f,
const std::function<
void(
const Mat& src, Mat& dst)>& semiMetricFunction = {},
bool perPixelNormalization =
true);
34 void apply(
const Mat &src, Mat &dst)
const override;
41 std::function<void(const Mat &src, Mat &dst)>
m_function;
std::function< void(const Mat &src, Mat &dst)> m_function
The semi-metric function.
std::unique_ptr< CPermutohedral > m_pLattice
Pointer to the permutohedral lattice.
Interface class for edge models used in dense graphical models.
float m_weight
The weighting parameter.
void apply(const Mat &src, Mat &dst) const override
Applies an edge model to the node potentials of a dense graph.
virtual ~CEdgeModelPotts(void)=default
Potts Edge Model for dense graphical models.
Mat m_norm
Array with normalization factors.
CEdgeModelPotts(const Mat &features, float weight=1.0f, const std::function< void(const Mat &src, Mat &dst)> &semiMetricFunction={}, bool perPixelNormalization=true)
Constructor.