tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
21 #ifndef TESSERACT_CLASSIFY_INTFEATUREMAP_H_
22 #define TESSERACT_CLASSIFY_INTFEATUREMAP_H_
33 static const int kNumOffsetMaps = 2;
55 return feature_space_.
Size();
61 return feature_space_;
117 return feature_map_.
MapFeatures(index_features, map_features);
138 int ComputeOffsetFeature(
int index_feature,
int dir)
const;
141 bool mapping_changed_;
153 int* offset_plus_[kNumOffsetMaps];
154 int* offset_minus_[kNumOffsetMaps];
163 #endif // TESSERACT_CLASSIFY_INTFEATUREMAP_H_
void DebugMapFeatures(const GenericVector< int > &map_features) const
void IndexAndSortFeatures(const INT_FEATURE_STRUCT *features, int num_features, GenericVector< int > *sorted_features) const
void DeleteMapFeature(int map_feature)
int MapFeatures(const GenericVector< int > &sparse, GenericVector< int > *compact) const
void IndexAndSortFeatures(const INT_FEATURE_STRUCT *features, int num_features, GenericVector< int > *sorted_features) const
int FinalizeMapping(SampleIterator *it)
int FindNZFeatureMapping(SampleIterator *it)
const IndexMapBiDi & feature_map() const
void Init(const IntFeatureSpace &feature_space)
INT_FEATURE_STRUCT InverseIndexFeature(int index_feature) const
int OffsetFeature(int index_feature, int dir) const
INT_FEATURE_STRUCT InverseMapFeature(int map_feature) const
bool IsMapFeatureDeleted(int map_feature) const
const IntFeatureSpace & feature_space() const
int IndexFeature(const INT_FEATURE_STRUCT &f) const
int MapFeature(const INT_FEATURE_STRUCT &f) const
int MapIndexedFeatures(const GenericVector< int > &index_features, GenericVector< int > *map_features) const
int MapIndexFeature(int index_feature) const