#include <intmatcher.h>
|
| IntegerMatcher (tesseract::IntParam *classify_debug_level) |
|
void | Match (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, int16_t NumFeatures, const INT_FEATURE_STRUCT *Features, tesseract::UnicharRating *Result, int AdaptFeatureThreshold, int Debug, bool SeparateDebugWindows) |
|
float | ApplyCNCorrection (float rating, int blob_length, int normalization_factor, int matcher_multiplier) |
|
int | FindGoodProtos (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, uint16_t BlobLength, int16_t NumFeatures, INT_FEATURE_ARRAY Features, PROTO_ID *ProtoArray, int AdaptProtoThreshold, int Debug) |
|
int | FindBadFeatures (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, uint16_t BlobLength, int16_t NumFeatures, INT_FEATURE_ARRAY Features, FEATURE_ID *FeatureArray, int AdaptFeatureThreshold, int Debug) |
|
|
int | UpdateTablesForFeature (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, int FeatureNum, const INT_FEATURE_STRUCT *Feature, ScratchEvidence *evidence, int Debug) |
|
int | FindBestMatch (INT_CLASS ClassTemplate, const ScratchEvidence &tables, tesseract::UnicharRating *Result) |
|
void | DebugFeatureProtoError (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, const ScratchEvidence &tables, int16_t NumFeatures, int Debug) |
|
void | DisplayProtoDebugInfo (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, const ScratchEvidence &tables, bool SeparateDebugWindows) |
|
void | DisplayFeatureDebugInfo (INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, BIT_VECTOR ConfigMask, int16_t NumFeatures, const INT_FEATURE_STRUCT *Features, int AdaptFeatureThreshold, int Debug, bool SeparateDebugWindows) |
|
◆ IntegerMatcher()
◆ ApplyCNCorrection()
float IntegerMatcher::ApplyCNCorrection |
( |
float |
rating, |
|
|
int |
blob_length, |
|
|
int |
normalization_factor, |
|
|
int |
matcher_multiplier |
|
) |
| |
Applies the CN normalization factor to the given rating and returns the modified rating.
◆ DebugFeatureProtoError()
void IntegerMatcher::DebugFeatureProtoError |
( |
INT_CLASS |
ClassTemplate, |
|
|
BIT_VECTOR |
ProtoMask, |
|
|
BIT_VECTOR |
ConfigMask, |
|
|
const ScratchEvidence & |
tables, |
|
|
int16_t |
NumFeatures, |
|
|
int |
Debug |
|
) |
| |
|
private |
Print debugging information for Configurations
- Returns
- none
◆ DisplayFeatureDebugInfo()
void IntegerMatcher::DisplayFeatureDebugInfo |
( |
INT_CLASS |
ClassTemplate, |
|
|
BIT_VECTOR |
ProtoMask, |
|
|
BIT_VECTOR |
ConfigMask, |
|
|
int16_t |
NumFeatures, |
|
|
const INT_FEATURE_STRUCT * |
Features, |
|
|
int |
AdaptFeatureThreshold, |
|
|
int |
Debug, |
|
|
bool |
SeparateDebugWindows |
|
) |
| |
|
private |
◆ DisplayProtoDebugInfo()
void IntegerMatcher::DisplayProtoDebugInfo |
( |
INT_CLASS |
ClassTemplate, |
|
|
BIT_VECTOR |
ProtoMask, |
|
|
BIT_VECTOR |
ConfigMask, |
|
|
const ScratchEvidence & |
tables, |
|
|
bool |
SeparateDebugWindows |
|
) |
| |
|
private |
◆ FindBadFeatures()
int IntegerMatcher::FindBadFeatures |
( |
INT_CLASS |
ClassTemplate, |
|
|
BIT_VECTOR |
ProtoMask, |
|
|
BIT_VECTOR |
ConfigMask, |
|
|
uint16_t |
BlobLength, |
|
|
int16_t |
NumFeatures, |
|
|
INT_FEATURE_ARRAY |
Features, |
|
|
FEATURE_ID * |
FeatureArray, |
|
|
int |
AdaptFeatureThreshold, |
|
|
int |
Debug |
|
) |
| |
FindBadFeatures finds all features with maximum feature-evidence < AdaptFeatureThresh. The list is ordered by increasing feature number.
- Parameters
-
ClassTemplate | Prototypes & tables for a class |
ProtoMask | AND Mask for proto word |
ConfigMask | AND Mask for config word |
BlobLength | Length of unormalized blob |
NumFeatures | Number of features in blob |
Features | Array of features |
FeatureArray | Array of bad features |
AdaptFeatureThreshold | Threshold for bad features |
Debug | Debugger flag: 1=debugger on |
- Returns
- Number of bad features in FeatureArray.
◆ FindBestMatch()
Find the best match for the current class and update the Result with the configuration and match rating.
- Returns
- The best normalized sum of evidences
◆ FindGoodProtos()
int IntegerMatcher::FindGoodProtos |
( |
INT_CLASS |
ClassTemplate, |
|
|
BIT_VECTOR |
ProtoMask, |
|
|
BIT_VECTOR |
ConfigMask, |
|
|
uint16_t |
BlobLength, |
|
|
int16_t |
NumFeatures, |
|
|
INT_FEATURE_ARRAY |
Features, |
|
|
PROTO_ID * |
ProtoArray, |
|
|
int |
AdaptProtoThreshold, |
|
|
int |
Debug |
|
) |
| |
FindGoodProtos finds all protos whose normalized proto-evidence exceed classify_adapt_proto_thresh. The list is ordered by increasing proto id number.
Globals:
- local_matcher_multiplier_ Normalization factor multiplier param ClassTemplate Prototypes & tables for a class param ProtoMask AND Mask for proto word param ConfigMask AND Mask for config word param BlobLength Length of unormalized blob param NumFeatures Number of features in blob param Features Array of features param ProtoArray Array of good protos param AdaptProtoThreshold Threshold for good protos param Debug Debugger flag: 1=debugger on
- Returns
- Number of good protos in ProtoArray.
◆ Match()
void IntegerMatcher::Match |
( |
INT_CLASS |
ClassTemplate, |
|
|
BIT_VECTOR |
ProtoMask, |
|
|
BIT_VECTOR |
ConfigMask, |
|
|
int16_t |
NumFeatures, |
|
|
const INT_FEATURE_STRUCT * |
Features, |
|
|
tesseract::UnicharRating * |
Result, |
|
|
int |
AdaptFeatureThreshold, |
|
|
int |
Debug, |
|
|
bool |
SeparateDebugWindows |
|
) |
| |
IntegerMatcher returns the best configuration and rating for a single class. The class matched against is determined by the uniqueness of the ClassTemplate parameter. The best rating and its associated configuration are returned.
Globals:
- local_matcher_multiplier_ Normalization factor multiplier param ClassTemplate Prototypes & tables for a class param BlobLength Length of unormalized blob param NumFeatures Number of features in blob param Features Array of features param NormalizationFactor Fudge factor from blob normalization process param Result Class rating & configuration: (0.0 -> 1.0), 0=bad, 1=good param Debug Debugger flag: 1=debugger on
- Returns
- none
◆ UpdateTablesForFeature()
For the given feature: prune protos, compute evidence, update Feature Evidence, Proto Evidence, and Sum of Feature Evidence tables.
- Parameters
-
ClassTemplate | Prototypes & tables for a class |
FeatureNum | Current feature number (for DEBUG only) |
Feature | Pointer to a feature struct |
tables | Evidence tables |
Debug | Debugger flag: 1=debugger on |
- Returns
- none
◆ classify_debug_level_
◆ evidence_mult_mask_
uint32_t IntegerMatcher::evidence_mult_mask_ |
|
private |
◆ evidence_table_mask_
uint32_t IntegerMatcher::evidence_table_mask_ |
|
private |
◆ kEvidenceTableBits
const int IntegerMatcher::kEvidenceTableBits = 9 |
|
static |
◆ kIntEvidenceTruncBits
const int IntegerMatcher::kIntEvidenceTruncBits = 14 |
|
static |
◆ kIntThetaFudge
const int IntegerMatcher::kIntThetaFudge = 128 |
|
static |
◆ kSEExponentialMultiplier
const float IntegerMatcher::kSEExponentialMultiplier = 0.0 |
|
static |
◆ kSimilarityCenter
const float IntegerMatcher::kSimilarityCenter = 0.0075 |
|
static |
◆ mult_trunc_shift_bits_
uint32_t IntegerMatcher::mult_trunc_shift_bits_ |
|
private |
◆ similarity_evidence_table_
uint8_t IntegerMatcher::similarity_evidence_table_[512] |
|
private |
◆ table_trunc_shift_bits_
uint32_t IntegerMatcher::table_trunc_shift_bits_ |
|
private |
The documentation for this class was generated from the following files:
- /home/stephane/src/tesseract/src/classify/intmatcher.h
- /home/stephane/src/tesseract/src/classify/intmatcher.cpp