tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
19 #ifndef TESSERACT_CCSTRUCT_STATISTC_H_
20 #define TESSERACT_CCSTRUCT_STATISTC_H_
43 STATS(int32_t min_bucket_value, int32_t max_bucket_value_plus_1);
50 bool set_range(int32_t min_bucket_value, int32_t max_bucket_value_plus_1);
54 void add(int32_t value, int32_t
count);
62 double ile(
double frac)
const;
77 if (value <= rangemin_)
79 if (value >= rangemax_ - 1)
80 return buckets_[rangemax_ - rangemin_ - 1];
81 return buckets_[value - rangemin_];
94 void smooth(int32_t factor);
104 int32_t max_clusters,
123 #ifndef GRAPHICS_DISABLED
139 #endif // GRAPHICS_DISABLED
142 int32_t rangemin_ = 0;
144 int32_t rangemax_ = 0;
145 int32_t total_count_ = 0;
146 int32_t* buckets_ =
nullptr;
160 int (*compar)(
const void*,
const void*));
167 #endif // TESSERACT_CCSTRUCT_STATISTC_H_
int32_t get_total() const
int32_t min_bucket() const
void print_summary() const
int32_t choose_nth_item(int32_t index, float *array, int32_t count)
int top_n_modes(int max_modes, GenericVector< tesseract::KDPairInc< float, int > > *modes) const
void plotline(ScrollView *window, float xorigin, float yorigin, float xscale, float yscale, ScrollView::Color colour) const
int32_t max_bucket() const
int32_t pile_count(int32_t value) const
void smooth(int32_t factor)
void swap_entries(void *array, size_t size, int32_t index1, int32_t index2)
void plot(ScrollView *window, float xorigin, float yorigin, float xscale, float yscale, ScrollView::Color colour) const
double ile(double frac) const
bool local_min(int32_t x) const
void add(int32_t value, int32_t count)
int32_t cluster(float lower, float upper, float multiple, int32_t max_clusters, STATS *clusters)
bool set_range(int32_t min_bucket_value, int32_t max_bucket_value_plus_1)