tesseract-doxygen/ccmain/control.cpp File Reference

#include "mfcpch.h"
#include "mainblk.h"
#include <string.h>
#include <math.h>
#include <ctype.h>
#include "ocrclass.h"
#include "werdit.h"
#include "varable.h"
#include "ocrblock.h"
#include "notdll.h"
#include "drawfx.h"
#include "hosthplb.h"
#include "tessclas.h"
#include "tessarray.h"
#include "tstruct.h"
#include "choices.h"
#include "oldlist.h"
#include "tface.h"
#include "permute.h"
#include "adaptmatch.h"
#include "blobclass.h"
#include "stopper.h"
#include "associate.h"
#include "chop.h"
#include "tordvars.h"
#include "metrics.h"
#include "badwords.h"
#include "structures.h"
#include "tessbox.h"
#include "tessvars.h"
#include "pgedit.h"
#include "reject.h"
#include "adaptions.h"
#include "charcut.h"
#include "fixxht.h"
#include "pageres.h"
#include "genblob.h"
#include "docqual.h"
#include "control.h"
#include "secname.h"
#include "callcpp.h"
#include "globals.h"
#include "tesseractclass.h"

Namespaces

namespace  tesseract

Defines

#define MIN_FONT_ROW_COUNT   8
#define MAX_XHEIGHT_DIFF   3
#define EXTERN

Functions

 CLISTIZEH (PBLOB) CLISTIZE(PBLOB) inT16 blob_count(WERD *w)
void merge_blobs (PBLOB *blob1, PBLOB *blob2)
WERDmake_bln_copy (WERD *src_word, ROW *row, BLOCK *block, float x_height, DENORM *denorm)
BOOL8 check_debug_pt (WERD_RES *word, int location)
void add_in_one_row (ROW_RES *row, STATS *fonts, inT8 *italic, inT8 *bold)
void find_modal_font (STATS *fonts, inT8 *font_out, inT8 *font_count)

Variables

bool tessedit_small_match = FALSE
EXTERN bool tessedit_print_text = FALSE
EXTERN bool tessedit_draw_words = FALSE
EXTERN bool tessedit_draw_outwords = FALSE
EXTERN bool tessedit_training_wiseowl = FALSE
EXTERN bool tessedit_training_tess = FALSE
EXTERN bool tessedit_matcher_is_wiseowl = FALSE
EXTERN bool tessedit_dump_choices = FALSE
EXTERN bool tessedit_fix_fuzzy_spaces = TRUE
EXTERN bool tessedit_unrej_any_wd = FALSE
EXTERN bool tessedit_fix_hyphens = TRUE
EXTERN bool tessedit_reject_fullstops = FALSE
EXTERN bool tessedit_reject_suspect_fullstops = FALSE
EXTERN bool tessedit_redo_xheight = TRUE
EXTERN bool tessedit_cluster_adaption_on = TRUE
EXTERN bool tessedit_enable_doc_dict = TRUE
EXTERN bool word_occ_first = FALSE
EXTERN bool tessedit_debug_fonts = FALSE
EXTERN bool tessedit_xht_fiddles_on_done_wds = TRUE
EXTERN bool tessedit_xht_fiddles_on_no_rej_wds = TRUE
EXTERN int x_ht_check_word_occ = 2
EXTERN int x_ht_stringency = 1
EXTERN bool x_ht_quality_check = TRUE
EXTERN bool tessedit_debug_block_rejection = FALSE
EXTERN int debug_x_ht_level = 0
EXTERN bool rej_use_xht = TRUE
EXTERN bool debug_acceptable_wds = FALSE
EXTERN char * chs_leading_punct = "('`\""
EXTERN char * chs_trailing_punct1 = ").,;:?!"
EXTERN char * chs_trailing_punct2 = ")'`\""
EXTERN double quality_rej_pc = 0.08
EXTERN double quality_blob_pc = 0.0
EXTERN double quality_outline_pc = 1.0
EXTERN double quality_char_pc = 0.95
EXTERN int quality_min_initial_alphas_reqd = 2
EXTERN bool tessedit_tess_adapt_to_rejmap = FALSE
EXTERN int tessedit_tess_adaption_mode = 0x27
EXTERN int tessedit_em_adaption_mode = 0
EXTERN bool tessedit_cluster_adapt_after_pass1 = FALSE
EXTERN bool tessedit_cluster_adapt_after_pass2 = FALSE
EXTERN bool tessedit_cluster_adapt_after_pass3 = FALSE
EXTERN bool tessedit_cluster_adapt_before_pass1 = FALSE
EXTERN int tessedit_cluster_adaption_mode = 0
EXTERN bool tessedit_adaption_debug = FALSE
EXTERN bool tessedit_minimal_rej_pass1 = FALSE
EXTERN bool tessedit_test_adaption = FALSE
EXTERN bool tessedit_global_adaption = FALSE
EXTERN bool tessedit_matcher_log = FALSE
EXTERN int tessedit_test_adaption_mode = 3
EXTERN bool save_best_choices = FALSE
EXTERN bool test_pt = FALSE
EXTERN double test_pt_x = 99999.99
EXTERN double test_pt_y = 99999.99
int display_ratings
int number_debug
FILE * choice_file = NULL

Define Documentation

#define EXTERN
#define MAX_XHEIGHT_DIFF   3
#define MIN_FONT_ROW_COUNT   8

Function Documentation

void add_in_one_row ( ROW_RES row,
STATS fonts,
inT8 italic,
inT8 bold 
)

good chars in word

Parameters:
row current row
fonts font stats
italic output count
bold output count
BOOL8 check_debug_pt ( WERD_RES word,
int  location 
)
CLISTIZEH ( PBLOB   ) 
void find_modal_font ( STATS fonts,
inT8 font_out,
inT8 font_count 
)

good chars in word

Parameters:
fonts font stats
font_out output font
font_count output count
WERD* make_bln_copy ( WERD src_word,
ROW row,
BLOCK block,
float  x_height,
DENORM denorm 
)
void merge_blobs ( PBLOB blob1,
PBLOB blob2 
)

combine 2 blobs

Parameters:
blob1 dest blob
blob2 source blob

Variable Documentation

FILE* choice_file = NULL
EXTERN char* chs_leading_punct = "('`\""

"Leading punctuation"

EXTERN char* chs_trailing_punct1 = ").,;:?!"

"1st Trailing punctuation"

EXTERN char* chs_trailing_punct2 = ")'`\""

"2nd Trailing punctuation"

EXTERN bool debug_acceptable_wds = FALSE

"Dump word pass/fail chk"

EXTERN int debug_x_ht_level = 0

"Reestimate debug"

EXTERN double quality_blob_pc = 0.0

"good_quality_doc gte good blobs limit"

EXTERN double quality_char_pc = 0.95

"good_quality_doc gte good char limit"

"alphas in a good word"

EXTERN double quality_outline_pc = 1.0

"good_quality_doc lte outline error limit"

EXTERN double quality_rej_pc = 0.08

"good_quality_doc lte rejection limit"

EXTERN bool rej_use_xht = TRUE

"Individual rejection control"

EXTERN bool save_best_choices = FALSE

"Save the results of the recognition step" " (blob_choices) within the corresponding WERD_CHOICE"

EXTERN bool tessedit_adaption_debug = FALSE

"Generate and print debug information for adaption"

"Adapt using clusterer after pass 1"

"Adapt using clusterer after pass 1"

"Adapt using clusterer after pass 1"

"Adapt using clusterer before Tess adaping during pass 1"

"Adaptation decision algorithm for matrix matcher"

"Do our own adaption - ems only"

"Block and Row stats"

EXTERN bool tessedit_debug_fonts = FALSE

"Output font info per char"

EXTERN bool tessedit_draw_outwords = FALSE

"Draw output words"

EXTERN bool tessedit_draw_words = FALSE

"Draw source words"

EXTERN bool tessedit_dump_choices = FALSE

"Dump char choices"

EXTERN int tessedit_em_adaption_mode = 0

"Adaptation decision algorithm for ems matrix matcher"

"Add words to the document dictionary"

"Try to improve fuzzy spaces"

"Crunch double hyphens?"

"Adapt to all docs over time"

"Call WO to classify"

EXTERN bool tessedit_matcher_log = FALSE

"Log matcher activity"

"Do minimal rejection on pass 1 output"

EXTERN bool tessedit_print_text = FALSE

"Write text to stdout"

"Check/Correct x-height"

"Reject all fullstops"

"Reject suspect fullstops"

"Use small matrix matcher"

"Use reject map to control Tesseract adaption"

EXTERN int tessedit_tess_adaption_mode = 0x27

"Adaptation decision algorithm for tess"

EXTERN bool tessedit_test_adaption = FALSE

"Test adaption criteria"

"Adaptation decision algorithm for tess"

EXTERN bool tessedit_training_tess = FALSE

"Call Tess to learn blobs"

"Call WO to learn blobs"

EXTERN bool tessedit_unrej_any_wd = FALSE

"Dont bother with word plausibility"

"Apply xht fix up even if done"

"Apply xht fix up even in no rejects"

EXTERN bool test_pt = FALSE

"Test for point"

EXTERN double test_pt_x = 99999.99

"xcoord"

EXTERN double test_pt_y = 99999.99

"ycoord"

EXTERN bool word_occ_first = FALSE

"Do word occ before re-est xht"

EXTERN int x_ht_check_word_occ = 2

"Check Char Block occupancy"

"Dont allow worse quality"

EXTERN int x_ht_stringency = 1

"How many confirmed a/n to accept?"

Generated on Sun Jul 18 17:10:48 2010 for Tesseract by  doxygen 1.6.3