ccmain/fixxht.h

Go to the documentation of this file.
00001 
00020 #ifndef           FIXXHT_H
00021 #define           FIXXHT_H
00022 
00023 #include          "varable.h"
00024 #include          "statistc.h"
00025 #include          "pageres.h"
00026 #include          "notdll.h"
00027 
00030 extern double_VAR_H (x_ht_fraction_of_caps_ht, 0.7,
00031 "Fract of cps ht est of xht");
00032 extern double_VAR_H (x_ht_variation, 0.35,
00033 "Err band as fract of caps/xht dist");
00034 extern double_VAR_H (x_ht_sub_variation, 0.5,
00035 "Err band as fract of caps/xht dist");
00036 extern BOOL_VAR_H (rej_trial_ambigs, TRUE,
00037 "reject x-ht ambigs when under trial");
00038 extern BOOL_VAR_H (x_ht_conservative_ambigs, FALSE,
00039 "Dont rely on ambigs + maxht");
00040 extern BOOL_VAR_H (x_ht_check_est, TRUE, "Cross check estimates");
00041 extern BOOL_VAR_H (x_ht_case_flip, FALSE, "Flip or reject suspect case");
00042 extern BOOL_VAR_H (x_ht_include_dodgy_blobs, TRUE,
00043 "Include blobs with possible noise?");
00044 extern BOOL_VAR_H (x_ht_limit_flip_trials, TRUE,
00045 "Dont do trial flips when ambigs are close to xht?");
00046 extern BOOL_VAR_H (rej_use_check_block_occ, TRUE,
00047 "Analyse rejection behaviour");
00048 extern STRING_VAR_H (chs_non_ambig_caps_ht,
00049 "!#$%&()/12346789?ABDEFGHIKLNQRT[]\\bdfhkl",
00050 "Reliable ascenders");
00051 extern STRING_VAR_H (chs_x_ht, "acegmnopqrsuvwxyz", "X height chars");
00052 extern STRING_VAR_H (chs_non_ambig_x_ht, "aenqr", "reliable X height chars");
00053 extern STRING_VAR_H (chs_ambig_caps_x, "cCmMoO05sSuUvVwWxXzZ",
00054 "X ht or caps ht chars");
00055 extern STRING_VAR_H (chs_bl_ambig_caps_x, "pPyY",
00056 " Caps or descender ambigs");
00057 extern STRING_VAR_H (chs_caps_ht,
00058 "!#$%&()/0123456789?ABCDEFGHIJKLMNOPQRSTUVWXYZ[]\\bdfhkl{|}",
00059 "Ascender chars");
00060 extern STRING_VAR_H (chs_desc, "gjpqy", "Descender chars");
00061 extern STRING_VAR_H (chs_non_ambig_bl,
00062 "!#$%&01246789?ABCDEFGHIKLMNORSTUVWXYZabcdehiklmnorstuvwxz",
00063 "Reliable baseline chars");
00064 extern STRING_VAR_H (chs_odd_top, "ijt", "Chars with funny ascender region");
00065 extern STRING_VAR_H (chs_odd_bot, "()35JQ[]\\/{}|", "Chars with funny base");
00066 extern STRING_VAR_H (chs_bl,
00067 "!#$%&()/01246789?ABCDEFGHIJKLMNOPRSTUVWXYZ[]\\abcdefhiklmnorstuvwxz{}",
00068 "Baseline chars");
00069 extern STRING_VAR_H (chs_non_ambig_desc, "gq", "Reliable descender chars");
00071 void re_estimate_x_ht(                     //improve for 1 word
00072                       WERD_RES *word_res,  //word to do
00073                       float *trial_x_ht    //new match value
00074                      );
00075 void check_block_occ(WERD_RES *word_res); 
00076 char check_blob_occ(char proposed_char,
00077                     INT16 blob_ht_above_baseline,
00078                     float x_ht,
00079                     float caps_ht);
00080 float estimate_from_stats(STATS &stats); 
00081 void improve_estimate(WERD_RES *word_res,
00082                       float &est_x_ht,
00083                       float &est_caps_ht,
00084                       STATS &x_ht,
00085                       STATS &caps_ht);
00086 void reject_ambigs(  //rej any accepted xht ambig chars
00087                    WERD_RES *word);
00088                                  //xht ambig ht stats
00089 void est_ambigs(WERD_RES *word_res,
00090                 STATS &stats,
00091                 float *ambig_lc_x_est,    //xht est
00092                 float *ambig_uc_caps_est  //caps est
00093                );
00094 BOOL8 dodgy_blob(PBLOB *blob); 
00095 #endif

Generated on Wed Feb 28 19:49:07 2007 for Tesseract by  doxygen 1.5.1