tesseract
3.03
|
00001 /********************************************************************** 00002 * File: tovars.cpp (Formerly to_vars.c) 00003 * Description: Variables used by textord. 00004 * Author: Ray Smith 00005 * Created: Tue Aug 24 16:55:02 BST 1993 00006 * 00007 * (C) Copyright 1993, Hewlett-Packard Ltd. 00008 ** Licensed under the Apache License, Version 2.0 (the "License"); 00009 ** you may not use this file except in compliance with the License. 00010 ** You may obtain a copy of the License at 00011 ** http://www.apache.org/licenses/LICENSE-2.0 00012 ** Unless required by applicable law or agreed to in writing, software 00013 ** distributed under the License is distributed on an "AS IS" BASIS, 00014 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 ** See the License for the specific language governing permissions and 00016 ** limitations under the License. 00017 * 00018 **********************************************************************/ 00019 00020 #include "tovars.h" 00021 #include "params.h" 00022 00023 #define EXTERN 00024 00025 EXTERN BOOL_VAR (textord_show_initial_words, FALSE, "Display separate words"); 00026 EXTERN BOOL_VAR (textord_show_new_words, FALSE, "Display separate words"); 00027 EXTERN BOOL_VAR (textord_show_fixed_words, FALSE, 00028 "Display forced fixed pitch words"); 00029 EXTERN BOOL_VAR (textord_blocksall_fixed, FALSE, "Moan about prop blocks"); 00030 EXTERN BOOL_VAR (textord_blocksall_prop, FALSE, 00031 "Moan about fixed pitch blocks"); 00032 EXTERN BOOL_VAR (textord_blocksall_testing, FALSE, "Dump stats when moaning"); 00033 EXTERN BOOL_VAR (textord_test_mode, FALSE, "Do current test"); 00034 EXTERN INT_VAR (textord_dotmatrix_gap, 3, 00035 "Max pixel gap for broken pixed pitch"); 00036 EXTERN INT_VAR (textord_debug_block, 0, "Block to do debug on"); 00037 EXTERN INT_VAR (textord_pitch_range, 2, "Max range test on pitch"); 00038 EXTERN double_VAR (textord_wordstats_smooth_factor, 0.05, 00039 "Smoothing gap stats"); 00040 EXTERN double_VAR (textord_width_smooth_factor, 0.10, 00041 "Smoothing width stats"); 00042 EXTERN double_VAR (textord_words_width_ile, 0.4, 00043 "Ile of blob widths for space est"); 00044 EXTERN double_VAR (textord_words_maxspace, 4.0, "Multiple of xheight"); 00045 EXTERN double_VAR (textord_words_default_maxspace, 3.5, 00046 "Max believable third space"); 00047 EXTERN double_VAR (textord_words_default_minspace, 0.6, 00048 "Fraction of xheight"); 00049 EXTERN double_VAR (textord_words_min_minspace, 0.3, "Fraction of xheight"); 00050 EXTERN double_VAR (textord_words_default_nonspace, 0.2, 00051 "Fraction of xheight"); 00052 EXTERN double_VAR (textord_words_initial_lower, 0.25, 00053 "Max inital cluster size"); 00054 EXTERN double_VAR (textord_words_initial_upper, 0.15, 00055 "Min initial cluster spacing"); 00056 EXTERN double_VAR (textord_words_minlarge, 0.75, 00057 "Fraction of valid gaps needed"); 00058 EXTERN double_VAR (textord_words_pitchsd_threshold, 0.040, 00059 "Pitch sync threshold"); 00060 EXTERN double_VAR (textord_words_def_fixed, 0.016, 00061 "Threshold for definite fixed"); 00062 EXTERN double_VAR (textord_words_def_prop, 0.090, 00063 "Threshold for definite prop"); 00064 EXTERN INT_VAR (textord_words_veto_power, 5, 00065 "Rows required to outvote a veto"); 00066 EXTERN double_VAR (textord_pitch_rowsimilarity, 0.08, 00067 "Fraction of xheight for sameness"); 00068 EXTERN BOOL_VAR (textord_pitch_scalebigwords, FALSE, 00069 "Scale scores on big words"); 00070 EXTERN double_VAR (words_initial_lower, 0.5, "Max inital cluster size"); 00071 EXTERN double_VAR (words_initial_upper, 0.15, "Min initial cluster spacing"); 00072 EXTERN double_VAR (words_default_prop_nonspace, 0.25, "Fraction of xheight"); 00073 EXTERN double_VAR (words_default_fixed_space, 0.75, "Fraction of xheight"); 00074 EXTERN double_VAR (words_default_fixed_limit, 0.6, "Allowed size variance"); 00075 EXTERN double_VAR (textord_words_definite_spread, 0.30, 00076 "Non-fuzzy spacing region"); 00077 EXTERN double_VAR (textord_spacesize_ratiofp, 2.8, 00078 "Min ratio space/nonspace"); 00079 EXTERN double_VAR (textord_spacesize_ratioprop, 2.0, 00080 "Min ratio space/nonspace"); 00081 EXTERN double_VAR (textord_fpiqr_ratio, 1.5, "Pitch IQR/Gap IQR threshold"); 00082 EXTERN double_VAR (textord_max_pitch_iqr, 0.20, "Xh fraction noise in pitch"); 00083 EXTERN double_VAR (textord_fp_min_width, 0.5, "Min width of decent blobs");