Read@CVL
rdf::GraphCutPixel Class Referenceabstract

The base class for all graphcuts operating on pixels. More...

#include <GraphCut.h>

Inheritance diagram for rdf::GraphCutPixel:
Collaboration diagram for rdf::GraphCutPixel:

Public Member Functions

 GraphCutPixel (const PixelSet &set)
 
virtual bool isEmpty () const override
 Returns true if the module was initialized with the default constructor. Note, if empty is true, nothing can be computed. More...
 
QSharedPointer< GraphCutConfigconfig () const
 
PixelSet set () const
 
- Public Member Functions inherited from rdf::Module
 Module ()
 Default constructor Initializes a new instance of the Module class. More...
 
virtual QString name () const
 Returns the module's name. More...
 
virtual QString toString () const
 Converts the module's parameters and results to a string. More...
 
virtual bool compute ()=0
 Runs the algorithm implemented by the module. More...
 
virtual void setConfig (QSharedPointer< ModuleConfig > config)
 
QSharedPointer< ModuleConfigconfig () const
 

Protected Member Functions

QSharedPointer< GCoptimizationGeneralGraphgraphCut (const PixelGraph &graph) const
 Performs the graphcut. The graphcut globally optimizes the pixel states w.r.t. the costs given More...
 
virtual cv::Mat costs (int numLabels) const =0
 Returns a matrix with the costs for each state. The matrix must be mSet.size() x numLabels 32SC1. It contains cost values for each element given a state. Normalized costs are usually multiplied by mScaleFactor to fit the data format. More...
 
virtual cv::Mat labelDistMatrix (int numLabels) const =0
 Indicates the costs to move from one label to another. High values indicate high costs. Usually this matrix is symmetric. More...
 
virtual int numLabels () const =0
 
- Protected Member Functions inherited from rdf::Module
virtual bool checkInput () const =0
 
QString debugName () const
 

Protected Attributes

PixelSet mSet
 
PixelDistance::EdgeWeightFunction mWeightFnc
 
QSharedPointer< PixelConnectormConnector
 
- Protected Attributes inherited from rdf::Module
QSharedPointer< ModuleConfigmConfig
 

Detailed Description

The base class for all graphcuts operating on pixels.

See also
Module

Constructor & Destructor Documentation

rdf::GraphCutPixel::GraphCutPixel ( const PixelSet set)

Member Function Documentation

QSharedPointer< GraphCutConfig > rdf::GraphCutPixel::config ( ) const
virtual cv::Mat rdf::GraphCutPixel::costs ( int  numLabels) const
protectedpure virtual

Returns a matrix with the costs for each state. The matrix must be mSet.size() x numLabels 32SC1. It contains cost values for each element given a state. Normalized costs are usually multiplied by mScaleFactor to fit the data format.

Parameters
numLabelsThe number labels.
Returns
QSharedPointer< GCoptimizationGeneralGraph > rdf::GraphCutPixel::graphCut ( const PixelGraph graph) const
protected

Performs the graphcut. The graphcut globally optimizes the pixel states w.r.t. the costs given

Parameters
graphThe pixel graph.
Returns
bool rdf::GraphCutPixel::isEmpty ( ) const
overridevirtual

Returns true if the module was initialized with the default constructor. Note, if empty is true, nothing can be computed.

Returns
Returns true if the module was initialized.

Implements rdf::Module.

virtual cv::Mat rdf::GraphCutPixel::labelDistMatrix ( int  numLabels) const
protectedpure virtual

Indicates the costs to move from one label to another. High values indicate high costs. Usually this matrix is symmetric.

Parameters
numLabelsThe number labels.
Returns
A numLabels x numLabels 32SC1 matrix.
int rdf::GraphCutPixel::numLabels ( ) const
protectedpure virtual
PixelSet rdf::GraphCutPixel::set ( ) const

Member Data Documentation

QSharedPointer<PixelConnector> rdf::GraphCutPixel::mConnector
protected
PixelSet rdf::GraphCutPixel::mSet
protected
PixelDistance::EdgeWeightFunction rdf::GraphCutPixel::mWeightFnc
protected

The documentation for this class was generated from the following files: