Tesseract  3.02
tesseract-ocr/textord/tovars.cpp
Go to the documentation of this file.
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 "mfcpch.h"
00021 #include "tovars.h"
00022 #include "params.h"
00023 
00024 #define EXTERN
00025 
00026 EXTERN BOOL_VAR (textord_show_initial_words, FALSE, "Display separate words");
00027 EXTERN BOOL_VAR (textord_show_new_words, FALSE, "Display separate words");
00028 EXTERN BOOL_VAR (textord_show_fixed_words, FALSE,
00029 "Display forced fixed pitch words");
00030 EXTERN BOOL_VAR (textord_blocksall_fixed, FALSE, "Moan about prop blocks");
00031 EXTERN BOOL_VAR (textord_blocksall_prop, FALSE,
00032 "Moan about fixed pitch blocks");
00033 EXTERN BOOL_VAR (textord_blocksall_testing, FALSE, "Dump stats when moaning");
00034 EXTERN BOOL_VAR (textord_test_mode, FALSE, "Do current test");
00035 EXTERN INT_VAR (textord_dotmatrix_gap, 3,
00036 "Max pixel gap for broken pixed pitch");
00037 EXTERN INT_VAR (textord_debug_block, 0, "Block to do debug on");
00038 EXTERN INT_VAR (textord_pitch_range, 2, "Max range test on pitch");
00039 EXTERN double_VAR (textord_wordstats_smooth_factor, 0.05,
00040 "Smoothing gap stats");
00041 EXTERN double_VAR (textord_width_smooth_factor, 0.10,
00042 "Smoothing width stats");
00043 EXTERN double_VAR (textord_words_width_ile, 0.4,
00044 "Ile of blob widths for space est");
00045 EXTERN double_VAR (textord_words_maxspace, 4.0, "Multiple of xheight");
00046 EXTERN double_VAR (textord_words_default_maxspace, 3.5,
00047 "Max believable third space");
00048 EXTERN double_VAR (textord_words_default_minspace, 0.6,
00049 "Fraction of xheight");
00050 EXTERN double_VAR (textord_words_min_minspace, 0.3, "Fraction of xheight");
00051 EXTERN double_VAR (textord_words_default_nonspace, 0.2,
00052 "Fraction of xheight");
00053 EXTERN double_VAR (textord_words_initial_lower, 0.25,
00054 "Max inital cluster size");
00055 EXTERN double_VAR (textord_words_initial_upper, 0.15,
00056 "Min initial cluster spacing");
00057 EXTERN double_VAR (textord_words_minlarge, 0.75,
00058 "Fraction of valid gaps needed");
00059 EXTERN double_VAR (textord_words_pitchsd_threshold, 0.040,
00060 "Pitch sync threshold");
00061 EXTERN double_VAR (textord_words_def_fixed, 0.016,
00062 "Threshold for definite fixed");
00063 EXTERN double_VAR (textord_words_def_prop, 0.090,
00064 "Threshold for definite prop");
00065 EXTERN INT_VAR (textord_words_veto_power, 5,
00066 "Rows required to outvote a veto");
00067 EXTERN double_VAR (textord_pitch_rowsimilarity, 0.08,
00068 "Fraction of xheight for sameness");
00069 EXTERN BOOL_VAR (textord_pitch_scalebigwords, FALSE,
00070 "Scale scores on big words");
00071 EXTERN double_VAR (words_initial_lower, 0.5, "Max inital cluster size");
00072 EXTERN double_VAR (words_initial_upper, 0.15, "Min initial cluster spacing");
00073 EXTERN double_VAR (words_default_prop_nonspace, 0.25, "Fraction of xheight");
00074 EXTERN double_VAR (words_default_fixed_space, 0.75, "Fraction of xheight");
00075 EXTERN double_VAR (words_default_fixed_limit, 0.6, "Allowed size variance");
00076 EXTERN double_VAR (textord_words_definite_spread, 0.30,
00077 "Non-fuzzy spacing region");
00078 EXTERN double_VAR (textord_spacesize_ratiofp, 2.8,
00079 "Min ratio space/nonspace");
00080 EXTERN double_VAR (textord_spacesize_ratioprop, 2.0,
00081 "Min ratio space/nonspace");
00082 EXTERN double_VAR (textord_fpiqr_ratio, 1.5, "Pitch IQR/Gap IQR threshold");
00083 EXTERN double_VAR (textord_max_pitch_iqr, 0.20, "Xh fraction noise in pitch");
00084 EXTERN double_VAR (textord_fp_min_width, 0.5, "Min width of decent blobs");