|
tesseract
4.00.00dev
|
#include "params.h"#include "ocrblock.h"#include "blobs.h"#include "blobbox.h"#include "statistc.h"Go to the source code of this file.
Enumerations | |
| enum | OVERLAP_STATE { ASSIGN, REJECT, NEW_ROW } |
| enum | ROW_CATEGORY { ROW_ASCENDERS_FOUND, ROW_DESCENDERS_FOUND, ROW_UNKNOWN, ROW_INVALID } |
Functions | |
| void | get_min_max_xheight (int block_linesize, int *min_height, int *max_height) |
| ROW_CATEGORY | get_row_category (const TO_ROW *row) |
| bool | within_error_margin (float test, float num, float margin) |
| void | fill_heights (TO_ROW *row, float gradient, int min_height, int max_height, STATS *heights, STATS *floating_heights) |
| float | make_single_row (ICOORD page_tr, bool allow_sub_blobs, TO_BLOCK *block, TO_BLOCK_LIST *blocks) |
| float | make_rows (ICOORD page_tr, TO_BLOCK_LIST *port_blocks) |
| void | make_initial_textrows (ICOORD page_tr, TO_BLOCK *block, FCOORD rotation, BOOL8 testing_on) |
| void | fit_lms_line (TO_ROW *row) |
| void | compute_page_skew (TO_BLOCK_LIST *blocks, float &page_m, float &page_err) |
| void | vigorous_noise_removal (TO_BLOCK *block) |
| void | cleanup_rows_making (ICOORD page_tr, TO_BLOCK *block, float gradient, FCOORD rotation, inT32 block_edge, BOOL8 testing_on) |
| void | delete_non_dropout_rows (TO_BLOCK *block, float gradient, FCOORD rotation, inT32 block_edge, BOOL8 testing_on) |
| BOOL8 | find_best_dropout_row (TO_ROW *row, inT32 distance, float dist_limit, inT32 line_index, TO_ROW_IT *row_it, BOOL8 testing_on) |
| TBOX | deskew_block_coords (TO_BLOCK *block, float gradient) |
| void | compute_line_occupation (TO_BLOCK *block, float gradient, inT32 min_y, inT32 max_y, inT32 *occupation, inT32 *deltas) |
| void | compute_occupation_threshold (inT32 low_window, inT32 high_window, inT32 line_count, inT32 *occupation, inT32 *thresholds) |
| void | compute_dropout_distances (inT32 *occupation, inT32 *thresholds, inT32 line_count) |
| void | expand_rows (ICOORD page_tr, TO_BLOCK *block, float gradient, FCOORD rotation, inT32 block_edge, BOOL8 testing_on) |
| void | adjust_row_limits (TO_BLOCK *block) |
| void | compute_row_stats (TO_BLOCK *block, BOOL8 testing_on) |
| float | median_block_xheight (TO_BLOCK *block, float gradient) |
| int | compute_xheight_from_modes (STATS *heights, STATS *floating_heights, bool cap_only, int min_height, int max_height, float *xheight, float *ascrise) |
| inT32 | compute_row_descdrop (TO_ROW *row, float gradient, int xheight_blob_count, STATS *heights) |
| inT32 | compute_height_modes (STATS *heights, inT32 min_height, inT32 max_height, inT32 *modes, inT32 maxmodes) |
| void | correct_row_xheight (TO_ROW *row, float xheight, float ascrise, float descdrop) |
| void | separate_underlines (TO_BLOCK *block, float gradient, FCOORD rotation, BOOL8 testing_on) |
| void | pre_associate_blobs (ICOORD page_tr, TO_BLOCK *block, FCOORD rotation, BOOL8 testing_on) |
| void | fit_parallel_rows (TO_BLOCK *block, float gradient, FCOORD rotation, inT32 block_edge, BOOL8 testing_on) |
| void | fit_parallel_lms (float gradient, TO_ROW *row) |
| void | make_baseline_spline (TO_ROW *row, TO_BLOCK *block) |
| BOOL8 | segment_baseline (TO_ROW *row, TO_BLOCK *block, inT32 &segments, inT32 xstarts[]) |
| double * | linear_spline_baseline (TO_ROW *row, TO_BLOCK *block, inT32 &segments, inT32 xstarts[]) |
| void | assign_blobs_to_rows (TO_BLOCK *block, float *gradient, int pass, BOOL8 reject_misses, BOOL8 make_new_rows, BOOL8 drawing_skew) |
| OVERLAP_STATE | most_overlapping_row (TO_ROW_IT *row_it, TO_ROW *&best_row, float top, float bottom, float rowsize, BOOL8 testing_blob) |
| int | blob_x_order (const void *item1, const void *item2) |
| int | row_y_order (const void *item1, const void *item2) |
| int | row_spacing_order (const void *item1, const void *item2) |
| void | mark_repeated_chars (TO_ROW *row) |
| enum OVERLAP_STATE |
| Enumerator | |
|---|---|
| ASSIGN | |
| REJECT | |
| NEW_ROW | |
| enum ROW_CATEGORY |
| Enumerator | |
|---|---|
| ROW_ASCENDERS_FOUND | |
| ROW_DESCENDERS_FOUND | |
| ROW_UNKNOWN | |
| ROW_INVALID | |
| void adjust_row_limits | ( | TO_BLOCK * | block | ) |
adjust_row_limits
Change the limits of rows to suit the default fractions.
Definition at line 1120 of file makerow.cpp.
| void assign_blobs_to_rows | ( | TO_BLOCK * | block, |
| float * | gradient, | ||
| int | pass, | ||
| BOOL8 | reject_misses, | ||
| BOOL8 | make_new_rows, | ||
| BOOL8 | drawing_skew | ||
| ) |
Definition at line 2296 of file makerow.cpp.
| int blob_x_order | ( | const void * | item1, |
| const void * | item2 | ||
| ) |
Definition at line 2591 of file makerow.cpp.
| void cleanup_rows_making | ( | ICOORD | page_tr, |
| TO_BLOCK * | block, | ||
| float | gradient, | ||
| FCOORD | rotation, | ||
| inT32 | block_edge, | ||
| BOOL8 | testing_on | ||
| ) |
cleanup_rows_making
Remove overlapping rows and fit all the blobs to what's left.
Definition at line 524 of file makerow.cpp.
Definition at line 915 of file makerow.cpp.
| inT32 compute_height_modes | ( | STATS * | heights, |
| inT32 | min_height, | ||
| inT32 | max_height, | ||
| inT32 * | modes, | ||
| inT32 | maxmodes | ||
| ) |
Definition at line 1640 of file makerow.cpp.
| void compute_line_occupation | ( | TO_BLOCK * | block, |
| float | gradient, | ||
| inT32 | min_y, | ||
| inT32 | max_y, | ||
| inT32 * | occupation, | ||
| inT32 * | deltas | ||
| ) |
Definition at line 781 of file makerow.cpp.
| void compute_occupation_threshold | ( | inT32 | low_window, |
| inT32 | high_window, | ||
| inT32 | line_count, | ||
| inT32 * | occupation, | ||
| inT32 * | thresholds | ||
| ) |
compute_occupation_threshold
Compute thresholds for textline or not for the occupation array.
Definition at line 834 of file makerow.cpp.
| void compute_page_skew | ( | TO_BLOCK_LIST * | blocks, |
| float & | page_m, | ||
| float & | page_err | ||
| ) |
Definition at line 287 of file makerow.cpp.
| inT32 compute_row_descdrop | ( | TO_ROW * | row, |
| float | gradient, | ||
| int | xheight_blob_count, | ||
| STATS * | heights | ||
| ) |
Definition at line 1580 of file makerow.cpp.
Definition at line 1156 of file makerow.cpp.
| int compute_xheight_from_modes | ( | STATS * | heights, |
| STATS * | floating_heights, | ||
| bool | cap_only, | ||
| int | min_height, | ||
| int | max_height, | ||
| float * | xheight, | ||
| float * | ascrise | ||
| ) |
Definition at line 1484 of file makerow.cpp.
| void correct_row_xheight | ( | TO_ROW * | row, |
| float | xheight, | ||
| float | ascrise, | ||
| float | descdrop | ||
| ) |
Definition at line 1702 of file makerow.cpp.
| void delete_non_dropout_rows | ( | TO_BLOCK * | block, |
| float | gradient, | ||
| FCOORD | rotation, | ||
| inT32 | block_edge, | ||
| BOOL8 | testing_on | ||
| ) |
delete_non_dropout_rows
Compute the linespacing and offset.
Definition at line 577 of file makerow.cpp.
Definition at line 745 of file makerow.cpp.
| void expand_rows | ( | ICOORD | page_tr, |
| TO_BLOCK * | block, | ||
| float | gradient, | ||
| FCOORD | rotation, | ||
| inT32 | block_edge, | ||
| BOOL8 | testing_on | ||
| ) |
Definition at line 962 of file makerow.cpp.
| void fill_heights | ( | TO_ROW * | row, |
| float | gradient, | ||
| int | min_height, | ||
| int | max_height, | ||
| STATS * | heights, | ||
| STATS * | floating_heights | ||
| ) |
Definition at line 1423 of file makerow.cpp.
| BOOL8 find_best_dropout_row | ( | TO_ROW * | row, |
| inT32 | distance, | ||
| float | dist_limit, | ||
| inT32 | line_index, | ||
| TO_ROW_IT * | row_it, | ||
| BOOL8 | testing_on | ||
| ) |
Definition at line 665 of file makerow.cpp.
| void fit_lms_line | ( | TO_ROW * | row | ) |
Definition at line 267 of file makerow.cpp.
| void fit_parallel_lms | ( | float | gradient, |
| TO_ROW * | row | ||
| ) |
Definition at line 1990 of file makerow.cpp.
| void fit_parallel_rows | ( | TO_BLOCK * | block, |
| float | gradient, | ||
| FCOORD | rotation, | ||
| inT32 | block_edge, | ||
| BOOL8 | testing_on | ||
| ) |
Definition at line 1948 of file makerow.cpp.
|
inline |
| double* linear_spline_baseline | ( | TO_ROW * | row, |
| TO_BLOCK * | block, | ||
| inT32 & | segments, | ||
| inT32 | xstarts[] | ||
| ) |
Definition at line 2205 of file makerow.cpp.
Definition at line 2073 of file makerow.cpp.
Definition at line 227 of file makerow.cpp.
| float make_rows | ( | ICOORD | page_tr, |
| TO_BLOCK_LIST * | port_blocks | ||
| ) |
Definition at line 201 of file makerow.cpp.
| float make_single_row | ( | ICOORD | page_tr, |
| bool | allow_sub_blobs, | ||
| TO_BLOCK * | block, | ||
| TO_BLOCK_LIST * | blocks | ||
| ) |
Definition at line 164 of file makerow.cpp.
| void mark_repeated_chars | ( | TO_ROW * | row | ) |
Definition at line 2657 of file makerow.cpp.
| float median_block_xheight | ( | TO_BLOCK * | block, |
| float | gradient | ||
| ) |
| OVERLAP_STATE most_overlapping_row | ( | TO_ROW_IT * | row_it, |
| TO_ROW *& | best_row, | ||
| float | top, | ||
| float | bottom, | ||
| float | rowsize, | ||
| BOOL8 | testing_blob | ||
| ) |
Definition at line 2496 of file makerow.cpp.
Definition at line 1862 of file makerow.cpp.
| int row_spacing_order | ( | const void * | item1, |
| const void * | item2 | ||
| ) |
Definition at line 2635 of file makerow.cpp.
| int row_y_order | ( | const void * | item1, |
| const void * | item2 | ||
| ) |
Definition at line 2613 of file makerow.cpp.
Definition at line 2106 of file makerow.cpp.
Definition at line 1789 of file makerow.cpp.
| void vigorous_noise_removal | ( | TO_BLOCK * | block | ) |
Definition at line 473 of file makerow.cpp.
|
inline |
| double textord_ascheight_mode_fraction = 0.15 |
"Min pile height to make ascheight"
Definition at line 93 of file makerow.cpp.
| double textord_ascx_ratio_max = 1.7 |
"Max cap/xheight"
Definition at line 97 of file makerow.cpp.
| double textord_ascx_ratio_min = 1.2 |
"Min cap/xheight"
Definition at line 96 of file makerow.cpp.
| bool textord_cblob_blockocc = TRUE |
"Use new projection for underlines"
| double textord_chop_width = 1.5 |
"Max width before chopping"
Definition at line 78 of file makerow.cpp.
| bool textord_debug_blob = FALSE |
"Print test blob information"
Definition at line 103 of file makerow.cpp.
| bool textord_debug_xheights = FALSE |
"Test xheight algorithms"
Definition at line 57 of file makerow.cpp.
| double textord_descx_ratio_max = 0.6 |
"Max desc/xheight"
Definition at line 99 of file makerow.cpp.
| double textord_descx_ratio_min = 0.15 |
"Min desc/xheight"
Definition at line 98 of file makerow.cpp.
| double textord_excess_blobsize = 1.3 |
"New row made if blob makes row this big"
Definition at line 85 of file makerow.cpp.
| bool textord_fix_makerow_bug = TRUE |
"Prevent multiple baselines"
Definition at line 56 of file makerow.cpp.
| bool textord_fix_xheight_bug = TRUE |
"Use spline baseline"
Definition at line 55 of file makerow.cpp.
| bool textord_heavy_nr = FALSE |
"Vigorously remove noise"
Definition at line 44 of file makerow.cpp.
| double textord_linespace_iqrlimit = 0.2 |
"Max iqr/median for linespace"
Definition at line 76 of file makerow.cpp.
| int textord_lms_line_trials = 12 |
"Number of linew fits to do"
Definition at line 101 of file makerow.cpp.
| double textord_min_blob_height_fraction = 0.75 |
"Min blob height/top to include blob top into xheight stats"
Definition at line 89 of file makerow.cpp.
| int textord_min_blobs_in_row = 4 |
"Min blobs before gradient counted"
Definition at line 64 of file makerow.cpp.
| double textord_min_linesize = 1.25 |
"* blob height for initial linesize"
Definition at line 83 of file makerow.cpp.
| int textord_min_xheight = 10 |
"Min credible pixel xheight"
Definition at line 69 of file makerow.cpp.
| double textord_minxh = 0.25 |
"fraction of linesize for min xheight"
Definition at line 82 of file makerow.cpp.
| bool textord_new_initial_xheight = TRUE |
"Use test xheight mechanism"
Definition at line 102 of file makerow.cpp.
| double textord_occupancy_threshold = 0.4 |
"Fraction of neighbourhood"
Definition at line 86 of file makerow.cpp.
| bool textord_old_baselines = TRUE |
"Use old baseline algorithm"
Definition at line 53 of file makerow.cpp.
| bool textord_old_xheight = TRUE |
"Use old xheight algorithm"
Definition at line 54 of file makerow.cpp.
| bool textord_parallel_baselines = TRUE |
"Force parallel baselines"
Definition at line 51 of file makerow.cpp.
| bool textord_quadratic_baselines = FALSE |
"Use quadratic splines"
| bool textord_show_expanded_rows = FALSE |
"Display rows after expanding"
Definition at line 47 of file makerow.cpp.
| bool textord_show_final_blobs = FALSE |
"Display blob bounds after pre-ass"
Definition at line 49 of file makerow.cpp.
| bool textord_show_final_rows = FALSE |
"Display rows after final fitting"
Definition at line 48 of file makerow.cpp.
| bool textord_show_initial_rows = FALSE |
"Display row accumulation"
Definition at line 45 of file makerow.cpp.
| bool textord_show_parallel_rows = FALSE |
"Display page correlated rows"
Definition at line 46 of file makerow.cpp.
| double textord_skew_ile = 0.5 |
"Ile of gradients for page skew"
Definition at line 74 of file makerow.cpp.
| double textord_skew_lag = 0.75 |
"Lag for skew on row accumulation"
Definition at line 75 of file makerow.cpp.
| int textord_spline_medianwin = 6 |
"Size of window for spline segmentation"
Definition at line 66 of file makerow.cpp.
| int textord_spline_minblobs = 8 |
"Min blobs in each spline segment"
Definition at line 65 of file makerow.cpp.
| double textord_spline_outlier_fraction = 0.1 |
"Fraction of line spacing for outlier"
Definition at line 73 of file makerow.cpp.
| double textord_spline_shift_fraction = 0.02 |
"Fraction of line spacing for quad"
Definition at line 71 of file makerow.cpp.
| bool textord_straight_baselines = FALSE |
"Force straight baselines"
Definition at line 52 of file makerow.cpp.
| bool textord_test_landscape = FALSE |
"Tests refer to land/port"
Definition at line 50 of file makerow.cpp.
"coord of test pt"
Definition at line 62 of file makerow.cpp.
"coord of test pt"
Definition at line 63 of file makerow.cpp.
| double textord_underline_width = 2.0 |
"Multiple of line_size for underline"
Definition at line 87 of file makerow.cpp.
| double textord_width_limit = 8 |
"Max width of blobs to make rows"
Definition at line 77 of file makerow.cpp.
| double textord_xheight_error_margin = 0.1 |
"Accepted variation"
Definition at line 100 of file makerow.cpp.
| double textord_xheight_mode_fraction = 0.4 |
"Min pile height to make xheight"
Definition at line 91 of file makerow.cpp.