ReadFramework
rdf::WriterDatabase Class Reference

#include <WriterDatabase.h>

Public Member Functions

 WriterDatabase ()
 Initializes a new instance of the WIDatabase class. More...
 
void addFile (const QString filePath)
 Adds a file with local features representing one image to the database More...
 
void addFile (WriterImage wi)
 
void generateVocabulary ()
 Generates the vocabulary according to the type set in the vocabulary variable. If the number of PCA components is larger than 0 a PCA is applied beforehand. More...
 
void setVocabulary (const WriterVocabulary voc)
 Sets the vocabulary for this database More...
 
WriterVocabulary vocabulary () const
 returns the current vocabulary More...
 
void saveVocabulary (QString filePath)
 Calls the saveVocabulary function of the current vocabulary More...
 
void evaluateDatabase (QStringList classLabels, QStringList filePaths, QString filePath=QString())
 Evaluates the database. More...
 
void evaluateDatabase (cv::Mat hists, QStringList classLabels, QStringList filePaths, QString filePath=QString()) const
 Evaluates the database with the histograms stored in the vector hists More...
 
void writeCompetitionEvaluationFile (QStringList imageNames, QString outputPath) const
 
void writeCompetitionEvaluationFile (cv::Mat hists, QStringList imageNames, QString outputPath) const
 

Constructor & Destructor Documentation

rdf::WriterDatabase::WriterDatabase ( )

Initializes a new instance of the WIDatabase class.

Member Function Documentation

void rdf::WriterDatabase::addFile ( const QString  filePath)

Adds a file with local features representing one image to the database

Parameters
filePathThe file path.

Here is the caller graph for this function:

void rdf::WriterDatabase::addFile ( WriterImage  wi)
void rdf::WriterDatabase::evaluateDatabase ( QStringList  classLabels,
QStringList  filePaths,
QString  evalFilePath = QString() 
)

Evaluates the database.

Parameters
classLabelsThe class labels.
filePathsThe files paths of the images if needed in the evaluation output
evalFilePathIf set a csv file with the evaluation is written to the path.
void rdf::WriterDatabase::evaluateDatabase ( cv::Mat  hists,
QStringList  classLabels,
QStringList  filePaths,
QString  evalFilePath = QString() 
) const

Evaluates the database with the histograms stored in the vector hists

Parameters
histsA vector of the histograms.
classLabelsThe class labels.
filePathsThe file paths.
evalFilePathThe eval file path.
void rdf::WriterDatabase::generateVocabulary ( )

Generates the vocabulary according to the type set in the vocabulary variable. If the number of PCA components is larger than 0 a PCA is applied beforehand.

void rdf::WriterDatabase::saveVocabulary ( QString  filePath)

Calls the saveVocabulary function of the current vocabulary

Parameters
filePathThe file path.
void rdf::WriterDatabase::setVocabulary ( const WriterVocabulary  voc)

Sets the vocabulary for this database

Parameters
vocThe voc.

Here is the caller graph for this function:

WriterVocabulary rdf::WriterDatabase::vocabulary ( ) const

returns the current vocabulary

Returns
the current vocabulary
void rdf::WriterDatabase::writeCompetitionEvaluationFile ( QStringList  imageNames,
QString  outputPath 
) const

Here is the caller graph for this function:

void rdf::WriterDatabase::writeCompetitionEvaluationFile ( cv::Mat  hists,
QStringList  imageNames,
QString  outputPath 
) const

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