diff options
-rwxr-xr-x | Android.mk | 1 | ||||
-rw-r--r-- | classify/adaptmatch.cpp | 4 | ||||
-rw-r--r-- | classify/intproto.cpp | 3 |
3 files changed, 7 insertions, 1 deletions
@@ -299,6 +299,7 @@ LOCAL_C_INCLUDES+= \ system/tesseract/dict LOCAL_CFLAGS:=-DGRAPHICS_DISABLED +#LOCAL_CFLAGS+=-DDISABLE_INTEGER_MATCHING LOCAL_SHARED_LIBRARIES:= \ libtesseract_cc_struct \ 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 */ |