ReadFramework
|
#include <WriterDatabase.h>
Public Types | |
enum | type { WI_GMM, WI_BOW, WI_UNDEFINED } |
Returns the vocabulary type. More... | |
Public Member Functions | |
WriterVocabulary () | |
Initializes a new instance of the WIVocabulary class. More... | |
void | loadVocabulary (const QString filePath) |
Loads the vocabulary from the given file path. updates the mVocabulary path More... | |
void | saveVocabulary (const QString filePath) |
Saves the vocabulary to the given file path. updates the mVocabularyPath, thus this method is not const More... | |
cv::Mat | calcualteDistanceMatrix (cv::Mat hists) const |
Calcualtes the distance matrix of the histograms given in the RxC matrix. Depending on the type of the vocabulary either the consine distance (GMM) or the euclidean (BOW) distance is used. More... | |
bool | isEmpty () const |
Determines whether the vocabulary is empty respl. not trained. More... | |
void | setVocabulary (cv::Mat voc) |
Sets the vocabulary for BOW. More... | |
cv::Mat | vocabulary () const |
BOW vocabulary of this instance More... | |
void | setEM (cv::Ptr< cv::ml::EM > em) |
Sets the em for GMM. More... | |
cv::Ptr< cv::ml::EM > | em () const |
the EM of this instance. More... | |
void | setPcaMean (cv::Mat mean) |
Sets the mean Mat of the PCA. More... | |
cv::Mat | pcaMean () const |
Mean values of the PCA. More... | |
void | setPcaEigenvectors (cv::Mat ev) |
Sets the pca eigenvectors. More... | |
cv::Mat | pcaEigenvectors () const |
Returns the Eigenvectors of the PCA. More... | |
void | setPcaEigenvalues (cv::Mat ev) |
Sets the PCA eigenvalues More... | |
cv::Mat | pcaEigenvalues () const |
Returns the Eigenvalues of the PCA More... | |
void | setPcaWhiteMean (cv::Mat mean) |
cv::Mat | pcaWhiteMean () const |
void | setPcaWhiteEigenvectors (cv::Mat ev) |
cv::Mat | pcaWhiteEigenvectors () const |
void | setPcaWhiteEigenvalues (cv::Mat ev) |
cv::Mat | pcaWhiteEigenvalues () const |
void | setL2Mean (const cv::Mat l2mean) |
sets the mean Mat of the L2 noramlization More... | |
cv::Mat | l2Mean () const |
Returns the mean Mat of the L2 normalization More... | |
void | setL2Sigma (const cv::Mat l2sigma) |
Sets the variance of the L2 normalization. More... | |
cv::Mat | l2Sigma () const |
Returns the variance Mat of the L2 normalization More... | |
void | setHistL2Mean (const cv::Mat mean) |
Sets the l2 mean which is applied to the histograms. More... | |
cv::Mat | histL2Mean () const |
Returns the means which are applied to the histogram More... | |
void | setHistL2Sigma (const cv::Mat sigma) |
Sets the l2 mean which is applied to the features. More... | |
cv::Mat | histL2Sigma () const |
Returns the means which are applied to the features More... | |
void | setNumberOfCluster (const int number) |
Sets the number of cluster. More... | |
int | numberOfCluster () const |
Numbers of clusters. More... | |
void | setNumberOfPCA (const int number) |
Sets the number of PCA components which should be used More... | |
int | numberOfPCA () const |
Numbers the of pca. More... | |
void | setType (const int type) |
Sets the type of the vocabulary. More... | |
int | type () const |
void | setNote (QString note) |
Sets a note to the vocabulary. More... | |
void | setMinimumSIFTSize (const int size) |
Sets the minimum size for sift features, all features smaller than this size are filtered out. More... | |
int | minimumSIFTSize () const |
Returns the value of the minimum SIFT features size More... | |
void | setMaximumSIFTSize (const int size) |
Sets the maximum size for sift features, all features larger than this size are filtered out. More... | |
int | maximumSIFTSize () const |
Returns the value of the maximum SIFT features size More... | |
void | setPowerNormalization (const double power) |
Sets the power normalization for the feature vector. More... | |
double | powerNormalization () const |
Returns the factor of the power normalization used. More... | |
void | setNumOfPCAWhiteComp (const int numOfComp) |
int | numberOfPCAWhiteningComponents () const |
void | setL2Before (const bool l2before) |
Sets the L2 before flag (perform L2 normalization before generating the fisher vector). More... | |
bool | l2before () const |
Setting if a L2 normalization should be performed before generating the feature vector More... | |
QString | note () const |
Returns the note of the vocabulary. More... | |
QString | toString () const |
Creates a string with a description of the current vocabulary More... | |
QString | vocabularyPath () const |
Path of the vocabulary More... | |
cv::Mat | generateHist (cv::Mat desc) const |
Generates the histogram according to the vocabulary type More... | |
cv::Mat | applyPCA (cv::Mat desc) const |
Applies the PCA with the stored Eigenvalues and Eigenvectors of the vocabulary. More... | |
enum int rdf::WriterVocabulary::type |
rdf::WriterVocabulary::WriterVocabulary | ( | ) |
Initializes a new instance of the WIVocabulary class.
cv::Mat rdf::WriterVocabulary::applyPCA | ( | cv::Mat | desc | ) | const |
Applies the PCA with the stored Eigenvalues and Eigenvectors of the vocabulary.
desc | The desc. |
cv::Mat rdf::WriterVocabulary::calcualteDistanceMatrix | ( | cv::Mat | hists | ) | const |
Calcualtes the distance matrix of the histograms given in the RxC matrix. Depending on the type of the vocabulary either the consine distance (GMM) or the euclidean (BOW) distance is used.
hists | a matrix with the feature vectors of different images stored in the rows |
cv::Ptr< cv::ml::EM > rdf::WriterVocabulary::em | ( | ) | const |
the EM of this instance.
cv::Mat rdf::WriterVocabulary::generateHist | ( | cv::Mat | desc | ) | const |
Generates the histogram according to the vocabulary type
desc | Descriptors of an image. |
cv::Mat rdf::WriterVocabulary::histL2Mean | ( | ) | const |
Returns the means which are applied to the histogram
cv::Mat rdf::WriterVocabulary::histL2Sigma | ( | ) | const |
Returns the means which are applied to the features
bool rdf::WriterVocabulary::isEmpty | ( | ) | const |
Determines whether the vocabulary is empty respl. not trained.
bool rdf::WriterVocabulary::l2before | ( | ) | const |
Setting if a L2 normalization should be performed before generating the feature vector
cv::Mat rdf::WriterVocabulary::l2Mean | ( | ) | const |
Returns the mean Mat of the L2 normalization
cv::Mat rdf::WriterVocabulary::l2Sigma | ( | ) | const |
Returns the variance Mat of the L2 normalization
void rdf::WriterVocabulary::loadVocabulary | ( | const QString | filePath | ) |
Loads the vocabulary from the given file path. updates the mVocabulary path
filePath | The file path. |
int rdf::WriterVocabulary::maximumSIFTSize | ( | ) | const |
Returns the value of the maximum SIFT features size
int rdf::WriterVocabulary::minimumSIFTSize | ( | ) | const |
Returns the value of the minimum SIFT features size
QString rdf::WriterVocabulary::note | ( | ) | const |
Returns the note of the vocabulary.
int rdf::WriterVocabulary::numberOfCluster | ( | ) | const |
Numbers of clusters.
int rdf::WriterVocabulary::numberOfPCA | ( | ) | const |
Numbers the of pca.
int rdf::WriterVocabulary::numberOfPCAWhiteningComponents | ( | ) | const |
cv::Mat rdf::WriterVocabulary::pcaEigenvalues | ( | ) | const |
Returns the Eigenvalues of the PCA
cv::Mat rdf::WriterVocabulary::pcaEigenvectors | ( | ) | const |
Returns the Eigenvectors of the PCA.
cv::Mat rdf::WriterVocabulary::pcaMean | ( | ) | const |
Mean values of the PCA.
cv::Mat rdf::WriterVocabulary::pcaWhiteEigenvalues | ( | ) | const |
cv::Mat rdf::WriterVocabulary::pcaWhiteEigenvectors | ( | ) | const |
cv::Mat rdf::WriterVocabulary::pcaWhiteMean | ( | ) | const |
double rdf::WriterVocabulary::powerNormalization | ( | ) | const |
Returns the factor of the power normalization used.
void rdf::WriterVocabulary::saveVocabulary | ( | const QString | filePath | ) |
Saves the vocabulary to the given file path. updates the mVocabularyPath, thus this method is not const
filePath | The file path. |
void rdf::WriterVocabulary::setEM | ( | cv::Ptr< cv::ml::EM > | em | ) |
Sets the em for GMM.
em | The em. |
void rdf::WriterVocabulary::setHistL2Mean | ( | const cv::Mat | mean | ) |
Sets the l2 mean which is applied to the histograms.
mean | The mean. |
void rdf::WriterVocabulary::setHistL2Sigma | ( | const cv::Mat | sigma | ) |
Sets the l2 mean which is applied to the features.
sigma | The sigma. |
void rdf::WriterVocabulary::setL2Before | ( | const bool | l2before | ) |
Sets the L2 before flag (perform L2 normalization before generating the fisher vector).
l2before | The l2before. |
void rdf::WriterVocabulary::setL2Mean | ( | const cv::Mat | l2mean | ) |
sets the mean Mat of the L2 noramlization
l2mean | Mean Mat. |
void rdf::WriterVocabulary::setL2Sigma | ( | const cv::Mat | l2sigma | ) |
Sets the variance of the L2 normalization.
l2sigma | variance Mat. |
void rdf::WriterVocabulary::setMaximumSIFTSize | ( | const int | size | ) |
Sets the maximum size for sift features, all features larger than this size are filtered out.
size | The size. |
void rdf::WriterVocabulary::setMinimumSIFTSize | ( | const int | size | ) |
Sets the minimum size for sift features, all features smaller than this size are filtered out.
size | The minimum size in pixels. |
void rdf::WriterVocabulary::setNote | ( | QString | note | ) |
Sets a note to the vocabulary.
note | note. |
void rdf::WriterVocabulary::setNumberOfCluster | ( | const int | number | ) |
Sets the number of cluster.
number | number of clusters. |
void rdf::WriterVocabulary::setNumberOfPCA | ( | const int | number | ) |
Sets the number of PCA components which should be used
number | The number of PCA components. |
void rdf::WriterVocabulary::setNumOfPCAWhiteComp | ( | const int | numOfComp | ) |
void rdf::WriterVocabulary::setPcaEigenvalues | ( | cv::Mat | ev | ) |
Sets the PCA eigenvalues
ev | The eigenvalues |
void rdf::WriterVocabulary::setPcaEigenvectors | ( | cv::Mat | ev | ) |
Sets the pca eigenvectors.
ev | The eigenvectors |
void rdf::WriterVocabulary::setPcaMean | ( | cv::Mat | mean | ) |
Sets the mean Mat of the PCA.
mean | The mean Mat. |
void rdf::WriterVocabulary::setPcaWhiteEigenvalues | ( | cv::Mat | ev | ) |
void rdf::WriterVocabulary::setPcaWhiteEigenvectors | ( | cv::Mat | ev | ) |
void rdf::WriterVocabulary::setPcaWhiteMean | ( | cv::Mat | mean | ) |
void rdf::WriterVocabulary::setPowerNormalization | ( | const double | power | ) |
Sets the power normalization for the feature vector.
power | The power normalization factor. |
void rdf::WriterVocabulary::setType | ( | const int | type | ) |
Sets the type of the vocabulary.
type | The type. |
void rdf::WriterVocabulary::setVocabulary | ( | cv::Mat | voc | ) |
Sets the vocabulary for BOW.
voc | The voc. |
QString rdf::WriterVocabulary::toString | ( | ) | const |
Creates a string with a description of the current vocabulary
int rdf::WriterVocabulary::type | ( | ) | const |
cv::Mat rdf::WriterVocabulary::vocabulary | ( | ) | const |
BOW vocabulary of this instance
QString rdf::WriterVocabulary::vocabularyPath | ( | ) | const |
Path of the vocabulary