dict/matchdefs.h File Reference

#include "general.h"
#include <stdio.h>

Go to the source code of this file.





Define Documentation

#define _ARGS (  )     ()

Definition at line 157 of file matchdefs.h.

#define ILLEGAL_CLASS   (-1)

Definition at line 48 of file matchdefs.h.

Referenced by NewIntTemplates().

#define IsValidFeature ( Fid   )     ((Fid) < MAX_FEATURE_ID)

all feature matchers that are to be used with the high level classifier must support the following interface. The names will, of course, be unique for each different matcher. Note also that FEATURE_STRUCT is a data structure that is defined specifically for each feature extractor/matcher pair.

void        InitClassifier();
void        InitClassifierVars();
int         TweekClassifier(char *Params);
void        InitQuickGuess(FEATURE_STRUCT *CharFeatures);
CLASS_ID    NextQuickGuess();
void        MatchCharToClass(CLASS_ID ClassID,
                             FEATURE_STRUCT *CharFeatures,
                             MATCH_RESULT *MatchResult);
void        DebugMatch(CLASS_ID ClassID,
                       FEATURE_STRUCT *CharFeatures,
                       MATCH_RESULT *MatchResult);

Definition at line 151 of file matchdefs.h.

#define IsValidProto ( Pid   )     ((Pid) >= 0)

Definition at line 152 of file matchdefs.h.

#define MAX_CLASS_ID   255

Maximum number of class_id's for any matcher

Definition at line 31 of file matchdefs.h.

Referenced by EndDangerousAmbigs(), FillAmbigTable(), FreeNormProtos(), InitMatcherRatings(), NewIntTemplates(), ReadIntTemplates(), and ReadNormProtos().

#define MAX_FEATURE_ID   250

Definition at line 86 of file matchdefs.h.

#define MAX_NUM_CLASSES   100

Maximum number of classes defined for any matcher

Definition at line 29 of file matchdefs.h.

Referenced by ClassPruner(), feature_pruner(), NewAdaptedTemplates(), NewIntTemplates(), ReadIntTemplates(), and ReadNewCutoffs().

#define MAX_NUM_FEAT   40

Definition at line 85 of file matchdefs.h.

#define MISSING_PROTO   254

Definition at line 84 of file matchdefs.h.

#define NO_CLASS   0

Definition at line 38 of file matchdefs.h.

Referenced by AdaptiveClassifier(), AdaptToPunc(), AddNewResult(), BaselineClassifier(), ClassifyAsNoise(), ComputeNormMatch(), GetAmbiguities(), and NewIntTemplates().

#define NO_FEATURE   255

Definition at line 82 of file matchdefs.h.

#define NO_PROTO   (-1)

Definition at line 72 of file matchdefs.h.

Referenced by AddIntProto(), FindClosestExistingProto(), MakeNewAdaptedClass(), MakeNewTemporaryConfig(), and MakeNewTempProtos().

#define NOISE_FEATURE   254

Definition at line 83 of file matchdefs.h.

Typedef Documentation


Type of FLOAT32, holds degree of confidence from classifier; higher is better.

Definition at line 105 of file matchdefs.h.


Type of UINT8, holds ASCII character to be associated with a class.

Definition at line 37 of file matchdefs.h.


Type of INT16, holds index of a class, not class id!

Definition at line 54 of file matchdefs.h.


Type of array of CLASS_INDEX, holding indecies of classes.

Class index'es are sequentially defined, while class id's are defined by ASCII character set

Definition at line 62 of file matchdefs.h.


Type of UINT8, holds index of a feature within a character description.

The feature id ranges from 0 to N-1 where N is the number of features in a character description.

Definition at line 81 of file matchdefs.h.


Type of array of CLASS_ID, ASCII characters to be associated with classes.

Class id's are defined by the ascii character set, while class indexes are sequentially defined

Definition at line 47 of file matchdefs.h.


Type of INT16, holds index of a prototype within its class.

Valid proto id's are 0 to N\-1 where N is the number of prototypes that make up the class.

Definition at line 71 of file matchdefs.h.


Type of FLOAT32, holds rating of match from classifier; higher is better.

Definition at line 93 of file matchdefs.h.


Type of array MATCH_RESULT, results of matches.

Definition at line 122 of file matchdefs.h.

Function Documentation

void PrintMatchResults _ARGS ( (FILE *File, int N, MATCH_RESULT MatchResults[])   ) 

void PrintMatchResult _ARGS ( (FILE *File, MATCH_RESULT *MatchResult)   ) 

int CompareMatchResults _ARGS ( (MATCH_RESULT *Result1, MATCH_RESULT *Result2)   ) 

Generated on Wed Feb 28 19:49:22 2007 for Tesseract by  doxygen 1.5.1