Data structure representing nearest neighbor patches with color histograms. More...
#include <NNClassifier.h>
Public Member Functions | |
NNPatch () | |
Default (empty) constructor. | |
NNPatch (const NNPatch ©From) | |
Copy constructor. | |
NNPatch (const Matrix &curPatch) | |
Constructor providing only a patch. | |
NNPatch (const Matrix &curPatch, const ObjectBox &bbox, const unsigned char *rgb=NULL, const int w=0, const int h=0) | |
Constructor creating the color histogram. | |
NNPatch (const ObjectBox &bbox, const Matrix &curImage, const int patchSize, const unsigned char *rgb=NULL, const int w=0, const int h=0) | |
Constructor extracting the patch and the color histogram out of the image. | |
NNPatch (std::ifstream &inputStream, const int patchSize) | |
Constructor for loading from file. | |
NNPatch & | operator= (const NNPatch ©From) |
Copy operator. | |
void | saveToStream (std::ofstream &outputStream) const |
Method for saving to file. | |
~NNPatch () | |
Destructor. | |
Public Attributes | |
float | avg |
The average of the grayscale values (to enable reconstruction) | |
float * | histogram |
A normalized color histogram or NULL if not used. | |
float | norm2 |
Saves the squared norm of the grayscale values to speed up computation later. | |
Matrix | patch |
The patch (will be normalized to zero mean) |
Data structure representing nearest neighbor patches with color histograms.
Definition at line 30 of file NNClassifier.h.
motld::NNPatch::NNPatch | ( | ) | [inline] |
Default (empty) constructor.
Definition at line 42 of file NNClassifier.h.
motld::NNPatch::NNPatch | ( | const NNPatch & | copyFrom | ) |
Copy constructor.
Definition at line 112 of file NNClassifier.h.
motld::NNPatch::NNPatch | ( | const Matrix & | curPatch | ) |
Constructor providing only a patch.
Definition at line 127 of file NNClassifier.h.
motld::NNPatch::NNPatch | ( | const Matrix & | curPatch, |
const ObjectBox & | bbox, | ||
const unsigned char * | rgb = NULL , |
||
const int | w = 0 , |
||
const int | h = 0 |
||
) |
Constructor creating the color histogram.
Definition at line 136 of file NNClassifier.h.
motld::NNPatch::NNPatch | ( | const ObjectBox & | bbox, |
const Matrix & | curImage, | ||
const int | patchSize, | ||
const unsigned char * | rgb = NULL , |
||
const int | w = 0 , |
||
const int | h = 0 |
||
) |
Constructor extracting the patch and the color histogram out of the image.
Definition at line 147 of file NNClassifier.h.
motld::NNPatch::NNPatch | ( | std::ifstream & | inputStream, |
const int | patchSize | ||
) |
Constructor for loading from file.
Definition at line 160 of file NNClassifier.h.
Destructor.
Definition at line 186 of file NNClassifier.h.
Copy operator.
Definition at line 193 of file NNClassifier.h.
void motld::NNPatch::saveToStream | ( | std::ofstream & | outputStream | ) | const |
Method for saving to file.
Definition at line 175 of file NNClassifier.h.
The average of the grayscale values (to enable reconstruction)
Definition at line 36 of file NNClassifier.h.
A normalized color histogram or NULL if not used.
Definition at line 40 of file NNClassifier.h.
Saves the squared norm of the grayscale values to speed up computation later.
Definition at line 38 of file NNClassifier.h.
The patch (will be normalized to zero mean)
Definition at line 34 of file NNClassifier.h.