tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
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 compute_page_skew(TO_BLOCK_LIST *blocks, float &page_m, float &page_err)
double textord_width_limit
double textord_ascx_ratio_max
void vigorous_noise_removal(TO_BLOCK *block)
void compute_line_occupation(TO_BLOCK *block, float gradient, int32_t min_y, int32_t max_y, int32_t *occupation, int32_t *deltas)
void pre_associate_blobs(ICOORD page_tr, TO_BLOCK *block, FCOORD rotation, bool testing_on)
int textord_lms_line_trials
double textord_spline_shift_fraction
double textord_chop_width
bool textord_quadratic_baselines
bool textord_debug_xheights
OVERLAP_STATE most_overlapping_row(TO_ROW_IT *row_it, TO_ROW *&best_row, float top, float bottom, float rowsize, bool testing_blob)
double textord_xheight_mode_fraction
double textord_xheight_error_margin
float make_single_row(ICOORD page_tr, bool allow_sub_blobs, TO_BLOCK *block, TO_BLOCK_LIST *blocks)
void compute_occupation_threshold(int32_t low_window, int32_t high_window, int32_t line_count, int32_t *occupation, int32_t *thresholds)
void make_initial_textrows(ICOORD page_tr, TO_BLOCK *block, FCOORD rotation, bool testing_on)
int32_t compute_row_descdrop(TO_ROW *row, float gradient, int xheight_blob_count, STATS *heights)
double textord_excess_blobsize
double textord_ascheight_mode_fraction
double textord_descx_ratio_max
void correct_row_xheight(TO_ROW *row, float xheight, float ascrise, float descdrop)
void fit_parallel_lms(float gradient, TO_ROW *row)
bool textord_show_parallel_rows
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)
int textord_min_blobs_in_row
void mark_repeated_chars(TO_ROW *row)
TBOX deskew_block_coords(TO_BLOCK *block, float gradient)
#define double_VAR_H(name, val, comment)
double textord_descx_ratio_min
bool textord_straight_baselines
int row_spacing_order(const void *item1, const void *item2)
bool textord_new_initial_xheight
void adjust_row_limits(TO_BLOCK *block)
ROW_CATEGORY get_row_category(const TO_ROW *row)
void fit_parallel_rows(TO_BLOCK *block, float gradient, FCOORD rotation, int32_t block_edge, bool testing_on)
void expand_rows(ICOORD page_tr, TO_BLOCK *block, float gradient, FCOORD rotation, int32_t block_edge, bool testing_on)
double textord_ascx_ratio_min
int blob_x_order(const void *item1, const void *item2)
void fill_heights(TO_ROW *row, float gradient, int min_height, int max_height, STATS *heights, STATS *floating_heights)
int compute_xheight_from_modes(STATS *heights, STATS *floating_heights, bool cap_only, int min_height, int max_height, float *xheight, float *ascrise)
int row_y_order(const void *item1, const void *item2)
bool within_error_margin(float test, float num, float margin)
bool textord_parallel_baselines
double textord_min_linesize
void assign_blobs_to_rows(TO_BLOCK *block, float *gradient, int pass, bool reject_misses, bool make_new_rows, bool drawing_skew)
void compute_row_stats(TO_BLOCK *block, bool testing_on)
UnicodeText::const_iterator::difference_type distance(const UnicodeText::const_iterator &first, const UnicodeText::const_iterator &last)
bool textord_old_baselines
#define INT_VAR_H(name, val, comment)
bool textord_test_landscape
double textord_spline_outlier_fraction
void get_min_max_xheight(int block_linesize, int *min_height, int *max_height)
bool textord_fix_makerow_bug
int textord_spline_medianwin
bool segment_baseline(TO_ROW *row, TO_BLOCK *block, int32_t &segments, int32_t *xstarts)
int textord_spline_minblobs
#define BOOL_VAR_H(name, val, comment)
float make_rows(ICOORD page_tr, TO_BLOCK_LIST *port_blocks)
bool textord_show_final_blobs
float median_block_xheight(TO_BLOCK *block, float gradient)
bool textord_show_expanded_rows
void delete_non_dropout_rows(TO_BLOCK *block, float gradient, FCOORD rotation, int32_t block_edge, bool testing_on)
void fit_lms_line(TO_ROW *row)
void compute_dropout_distances(int32_t *occupation, int32_t *thresholds, int32_t line_count)
bool textord_show_final_rows
void separate_underlines(TO_BLOCK *block, float gradient, FCOORD rotation, bool testing_on)
bool textord_cblob_blockocc
bool textord_show_initial_rows
double textord_underline_width
double textord_min_blob_height_fraction
void cleanup_rows_making(ICOORD page_tr, TO_BLOCK *block, float gradient, FCOORD rotation, int32_t block_edge, bool testing_on)
double * linear_spline_baseline(TO_ROW *row, TO_BLOCK *block, int32_t &segments, int32_t xstarts[])
bool textord_fix_xheight_bug
int32_t compute_height_modes(STATS *heights, int32_t min_height, int32_t max_height, int32_t *modes, int32_t maxmodes)
double textord_linespace_iqrlimit
void make_baseline_spline(TO_ROW *row, TO_BLOCK *block)
double textord_occupancy_threshold