#include <SampleUtils.h>
Static Public Methods | |
| template<class T, class I, class C> void | readFromFile (std::string file, util::List< Sample< T, I, C > > &sampleList) throw (io::IOException&) |
| Reads a sample list form a file. | |
| template<class T, class I, class C> void | writeToFile (std::string file, const util::List< Sample< T, I, C > > &sampleList) throw (io::IOException&) |
| Write a sample list to a file. | |
| template<class T, class I, class C> void | combineSets (util::List< Sample< util::List< T >, I, C > > &combinedSet, const util::List< util::List< Sample< T, I, C > > * > &sets) throw (util::InvalidArgumentException&) |
| Combines the set to the one set. | |
| template<class T, class U> util::List< Sample< T, std::string, int > > | makeSamples (const util::Matrix< T > &mat, const util::Matrix< U > &mask, const util::List< U > &values, FeatureExtractor< int, util::Matrix< T > > &extractor, int width, int height, std::string matrixName) |
| This fuction makes samples from the Matrix mat. | |
| util::List< Sample< int, ImageSampleIdentifier, int > > | readIdsSampleSet (std::string sampleSet) throw (util::io::IOException&) |
| The fuction reads the Inspection Development System (IDS) TIP_SAMPLE_SET and TIP_DSAMPLE_SET files and converts them to the format this library undestands. | |
| util::List< Sample< int, ImageSampleIdentifier, int > > | readIdsSampleSet (std::string sampleSet, util::List< std::string > &classes, util::List< std::string > &features) throw (util::io::IOException&) |
| The fuction reads the Inspection Development System (IDS) TIP_SAMPLE_SET and TIP_DSAMPLE_SET files and converts them to the format this library undestands. | |
| template<class T, class I, class C> void | prune (util::List< Sample< T, I, C > > &samples, const util::List< int > &enabledFeatures) |
| Create a new sample set out of samples by removing all features whose index is not listed in enabledFeatures. | |
| template<class T, class I, class C> int | countClasses (const util::List< Sample< T, I, C > > &samples) |
| Returns the maximum true class index in samples plus one. | |
|
||||||||||||||||
|
Combines the set to the one set.
|
|
||||||||||||||||||||||||||||||||||||
|
This fuction makes samples from the Matrix mat. In the mask matrix there are every class marked at the specified color/grayscale. The funtion works like this first it takes the the second number from the list values (second therefore that the first place in the list is background) and then finds the same areas from the mask matrix and cuts pieces out from the Matrix mat as many as it can and then it calculates the featureVector with the extractor and the sets it to the new sample and then sets the identifier from the names list to the sample. The class given to the sample will be the same as the index in the values list. Note: If values contain value -1 it means that the class will be skipped (samples which are in that area wont be made at all.
|
|
||||||||||||||||
|
Create a new sample set out of samples by removing all features whose index is not listed in enabledFeatures.
|
|
||||||||||||||||
|
The fuction reads the Inspection Development System (IDS) TIP_SAMPLE_SET and TIP_DSAMPLE_SET files and converts them to the format this library undestands.
|
|
|
The fuction reads the Inspection Development System (IDS) TIP_SAMPLE_SET and TIP_DSAMPLE_SET files and converts them to the format this library undestands.
|