20 #ifndef TESSERACT_CLASSIFY_INTFEATURESPACE_H__
21 #define TESSERACT_CLASSIFY_INTFEATURESPACE_H__
96 return Modulo(bucket, theta_buckets_);
110 #endif // TESSERACT_CLASSIFY_INTFEATURESPACE_H__
INT_FEATURE_STRUCT PositionFromIndex(int index) const
void Init(uinT8 xbuckets, uinT8 ybuckets, uinT8 thetabuckets)
const int kBoostXYBuckets
const int kBoostDirBuckets
INT_FEATURE_STRUCT PositionFromBuckets(int x, int y, int theta) const
bool DeSerialize(bool swap, FILE *fp)
void IndexAndSortFeatures(const INT_FEATURE_STRUCT *features, int num_features, GenericVector< int > *sorted_features) const
T ClipToRange(const T &x, const T &lower_bound, const T &upper_bound)
bool Serialize(FILE *fp) const
const int kIntFeatureExtent
int ThetaBucket(int theta) const
int DivRounded(int a, int b)
void IndexFeatures(const INT_FEATURE_STRUCT *features, int num_features, GenericVector< int > *mapped_features) const
int Index(const INT_FEATURE_STRUCT &f) const
int XYToFeatureIndex(int x, int y) const