diff options
author | Iliyan Malchev <malchev@google.com> | 2008-09-22 10:40:17 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2008-09-22 10:40:17 -0700 |
commit | 1f7f5efc0953d4170afaf6690ae85a52cfcff8c5 (patch) | |
tree | d25ee7797e8fe2f2fa1a5261deaa65b50b8dcf53 /classify | |
parent | fc1671c53d52f2af55c4d04d93e31348bf7a8e0e (diff) | |
download | tesseract-1f7f5efc0953d4170afaf6690ae85a52cfcff8c5.tar.gz |
add code (incomplete) to disable the integer matcher
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'classify')
-rw-r--r-- | classify/adaptmatch.cpp | 4 | ||||
-rw-r--r-- | classify/intproto.cpp | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/classify/adaptmatch.cpp b/classify/adaptmatch.cpp index e07c6a4..766170d 100644 --- a/classify/adaptmatch.cpp +++ b/classify/adaptmatch.cpp @@ -1380,6 +1380,7 @@ void Classify::MasterMatcher(INT_TEMPLATES templates, ADAPT_RESULTS* final_results) { for (int c = 0; c < num_classes; c++) { CLASS_ID class_id = results[c].Class; +#ifndef DISABLE_INTEGER_MATCHING INT_RESULT_STRUCT& int_result = results[c].IMResult; BIT_VECTOR protos = classes != NULL ? classes[class_id]->PermProtos : AllProtosOn; @@ -1406,6 +1407,9 @@ void Classify::MasterMatcher(INT_TEMPLATES templates, if (int_result.Rating > WORST_POSSIBLE_RATING) int_result.Rating = WORST_POSSIBLE_RATING; AddNewResult(final_results, class_id, int_result.Rating, int_result.Config); +#else + AddNewResult(final_results, class_id, results[c].Rating * 2, 0); +#endif } if (matcher_debug_level >= 2 || display_ratings > 1) cprintf("\n"); diff --git a/classify/intproto.cpp b/classify/intproto.cpp index 98f6688..55c950f 100644 --- a/classify/intproto.cpp +++ b/classify/intproto.cpp @@ -1100,6 +1100,7 @@ INT_TEMPLATES Classify::ReadIntTemplates(FILE *File) { } } +#ifndef DISABLE_INTEGER_MATCHING /* then read in each class */ for (i = 0; i < NumClassesIn (Templates); i++) { /* first read in the high level struct for the class */ @@ -1230,7 +1231,7 @@ INT_TEMPLATES Classify::ReadIntTemplates(FILE *File) { this->fontinfo_table_.read(File, NewPermanentCallback(read_info), swap); this->fontset_table_.read(File, NewPermanentCallback(read_set), swap); } - +#endif return (Templates); } /* ReadIntTemplates */ |