28 DllExport
void buildGraph(Size graphSize)
override;
29 DllExport
void setGraph(
const Mat &pots)
override;
58 DllExport
void addDefaultEdgesModel(
const vec_mat_t &featureVectors,
float val,
float weight = 1.0f)
override 72 DllExport
void addGaussianEdgeModel(Vec2f sigma,
float weight = 1.0f,
const std::function<
void(
const Mat& src, Mat& dst)>& semiMetricFunction = {});
82 DllExport
void addBilateralEdgeModel(
const Mat& featureVectors, Vec2f sigma,
float sigma_opt = 1.0f,
float weight = 1.0f,
const std::function<
void(
const Mat& src, Mat& dst)>& semiMetricFunction = {});
92 DllExport
void addBilateralEdgeModel(
const vec_mat_t& featureVectors, Vec2f sigma,
float sigma_opt = 1.0f,
float weight = 1.0f,
const std::function<
void(
const Mat& src, Mat& dst)>& semiMetricFunction = {});
void buildGraph(Size graphSize) override
Builds a 2D graph of size corresponding to the image resolution.
General graph extension abstract class for 2D image classifaction.
Size getSize(void) const override
Returns the size of the graph.
CGraphDense & m_graph
The graph.
Size m_size
Size of the 2D graph.
void addDefaultEdgesModel(const vec_mat_t &featureVectors, float val, float weight=1.0f) override
Adds default contrast-sensitive edge model.
~CGraphDenseExt(void)=default
void addDefaultEdgesModel(const Mat &featureVectors, float val, float weight=1.0f) override
Adds default contrast-sensitive edge model.
CGraphDenseExt(CGraphDense &graph)
Constructor.
void addGaussianEdgeModel(Vec2f sigma, float weight=1.0f, const std::function< void(const Mat &src, Mat &dst)> &semiMetricFunction={})
Add a Gaussian potential model with standard deviation sigma.
void addDefaultEdgesModel(float val, float weight=1.0f) override
Adds default data-independet edge model.
Extended Dense graph class for 2D image classifaction.
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 addBilateralEdgeModel(const Mat &featureVectors, Vec2f sigma, float sigma_opt=1.0f, float weight=1.0f, const std::function< void(const Mat &src, Mat &dst)> &semiMetricFunction={})
Add a Bilateral pairwise potential with spacial standard deviations sigma and color standard deviatio...
Fully-connected (dense) graph class.