tesseract
4.0.0-1-g2a2b
|
#include <intmatcher.h>
Public Member Functions | |
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) |
Static Public Attributes | |
static const int | kIntThetaFudge = 128 |
static const int | kEvidenceTableBits = 9 |
static const int | kIntEvidenceTruncBits = 14 |
static const float | kSEExponentialMultiplier = 0.0 |
static const float | kSimilarityCenter = 0.0075 |
Definition at line 83 of file intmatcher.h.
IntegerMatcher::IntegerMatcher | ( | tesseract::IntParam * | classify_debug_level | ) |
Definition at line 670 of file intmatcher.cpp.
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.
Definition at line 1195 of file intmatcher.cpp.
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.
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 |
Definition at line 618 of file intmatcher.cpp.
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:
Definition at line 549 of file intmatcher.cpp.
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:
Definition at line 470 of file intmatcher.cpp.
|
static |
Definition at line 88 of file intmatcher.h.
|
static |
Definition at line 90 of file intmatcher.h.
|
static |
Definition at line 86 of file intmatcher.h.
|
static |
Definition at line 92 of file intmatcher.h.
|
static |
Definition at line 94 of file intmatcher.h.