File tree 4 files changed +6
-9
lines changed
4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -555,7 +555,6 @@ void Classify::InitAdaptiveClassifier(TessdataManager* mgr) {
555
555
static_classifier_ = new TessClassifier (false , this );
556
556
}
557
557
558
- im_.Init (&classify_debug_level);
559
558
InitIntegerFX ();
560
559
561
560
AllProtosOn = NewBitVector (MAX_NUM_PROTOS);
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ Classify::Classify()
184
184
this ->params ()),
185
185
double_MEMBER(speckle_rating_penalty, 10.0 ,
186
186
" Penalty to add to worst rating for noise" , this ->params ()),
187
+ im_(&classify_debug_level),
187
188
shape_table_(nullptr ),
188
189
dict_(this ),
189
190
static_classifier_(nullptr ) {
Original file line number Diff line number Diff line change @@ -667,9 +667,9 @@ int IntegerMatcher::FindBadFeatures(
667
667
}
668
668
669
669
670
- void IntegerMatcher::Init (tesseract::IntParam *classify_debug_level) {
671
- classify_debug_level_ = classify_debug_level;
672
-
670
+ IntegerMatcher::IntegerMatcher (tesseract::IntParam *classify_debug_level)
671
+ : classify_debug_level_( classify_debug_level)
672
+ {
673
673
/* Initialize table for evidence to similarity lookup */
674
674
for (int i = 0 ; i < SE_TABLE_SIZE; i++) {
675
675
uint32_t IntSimilarity = i << (27 - SE_TABLE_BITS);
Original file line number Diff line number Diff line change @@ -93,9 +93,7 @@ class IntegerMatcher {
93
93
// Center of Similarity Curve.
94
94
static const float kSimilarityCenter ;
95
95
96
- IntegerMatcher () : classify_debug_level_(nullptr ) {}
97
-
98
- void Init (tesseract::IntParam *classify_debug_level);
96
+ IntegerMatcher (tesseract::IntParam *classify_debug_level);
99
97
100
98
void Match (INT_CLASS ClassTemplate,
101
99
BIT_VECTOR ProtoMask,
@@ -173,13 +171,12 @@ class IntegerMatcher {
173
171
bool SeparateDebugWindows);
174
172
#endif
175
173
176
-
177
174
private:
175
+ tesseract::IntParam *classify_debug_level_;
178
176
uint8_t similarity_evidence_table_[SE_TABLE_SIZE];
179
177
uint32_t evidence_table_mask_;
180
178
uint32_t mult_trunc_shift_bits_;
181
179
uint32_t table_trunc_shift_bits_;
182
- tesseract::IntParam *classify_debug_level_;
183
180
uint32_t evidence_mult_mask_;
184
181
};
185
182
You can’t perform that action at this time.
0 commit comments