44 "Display row accumulation");
46 "Display page correlated rows");
48 "Display rows after expanding");
50 "Display rows after final fitting");
52 "Display blob bounds after pre-ass");
55 "Force parallel baselines");
57 "Force straight baselines");
59 "Use quadratic splines");
64 "Prevent multiple baselines");
66 "Use new projection for underlines");
71 "Min blobs before gradient counted");
73 "Min blobs in each spline segment");
75 "Size of window for spline segmentation");
78 "Fraction of line spacing for quad");
80 "Fraction of line spacing for outlier");
83 "Lag for skew on row accumulation");
85 "Max iqr/median for linespace");
87 "Max width of blobs to make rows");
90 "fraction of linesize for min xheight");
92 "* blob height for initial linesize");
94 "New row made if blob makes row this big");
96 "Fraction of neighbourhood");
98 "Multiple of line_size for underline");
100 "Min blob height/top to include blob top into xheight stats");
102 "Min pile height to make xheight");
104 "Min pile height to make ascheight");
112 "Use test xheight mechanism");
116 int *min_height,
int *max_height) {
117 *min_height =
static_cast<int32_t
>(floor(block_linesize *
textord_minxh));
119 *max_height =
static_cast<int32_t
>(ceil(block_linesize * 3.0));
129 return (test >= num * (1 - margin) && test <= num * (1 + margin));
133 int max_height,
STATS *heights,
STATS *floating_heights);
136 TO_BLOCK_LIST* blocks);
138 TO_BLOCK_LIST *port_blocks);
214 STATS *heights,
STATS *floating_heights,
bool cap_only,
int min_height,
215 int max_height,
float *xheight,
float *ascrise);
219 int xheight_blob_count,
void assign_blobs_to_rows(TO_BLOCK *block, float *gradient, int pass, bool reject_misses, bool make_new_rows, bool drawing_skew)
TBOX deskew_block_coords(TO_BLOCK *block, float gradient)
ROW_CATEGORY get_row_category(const TO_ROW *row)
int textord_min_blobs_in_row
int blob_x_order(const void *item1, const void *item2)
#define INT_VAR_H(name, val, comment)
void expand_rows(ICOORD page_tr, TO_BLOCK *block, float gradient, FCOORD rotation, int32_t block_edge, bool testing_on)
float median_block_xheight(TO_BLOCK *block, float gradient)
bool textord_show_parallel_rows
int32_t compute_height_modes(STATS *heights, int32_t min_height, int32_t max_height, int32_t *modes, int32_t maxmodes)
void compute_line_occupation(TO_BLOCK *block, float gradient, int32_t min_y, int32_t max_y, int32_t *occupation, int32_t *deltas)
void mark_repeated_chars(TO_ROW *row)
bool textord_straight_baselines
void compute_occupation_threshold(int32_t low_window, int32_t high_window, int32_t line_count, int32_t *occupation, int32_t *thresholds)
double textord_spline_shift_fraction
int compute_xheight_from_modes(STATS *heights, STATS *floating_heights, bool cap_only, int min_height, int max_height, float *xheight, float *ascrise)
void make_initial_textrows(ICOORD page_tr, TO_BLOCK *block, FCOORD rotation, bool testing_on)
bool find_best_dropout_row(TO_ROW *row, int32_t distance, float dist_limit, int32_t line_index, TO_ROW_IT *row_it, bool testing_on)
double textord_spline_outlier_fraction
bool textord_new_initial_xheight
#define BOOL_VAR_H(name, val, comment)
double textord_linespace_iqrlimit
double textord_min_blob_height_fraction
double textord_occupancy_threshold
bool within_error_margin(float test, float num, float margin)
#define double_VAR_H(name, val, comment)
void fill_heights(TO_ROW *row, float gradient, int min_height, int max_height, STATS *heights, STATS *floating_heights)
void fit_lms_line(TO_ROW *row)
void cleanup_rows_making(ICOORD page_tr, TO_BLOCK *block, float gradient, FCOORD rotation, int32_t block_edge, bool testing_on)
bool textord_show_expanded_rows
void pre_associate_blobs(ICOORD page_tr, TO_BLOCK *block, FCOORD rotation, bool testing_on)
void adjust_row_limits(TO_BLOCK *block)
float make_rows(ICOORD page_tr, TO_BLOCK_LIST *port_blocks)
double textord_ascx_ratio_max
double textord_ascheight_mode_fraction
void vigorous_noise_removal(TO_BLOCK *block)
void compute_row_stats(TO_BLOCK *block, bool testing_on)
double textord_width_limit
bool textord_debug_xheights
bool segment_baseline(TO_ROW *row, TO_BLOCK *block, int32_t &segments, int32_t *xstarts)
void make_baseline_spline(TO_ROW *row, TO_BLOCK *block)
bool textord_quadratic_baselines
void compute_dropout_distances(int32_t *occupation, int32_t *thresholds, int32_t line_count)
void fit_parallel_lms(float gradient, TO_ROW *row)
bool textord_show_initial_rows
bool textord_parallel_baselines
double textord_underline_width
bool textord_cblob_blockocc
int textord_spline_minblobs
bool textord_fix_xheight_bug
void separate_underlines(TO_BLOCK *block, float gradient, FCOORD rotation, bool testing_on)
void get_min_max_xheight(int block_linesize, int *min_height, int *max_height)
bool textord_show_final_rows
int32_t compute_row_descdrop(TO_ROW *row, float gradient, int xheight_blob_count, STATS *heights)
double textord_excess_blobsize
bool textord_test_landscape
double textord_xheight_mode_fraction
float make_single_row(ICOORD page_tr, bool allow_sub_blobs, TO_BLOCK *block, TO_BLOCK_LIST *blocks)
void delete_non_dropout_rows(TO_BLOCK *block, float gradient, FCOORD rotation, int32_t block_edge, bool testing_on)
int row_spacing_order(const void *item1, const void *item2)
double textord_ascx_ratio_min
bool textord_old_baselines
int textord_spline_medianwin
double textord_descx_ratio_min
double textord_xheight_error_margin
void correct_row_xheight(TO_ROW *row, float xheight, float ascrise, float descdrop)
OVERLAP_STATE most_overlapping_row(TO_ROW_IT *row_it, TO_ROW *&best_row, float top, float bottom, float rowsize, bool testing_blob)
int row_y_order(const void *item1, const void *item2)
int textord_lms_line_trials
void compute_page_skew(TO_BLOCK_LIST *blocks, float &page_m, float &page_err)
void fit_parallel_rows(TO_BLOCK *block, float gradient, FCOORD rotation, int32_t block_edge, bool testing_on)
bool textord_show_final_blobs
double textord_min_linesize
double textord_descx_ratio_max
double * linear_spline_baseline(TO_ROW *row, TO_BLOCK *block, int32_t &segments, int32_t xstarts[])
double textord_chop_width
bool textord_fix_makerow_bug