#include "intmatcher.h"#include "intproto.h"#include "tordvars.h"#include "callcpp.h"#include "scrollview.h"#include "globals.h"#include "classify.h"#include <math.h>Namespaces | |
| namespace | tesseract |
Defines | |
| #define | CLASS_MASK_SIZE |
| #define | SE_TABLE_BITS 9 |
| #define | SE_TABLE_SIZE 512 |
| #define | TEMPLATE_CACHE 2 |
Functions | |
| void | IntegerMatcher (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, uinT16 BlobLength, inT16 NumFeatures, INT_FEATURE_ARRAY Features, uinT8 NormalizationFactor, INT_RESULT Result, int Debug) |
| int | FindGoodProtos (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, uinT16 BlobLength, inT16 NumFeatures, INT_FEATURE_ARRAY Features, PROTO_ID *ProtoArray, int Debug) |
| int | FindBadFeatures (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, uinT16 BlobLength, inT16 NumFeatures, INT_FEATURE_ARRAY Features, FEATURE_ID *FeatureArray, int Debug) |
| void | InitIntegerMatcher () |
| void | PrintIntMatcherStats (FILE *f) |
| void | SetProtoThresh (FLOAT32 Threshold) |
| void | SetFeatureThresh (FLOAT32 Threshold) |
| void | SetBaseLineMatch () |
| void | SetCharNormMatch () |
| void | IMClearTables (INT_CLASS ClassTemplate, int SumOfFeatureEvidence[MAX_NUM_CONFIGS], uinT8 ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX]) |
| void | IMClearFeatureEvidenceTable (uinT8 FeatureEvidence[MAX_NUM_CONFIGS], int NumConfigs) |
| void | IMDebugConfiguration (int FeatureNum, uinT16 ActualProtoNum, uinT8 Evidence, BIT_VECTOR ConfigMask, uinT32 ConfigWord) |
| void | IMDebugConfigurationSum (int FeatureNum, uinT8 *FeatureEvidence, inT32 ConfigCount) |
| int | IMUpdateTablesForFeature (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, int FeatureNum, INT_FEATURE Feature, uinT8 FeatureEvidence[MAX_NUM_CONFIGS], int SumOfFeatureEvidence[MAX_NUM_CONFIGS], uinT8 ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX], int Debug) |
| void | IMDebugFeatureProtoError (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, int SumOfFeatureEvidence[MAX_NUM_CONFIGS], uinT8 ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX], inT16 NumFeatures, int Debug) |
| void | IMDisplayProtoDebugInfo (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, uinT8 ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX], int Debug) |
| void | IMDisplayFeatureDebugInfo (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, inT16 NumFeatures, INT_FEATURE_ARRAY Features, int Debug) |
| void | IMUpdateSumOfProtoEvidences (INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask, int SumOfFeatureEvidence[MAX_NUM_CONFIGS], uinT8 ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX], inT16 NumFeatures) |
| void | IMNormalizeSumOfEvidences (INT_CLASS ClassTemplate, int SumOfFeatureEvidence[MAX_NUM_CONFIGS], inT16 NumFeatures, inT32 used_features) |
| int | IMFindBestMatch (INT_CLASS ClassTemplate, int SumOfFeatureEvidence[MAX_NUM_CONFIGS], uinT16 BlobLength, uinT8 NormalizationFactor, INT_RESULT Result) |
| void | IMDebugBestMatch (int BestMatch, INT_RESULT Result, uinT16 BlobLength, uinT8 NormalizationFactor) |
| void | HeapSort (int n, register int ra[], register int rb[]) |
Variables | |
| uinT32 | EvidenceMultMask |
| int | classify_class_pruner_threshold = 229 |
| int | classify_class_pruner_multiplier = 30 |
| int | classify_integer_matcher_multiplier = 14 |
| int | classify_int_theta_fudge = 128 |
| int | classify_cp_cutoff_strength = 7 |
| int | classify_evidence_table_bits = 9 |
| int | classify_int_evidence_trunc_bits = 14 |
| double | classify_se_exponential_multiplier = 0 |
| double | classify_similarity_center = 0.0075 |
| int | classify_adapt_proto_thresh = 230 |
| int | classify_adapt_feature_thresh = 230 |
| bool | disable_character_fragments = FALSE |
| bool | matcher_debug_separate_windows = FALSE |
| int | protoword_lookups |
| int | zero_protowords |
| int | proto_shifts |
| int | set_proto_bits |
| int | config_shifts |
| int | set_config_bits |
| #define CLASS_MASK_SIZE |
---------------------------------------------------------------------------- Include Files and Type Defines ----------------------------------------------------------------------------
| #define SE_TABLE_BITS 9 |
---------------------------------------------------------------------------- Global Data Definitions and Declarations ----------------------------------------------------------------------------
| #define SE_TABLE_SIZE 512 |
| #define TEMPLATE_CACHE 2 |
| int FindBadFeatures | ( | INT_CLASS | ClassTemplate, | |
| BIT_VECTOR | ProtoMask, | |||
| BIT_VECTOR | ConfigMask, | |||
| uinT16 | BlobLength, | |||
| inT16 | NumFeatures, | |||
| INT_FEATURE_ARRAY | Features, | |||
| FEATURE_ID * | FeatureArray, | |||
| int | Debug | |||
| ) |
| int FindGoodProtos | ( | INT_CLASS | ClassTemplate, | |
| BIT_VECTOR | ProtoMask, | |||
| BIT_VECTOR | ConfigMask, | |||
| uinT16 | BlobLength, | |||
| inT16 | NumFeatures, | |||
| INT_FEATURE_ARRAY | Features, | |||
| PROTO_ID * | ProtoArray, | |||
| int | Debug | |||
| ) |
| void HeapSort | ( | int | n, | |
| register int | ra[], | |||
| register int | rb[] | |||
| ) |
| void IMClearFeatureEvidenceTable | ( | uinT8 | FeatureEvidence[MAX_NUM_CONFIGS], | |
| int | NumConfigs | |||
| ) |
| void IMClearTables | ( | INT_CLASS | ClassTemplate, | |
| int | SumOfFeatureEvidence[MAX_NUM_CONFIGS], | |||
| uinT8 | ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX] | |||
| ) |
---------------------------------------------------------------------------- Private Code ----------------------------------------------------------------------------
| void IMDebugBestMatch | ( | int | BestMatch, | |
| INT_RESULT | Result, | |||
| uinT16 | BlobLength, | |||
| uinT8 | NormalizationFactor | |||
| ) |
| void IMDebugConfiguration | ( | int | FeatureNum, | |
| uinT16 | ActualProtoNum, | |||
| uinT8 | Evidence, | |||
| BIT_VECTOR | ConfigMask, | |||
| uinT32 | ConfigWord | |||
| ) |
| void IMDebugFeatureProtoError | ( | INT_CLASS | ClassTemplate, | |
| BIT_VECTOR | ProtoMask, | |||
| BIT_VECTOR | ConfigMask, | |||
| int | SumOfFeatureEvidence[MAX_NUM_CONFIGS], | |||
| uinT8 | ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX], | |||
| inT16 | NumFeatures, | |||
| int | Debug | |||
| ) |
| void IMDisplayFeatureDebugInfo | ( | INT_CLASS | ClassTemplate, | |
| BIT_VECTOR | ProtoMask, | |||
| BIT_VECTOR | ConfigMask, | |||
| inT16 | NumFeatures, | |||
| INT_FEATURE_ARRAY | Features, | |||
| int | Debug | |||
| ) |
| void IMDisplayProtoDebugInfo | ( | INT_CLASS | ClassTemplate, | |
| BIT_VECTOR | ProtoMask, | |||
| BIT_VECTOR | ConfigMask, | |||
| uinT8 | ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX], | |||
| int | Debug | |||
| ) |
| int IMFindBestMatch | ( | INT_CLASS | ClassTemplate, | |
| int | SumOfFeatureEvidence[MAX_NUM_CONFIGS], | |||
| uinT16 | BlobLength, | |||
| uinT8 | NormalizationFactor, | |||
| INT_RESULT | Result | |||
| ) |
| void IMNormalizeSumOfEvidences | ( | INT_CLASS | ClassTemplate, | |
| int | SumOfFeatureEvidence[MAX_NUM_CONFIGS], | |||
| inT16 | NumFeatures, | |||
| inT32 | used_features | |||
| ) |
| void IMUpdateSumOfProtoEvidences | ( | INT_CLASS | ClassTemplate, | |
| BIT_VECTOR | ConfigMask, | |||
| int | SumOfFeatureEvidence[MAX_NUM_CONFIGS], | |||
| uinT8 | ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX], | |||
| inT16 | NumFeatures | |||
| ) |
| int IMUpdateTablesForFeature | ( | INT_CLASS | ClassTemplate, | |
| BIT_VECTOR | ProtoMask, | |||
| BIT_VECTOR | ConfigMask, | |||
| int | FeatureNum, | |||
| INT_FEATURE | Feature, | |||
| uinT8 | FeatureEvidence[MAX_NUM_CONFIGS], | |||
| int | SumOfFeatureEvidence[MAX_NUM_CONFIGS], | |||
| uinT8 | ProtoEvidence[MAX_NUM_PROTOS][MAX_PROTO_INDEX], | |||
| int | Debug | |||
| ) |
| void InitIntegerMatcher | ( | ) |
| void IntegerMatcher | ( | INT_CLASS | ClassTemplate, | |
| BIT_VECTOR | ProtoMask, | |||
| BIT_VECTOR | ConfigMask, | |||
| uinT16 | BlobLength, | |||
| inT16 | NumFeatures, | |||
| INT_FEATURE_ARRAY | Features, | |||
| uinT8 | NormalizationFactor, | |||
| INT_RESULT | Result, | |||
| int | Debug | |||
| ) |
---------------------------------------------------------------------------- Public Function Prototypes ----------------------------------------------------------------------------
| void PrintIntMatcherStats | ( | FILE * | f | ) |
| void SetBaseLineMatch | ( | ) |
| void SetCharNormMatch | ( | ) |
| void SetFeatureThresh | ( | FLOAT32 | Threshold | ) |
| void SetProtoThresh | ( | FLOAT32 | Threshold | ) |
| int classify_adapt_feature_thresh = 230 |
"Threshold for good features during adaptive 0-255: "
| int classify_adapt_proto_thresh = 230 |
"Threshold for good protos during adaptive 0-255: "
| int classify_class_pruner_multiplier = 30 |
"Class Pruner Multiplier 0-255: "
| int classify_class_pruner_threshold = 229 |
"Class Pruner Threshold 0-255: "
| int classify_cp_cutoff_strength = 7 |
"Class Pruner CutoffStrength: "
| int classify_evidence_table_bits = 9 |
"Bits in Similarity to Evidence Lookup 8-9: "
| int classify_int_evidence_trunc_bits = 14 |
"Integer Evidence Truncation Bits (Distance) 8-14: "
| int classify_int_theta_fudge = 128 |
"Integer Matcher Theta Fudge 0-255: "
| int classify_integer_matcher_multiplier = 14 |
"Integer Matcher Multiplier 0-255: "
| double classify_se_exponential_multiplier = 0 |
"Similarity to Evidence Table Exponential Multiplier: "
| double classify_similarity_center = 0.0075 |
"Center of Similarity Curve: "
| int config_shifts |
| bool disable_character_fragments = FALSE |
"Do not include character fragments in the" " results of the classifier"
---------------------------------------------------------------------------- Global Data Definitions and Declarations ----------------------------------------------------------------------------
| bool matcher_debug_separate_windows = FALSE |
"Use two different windows for debugging the matching: " "One for the protos and one for the features."
| int proto_shifts |
| int set_config_bits |
| int set_proto_bits |
| int zero_protowords |
1.6.3