45 "Display row accumulation");
47 "Display page correlated rows");
49 "Display rows after expanding");
51 "Display rows after final fitting");
53 "Display blob bounds after pre-ass");
56 "Force parallel baselines");
58 "Force straight baselines");
60 "Use quadratic splines");
65 "Prevent multiple baselines");
67 "Use new projection for underlines");
72 "Min blobs before gradient counted");
74 "Min blobs in each spline segment");
76 "Size of window for spline segmentation");
79 "Fraction of line spacing for quad");
81 "Fraction of line spacing for outlier");
84 "Lag for skew on row accumulation");
86 "Max iqr/median for linespace");
88 "Max width of blobs to make rows");
91 "fraction of linesize for min xheight");
93 "* blob height for initial linesize");
95 "New row made if blob makes row this big");
97 "Fraction of neighbourhood");
99 "Multiple of line_size for underline");
101 "Min blob height/top to include blob top into xheight stats");
103 "Min pile height to make xheight");
105 "Min pile height to make ascheight");
113 "Use test xheight mechanism");
117 int *min_height,
int *max_height) {
120 *max_height =
static_cast<inT32>(ceil(block_linesize * 3.0));
130 return (test >= num * (1 - margin) && test <= num * (1 + margin));
134 int max_height,
STATS *heights,
STATS *floating_heights);
137 TO_BLOCK_LIST* blocks);
139 TO_BLOCK_LIST *port_blocks);
215 STATS *heights,
STATS *floating_heights,
bool cap_only,
int min_height,
216 int max_height,
float *xheight,
float *ascrise);
220 int xheight_blob_count,
double textord_descx_ratio_max
int row_y_order(const void *item1, const void *item2)
bool textord_old_baselines
int compute_xheight_from_modes(STATS *heights, STATS *floating_heights, bool cap_only, int min_height, int max_height, float *xheight, float *ascrise)
int textord_min_blobs_in_row
void mark_repeated_chars(TO_ROW *row)
double textord_min_blob_height_fraction
bool textord_cblob_blockocc
inT32 compute_row_descdrop(TO_ROW *row, float gradient, int xheight_blob_count, STATS *heights)
double textord_min_linesize
bool textord_new_initial_xheight
void fill_heights(TO_ROW *row, float gradient, int min_height, int max_height, STATS *heights, STATS *floating_heights)
bool textord_parallel_baselines
bool within_error_margin(float test, float num, float margin)
void assign_blobs_to_rows(TO_BLOCK *block, float *gradient, int pass, BOOL8 reject_misses, BOOL8 make_new_rows, BOOL8 drawing_skew)
inT32 compute_height_modes(STATS *heights, inT32 min_height, inT32 max_height, inT32 *modes, inT32 maxmodes)
void expand_rows(ICOORD page_tr, TO_BLOCK *block, float gradient, FCOORD rotation, inT32 block_edge, BOOL8 testing_on)
bool textord_show_final_blobs
double textord_linespace_iqrlimit
void compute_dropout_distances(inT32 *occupation, inT32 *thresholds, inT32 line_count)
void delete_non_dropout_rows(TO_BLOCK *block, float gradient, FCOORD rotation, inT32 block_edge, BOOL8 testing_on)
#define INT_VAR_H(name, val, comment)
void adjust_row_limits(TO_BLOCK *block)
void compute_occupation_threshold(inT32 low_window, inT32 high_window, inT32 line_count, inT32 *occupation, inT32 *thresholds)
TBOX deskew_block_coords(TO_BLOCK *block, float gradient)
bool textord_fix_makerow_bug
void get_min_max_xheight(int block_linesize, int *min_height, int *max_height)
bool textord_show_expanded_rows
bool textord_show_initial_rows
void pre_associate_blobs(ICOORD page_tr, TO_BLOCK *block, FCOORD rotation, BOOL8 testing_on)
double textord_ascx_ratio_min
void compute_line_occupation(TO_BLOCK *block, float gradient, inT32 min_y, inT32 max_y, inT32 *occupation, inT32 *deltas)
void fit_parallel_lms(float gradient, TO_ROW *row)
double textord_chop_width
void make_initial_textrows(ICOORD page_tr, TO_BLOCK *block, FCOORD rotation, BOOL8 testing_on)
double textord_descx_ratio_min
int blob_x_order(const void *item1, const void *item2)
void fit_lms_line(TO_ROW *row)
BOOL8 find_best_dropout_row(TO_ROW *row, inT32 distance, float dist_limit, inT32 line_index, TO_ROW_IT *row_it, BOOL8 testing_on)
int textord_spline_medianwin
double textord_spline_outlier_fraction
float make_rows(ICOORD page_tr, TO_BLOCK_LIST *port_blocks)
double textord_xheight_mode_fraction
float make_single_row(ICOORD page_tr, bool allow_sub_blobs, TO_BLOCK *block, TO_BLOCK_LIST *blocks)
bool textord_fix_xheight_bug
void separate_underlines(TO_BLOCK *block, float gradient, FCOORD rotation, BOOL8 testing_on)
BOOL8 segment_baseline(TO_ROW *row, TO_BLOCK *block, inT32 &segments, inT32 xstarts[])
double textord_ascx_ratio_max
void vigorous_noise_removal(TO_BLOCK *block)
double textord_occupancy_threshold
double textord_underline_width
bool textord_test_landscape
int textord_lms_line_trials
double textord_spline_shift_fraction
bool textord_straight_baselines
int row_spacing_order(const void *item1, const void *item2)
double textord_xheight_error_margin
#define double_VAR_H(name, val, comment)
bool textord_debug_xheights
void cleanup_rows_making(ICOORD page_tr, TO_BLOCK *block, float gradient, FCOORD rotation, inT32 block_edge, BOOL8 testing_on)
void compute_page_skew(TO_BLOCK_LIST *blocks, float &page_m, float &page_err)
void make_baseline_spline(TO_ROW *row, TO_BLOCK *block)
void correct_row_xheight(TO_ROW *row, float xheight, float ascrise, float descdrop)
bool textord_show_parallel_rows
double * linear_spline_baseline(TO_ROW *row, TO_BLOCK *block, inT32 &segments, inT32 xstarts[])
double textord_excess_blobsize
bool textord_quadratic_baselines
double textord_width_limit
void compute_row_stats(TO_BLOCK *block, BOOL8 testing_on)
int textord_spline_minblobs
OVERLAP_STATE most_overlapping_row(TO_ROW_IT *row_it, TO_ROW *&best_row, float top, float bottom, float rowsize, BOOL8 testing_blob)
ROW_CATEGORY get_row_category(const TO_ROW *row)
bool textord_show_final_rows
#define BOOL_VAR_H(name, val, comment)
float median_block_xheight(TO_BLOCK *block, float gradient)
void fit_parallel_rows(TO_BLOCK *block, float gradient, FCOORD rotation, inT32 block_edge, BOOL8 testing_on)
double textord_ascheight_mode_fraction