MCPcopy Create free account
hub / github.com/creatale/node-dv / DisplayAdaptedChar

Method DisplayAdaptedChar

deps/tesseract/classify/adaptmatch.cpp:979–1008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

977} /* AdaptToChar */
978
979void Classify::DisplayAdaptedChar(TBLOB* blob, INT_CLASS_STRUCT* int_class) {
980#ifndef GRAPHICS_DISABLED
981 INT_FX_RESULT_STRUCT fx_info;
982 GenericVector<INT_FEATURE_STRUCT> bl_features;
983 TrainingSample* sample =
984 BlobToTrainingSample(*blob, classify_nonlinear_norm, &fx_info,
985 &bl_features);
986 if (sample == NULL) return;
987
988 UnicharRating int_result;
989 im_.Match(int_class, AllProtosOn, AllConfigsOn,
990 bl_features.size(), &bl_features[0],
991 &int_result, classify_adapt_feature_threshold,
992 NO_DEBUG, matcher_debug_separate_windows);
993 tprintf("Best match to temp config %d = %4.1f%%.\n",
994 int_result.config, int_result.rating * 100.0);
995 if (classify_learning_debug_level >= 2) {
996 uinT32 ConfigMask;
997 ConfigMask = 1 << int_result.config;
998 ShowMatchDisplay();
999 im_.Match(int_class, AllProtosOn, (BIT_VECTOR)&ConfigMask,
1000 bl_features.size(), &bl_features[0],
1001 &int_result, classify_adapt_feature_threshold,
1002 6 | 0x19, matcher_debug_separate_windows);
1003 UpdateMatchDisplay();
1004 }
1005
1006 delete sample;
1007#endif
1008}
1009
1010/**
1011 * This routine adds the result of a classification into

Callers

nothing calls this directly

Calls 4

BlobToTrainingSampleFunction · 0.85
UpdateMatchDisplayFunction · 0.85
MatchMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected