1 #ifndef _LASRCOSFEATUREVECTOR_ 2 #define _LASRCOSFEATUREVECTOR_ 36 using namespace KKMLL;
41 #ifndef _FEATURENUMLIST_ 86 void CentroidCol (
float _centroidCol) {centroidCol = _centroidCol;}
87 void CentroidRow (
float _centroidRow) {centroidRow = _centroidRow;}
108 #define _GrayScaleImagesFV_Defined_ 254 float _minSize = -1.0f
279 const KKStr& rootDir,
299 FeatureVectorList::const_iterator idx;
328 return (
const GrayScaleImagesFVPtr)*idx;
356 return idx != right.idx;
374 return idx == right.idx;
398 FeatureVectorList::iterator idx;
420 return (GrayScaleImagesFVPtr)*idx;
431 return idx != right.idx;
436 return idx == right.idx;
447 void FeatureExtraction (FactoryFVProducerPtr _fvProducerFactory,
461 #define _GrayScaleImagesFVList_Defined_ GrayScaleImagesFV(const GrayScaleImagesFV &_fv)
GrayScaleImagesFVList(FileDescPtr _fileDesc, bool _owner)
iterator(const iterator &idx)
GrayScaleImagesFVListPtr StratifyAmoungstClasses(kkint32 numOfFolds, RunLog &log)
const_iterator & operator++(int x)
const_iterator(const const_iterator &ivConst_Iterator)
iterator & operator=(const iterator &right)
GrayScaleImagesFVListPtr ExtractDuplicatesByRootImageFileName()
GrayScaleImagesFVList(const FeatureVectorList &featureVectorList, bool _owner)
Creates a duplicate List of examples, in the same order, and depending on '_owner' will create new in...
GrayScaleImagesFVPtr PopFromBack()
void AddQueue(GrayScaleImagesFVList &imagesToAdd)
Keeps track of selected features.
GrayScaleImagesFVPtr LookUpByImageFileName(const KKStr &_imageFileName) const
GrayScaleImagesFVList(MLClassList &_mlClasses, GrayScaleImagesFVList &_examples)
constructor that will create a list of examples from _examples that are assigned one of the classes l...
float CentroidRow() const
GrayScaleImagesFVPtr LookUpByRootName(const KKStr &_rootName)
GrayScaleImagesFVList(const GrayScaleImagesFVList &_examples, bool _owner)
Creates a duplicate List of examples, in the same order, and depending on '_owner' will create new in...
float CentroidCol() const
GrayScaleImagesFV(const FeatureVector &featureVector)
Smart copy constructor that will detect the underlying type of the source instance.
GrayScaleImagesFV * GrayScaleImagesFVPtr
virtual GrayScaleImagesFVListPtr ManufactureEmptyList(bool _owner) const
Creates an instance of a Empty FeatureVectorList.
bool operator==(const const_iterator &right) const
virtual GrayScaleImagesFVListPtr DuplicateListAndContents() const
Creates a duplicate of list and also duplicates it contents.
Container class for FeatureVector derived objects.
GrayScaleImagesFVList(FactoryFVProducerPtr _fvProducerFactory, MLClassPtr _mlClass, KKStr _dirName, KKStr _fileName, RunLog &_log)
Constructor that will extract a list of feature vectors for all the image files in the specified dire...
RasterList * RasterListPtr
bool operator==(const FeatureVectorList::iterator &right) const
GrayScaleImagesFVPtr BinarySearchByName(const KKStr &_imageFileName) const
Specialized version of KKMLL::FeatureVector that will be used to represent the features of a Shrimp...
FeatureNumList * FeatureNumListPtr
iterator & operator++(int x)
bool operator!=(const const_iterator &right) const
void CentroidCol(float _centroidCol)
unsigned char uchar
Unsigned character.
GrayScaleImagesFVPtr BackOfQueue()
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
void CentroidRow(float _centroidRow)
const_iterator & operator=(const const_iterator &right)
void NumOfEdgePixels(kkint32 _numOfEdgePixels)
GrayScaleImagesFVPtr operator*()
GrayScaleImagesFVListPtr OrderUsingNamesFromAFile(const KKStr &fileName, RunLog &log)
Using list of ImageFileNames in a file('fileName') create a new GrayScaleImagesFVList instance with e...
virtual ~GrayScaleImagesFVList()
virtual ~GrayScaleImagesFV()
GrayScaleImagesFV(kkint32 _numOfFeatures)
GrayScaleImagesFVListPtr ExtractExamplesForAGivenClass(MLClassPtr _mlClass, kkint32 _maxToExtract=-1, float _minSize=-1.0f) const
Used for logging messages.
void EncodeProblem(const struct svm_paramater ¶m, struct svm_problem &prob_in, struct svm_problem &prob_out)
MLClassList * MLClassListPtr
GrayScaleImagesFVList * GrayScaleImagesFVListPtr
virtual GrayScaleImagesFVPtr Duplicate() const
iterator(const FeatureVectorList::iterator &idx)
virtual GrayScaleImagesFVListPtr Duplicate(bool _owner) const
Creates a duplicate of list using the same container.
kkint32 NumOfEdgePixels() const
Maintains a list of MLClass instances.
Represents a Feature Vector of a single example, labeled or unlabeled.
GrayScaleImagesFVPtr IdxToPtr(kkint32 idx) const
const GrayScaleImagesFVPtr operator*()
bool operator!=(const iterator &right) const
GrayScaleImagesFVList(const FeatureVectorList &featureVectorList)
bool operator==(const iterator &right) const
GrayScaleImagesFVListPtr StratifyAmoungstClasses(MLClassListPtr mlClasses, kkint32 maxImagesPerClass, kkint32 numOfFolds, RunLog &log)
void RecalcFeatureValuesFromImagesInDirTree(FactoryFVProducerPtr fvProducerFactory, const KKStr &rootDir, bool &successful, RunLog &log)