ReadFramework
rdf::SuperPixelLabeler Class Reference

Converts GT information to label images. This class is used to assign a GT label to each SuperPixel computed in an image. More...

#include <SuperPixelTrainer.h>

Inheritance diagram for rdf::SuperPixelLabeler:
Collaboration diagram for rdf::SuperPixelLabeler:

Public Member Functions

 SuperPixelLabeler (const QVector< QSharedPointer< MserBlob > > &blobs, const Rect &imgRect)
 
 SuperPixelLabeler (const PixelSet &set, const Rect &imgRect)
 
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...
 
bool compute () override
 Runs the algorithm implemented by the module. More...
 
QSharedPointer< SuperPixelLabelerConfigconfig () const
 
cv::Mat draw (const cv::Mat &img, bool drawPixels=true) const
 
QString toString () const override
 Converts the module's parameters and results to a string. More...
 
void setFilePath (const QString &filePath)
 Parses the filePath for GT labels. If a label is found, the background of label image is set to the GT label. More...
 
void setRootRegion (const QSharedPointer< RootRegion > &region)
 
void setLabelManager (const LabelManager &manager)
 
void setPage (const QSharedPointer< PageElement > &page)
 
QImage createLabelImage (const Rect &imgRect, bool visualize=false) 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 void setConfig (QSharedPointer< ModuleConfig > config)
 
QSharedPointer< ModuleConfigconfig () const
 

Additional Inherited Members

- Protected Member Functions inherited from rdf::Module
QString debugName () const
 
- Protected Attributes inherited from rdf::Module
QSharedPointer< ModuleConfigmConfig
 

Detailed Description

Converts GT information to label images. This class is used to assign a GT label to each SuperPixel computed in an image.

See also
Module

Constructor & Destructor Documentation

rdf::SuperPixelLabeler::SuperPixelLabeler ( const QVector< QSharedPointer< MserBlob > > &  blobs,
const Rect imgRect 
)
rdf::SuperPixelLabeler::SuperPixelLabeler ( const PixelSet set,
const Rect imgRect 
)

Member Function Documentation

bool rdf::SuperPixelLabeler::compute ( )
overridevirtual

Runs the algorithm implemented by the module.

Returns
True on success.

Implements rdf::Module.

QSharedPointer< SuperPixelLabelerConfig > rdf::SuperPixelLabeler::config ( ) const
QImage rdf::SuperPixelLabeler::createLabelImage ( const Rect imgRect,
bool  visualize = false 
) const
cv::Mat rdf::SuperPixelLabeler::draw ( const cv::Mat &  img,
bool  drawPixels = true 
) const

Here is the caller graph for this function:

bool rdf::SuperPixelLabeler::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.

PixelSet rdf::SuperPixelLabeler::set ( ) const
void rdf::SuperPixelLabeler::setFilePath ( const QString &  filePath)

Parses the filePath for GT labels. If a label is found, the background of label image is set to the GT label.

Parameters
filePathThe file path.
void rdf::SuperPixelLabeler::setLabelManager ( const LabelManager manager)

Here is the caller graph for this function:

void rdf::SuperPixelLabeler::setPage ( const QSharedPointer< PageElement > &  page)
void rdf::SuperPixelLabeler::setRootRegion ( const QSharedPointer< RootRegion > &  region)
QString rdf::SuperPixelLabeler::toString ( ) const
overridevirtual

Converts the module's parameters and results to a string.

Returns
The string containing all parameters and results of the module.

Reimplemented from rdf::Module.


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