tesseract
3.04.00
|
#include "genericvector.h"
#include "matchdefs.h"
#include "mfoutline.h"
#include "protos.h"
#include "scrollview.h"
#include "unicharset.h"
Go to the source code of this file.
Classes | |
struct | CLASS_PRUNER_STRUCT |
struct | INT_PROTO_STRUCT |
struct | PROTO_SET_STRUCT |
struct | INT_CLASS_STRUCT |
struct | INT_TEMPLATES_STRUCT |
struct | INT_FEATURE_STRUCT |
Namespaces | |
tesseract | |
Typedefs | |
typedef struct INT_PROTO_STRUCT * | INT_PROTO |
typedef uinT32 | PROTO_PRUNER[NUM_PP_PARAMS][NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR] |
typedef struct PROTO_SET_STRUCT * | PROTO_SET |
typedef uinT32 | CONFIG_PRUNER[NUM_PP_PARAMS][NUM_PP_BUCKETS][4] |
typedef struct INT_CLASS_STRUCT * | INT_CLASS |
typedef struct INT_TEMPLATES_STRUCT * | INT_TEMPLATES |
typedef INT_FEATURE_STRUCT * | INT_FEATURE |
typedef INT_FEATURE_STRUCT | INT_FEATURE_ARRAY[MAX_NUM_INT_FEATURES] |
Enumerations | |
enum | IntmatcherDebugAction { IDA_ADAPTIVE, IDA_STATIC, IDA_SHAPE_INDEX, IDA_BOTH } |
#define ANGLE_SHIFT (0.0) |
Definition at line 39 of file intproto.h.
#define BITS_PER_CP_VECTOR (CLASSES_PER_CP * NUM_BITS_PER_CLASS) |
Definition at line 58 of file intproto.h.
#define BITS_PER_WERD static_cast<int>(8 * sizeof(uinT32)) |
Definition at line 44 of file intproto.h.
#define CLASS_PRUNER_CLASS_MASK (~(~0 << NUM_BITS_PER_CLASS)) |
Definition at line 55 of file intproto.h.
#define CLASSES_PER_CP 32 |
Definition at line 53 of file intproto.h.
#define CLASSES_PER_CP_WERD (CLASSES_PER_CP / NUM_BITS_PER_CLASS) |
Definition at line 56 of file intproto.h.
#define ClassForClassId | ( | T, | |
c | |||
) | ((T)->Class[c]) |
Definition at line 181 of file intproto.h.
#define ClassPrunersFor | ( | T | ) | ((T)->ClassPruner) |
Definition at line 182 of file intproto.h.
#define CLIP_MATCH_EVIDENCE 0x020 |
Definition at line 195 of file intproto.h.
#define ClipMatchEvidenceOn | ( | D | ) | ((D) & CLIP_MATCH_EVIDENCE) |
Definition at line 203 of file intproto.h.
#define CPrunerBitIndexFor | ( | c | ) | (((c) % CLASSES_PER_CP) % CLASSES_PER_CP_WERD) |
Definition at line 186 of file intproto.h.
#define CPrunerFor | ( | T, | |
c | |||
) | ((T)->ClassPruners[CPrunerIdFor(c)]) |
Definition at line 184 of file intproto.h.
#define CPrunerIdFor | ( | c | ) | ((c) / CLASSES_PER_CP) |
Definition at line 183 of file intproto.h.
#define CPrunerMaskFor | ( | L, | |
c | |||
) | (((L)+1) << CPrunerBitIndexFor (c) * NUM_BITS_PER_CLASS) |
Definition at line 187 of file intproto.h.
#define CPrunerWordIndexFor | ( | c | ) | (((c) % CLASSES_PER_CP) / CLASSES_PER_CP_WERD) |
Definition at line 185 of file intproto.h.
#define DISPLAY_FEATURE_MATCHES 0x002 |
Definition at line 191 of file intproto.h.
#define DISPLAY_PROTO_MATCHES 0x004 |
Definition at line 192 of file intproto.h.
#define DisplayFeatureMatchesOn | ( | D | ) | ((D) & DISPLAY_FEATURE_MATCHES) |
Definition at line 199 of file intproto.h.
#define DisplayProtoMatchesOn | ( | D | ) | ((D) & DISPLAY_PROTO_MATCHES) |
Definition at line 200 of file intproto.h.
#define IndexForProto | ( | P | ) | (P % PROTOS_PER_PROTO_SET) |
Definition at line 170 of file intproto.h.
#define INT_CHAR_NORM_RANGE 256 |
Definition at line 133 of file intproto.h.
#define LegalClassId | ( | c | ) | ((c) >= 0 && (c) <= MAX_CLASS_ID) |
Definition at line 179 of file intproto.h.
#define MatchDebuggingOn | ( | D | ) | (D) |
Definition at line 197 of file intproto.h.
#define MAX_NUM_CLASS_PRUNERS |
Definition at line 59 of file intproto.h.
#define MAX_NUM_CONFIGS 64 |
Definition at line 46 of file intproto.h.
#define MAX_NUM_INT_FEATURES 512 |
Definition at line 132 of file intproto.h.
#define MAX_NUM_PROTO_SETS (MAX_NUM_PROTOS / PROTOS_PER_PROTO_SET) |
Definition at line 49 of file intproto.h.
#define MAX_NUM_PROTOS 512 |
Definition at line 47 of file intproto.h.
#define MAX_PROTO_INDEX 24 |
Definition at line 43 of file intproto.h.
#define MaxNumClassesIn | ( | T | ) | (T->NumClassPruners * CLASSES_PER_CP) |
Definition at line 178 of file intproto.h.
#define MaxNumIntProtosIn | ( | C | ) | (C->NumProtoSets * PROTOS_PER_PROTO_SET) |
#define NUM_BITS_PER_CLASS 2 |
Definition at line 54 of file intproto.h.
#define NUM_CP_BUCKETS 24 |
Definition at line 52 of file intproto.h.
#define NUM_PP_BUCKETS 64 |
Definition at line 51 of file intproto.h.
#define NUM_PP_PARAMS 3 |
Definition at line 50 of file intproto.h.
#define PPrunerBitIndexFor | ( | I | ) | ((I) % PROTOS_PER_PP_WERD) |
Definition at line 175 of file intproto.h.
#define PPrunerMaskFor | ( | I | ) | (1 << PPrunerBitIndexFor (I)) |
Definition at line 176 of file intproto.h.
#define PPrunerWordIndexFor | ( | I | ) |
Definition at line 173 of file intproto.h.
#define PRINT_FEATURE_MATCHES 0x008 |
Definition at line 193 of file intproto.h.
#define PRINT_MATCH_SUMMARY 0x001 |
Definition at line 190 of file intproto.h.
#define PRINT_PROTO_MATCHES 0x010 |
Definition at line 194 of file intproto.h.
#define PrintFeatureMatchesOn | ( | D | ) | ((D) & PRINT_FEATURE_MATCHES) |
Definition at line 201 of file intproto.h.
#define PrintMatchSummaryOn | ( | D | ) | ((D) & PRINT_MATCH_SUMMARY) |
Definition at line 198 of file intproto.h.
#define PrintProtoMatchesOn | ( | D | ) | ((D) & PRINT_PROTO_MATCHES) |
Definition at line 202 of file intproto.h.
#define ProtoForProtoId | ( | C, | |
P | |||
) |
Definition at line 171 of file intproto.h.
#define PROTOS_PER_PP_WERD BITS_PER_WERD |
Definition at line 57 of file intproto.h.
#define PROTOS_PER_PROTO_SET 64 |
Definition at line 48 of file intproto.h.
#define PRUNER_ANGLE 2 |
Definition at line 36 of file intproto.h.
#define PRUNER_X 0 |
Definition at line 34 of file intproto.h.
#define PRUNER_Y 1 |
Definition at line 35 of file intproto.h.
#define SetForProto | ( | P | ) | (P / PROTOS_PER_PROTO_SET) |
Definition at line 169 of file intproto.h.
#define UnusedClassIdIn | ( | T, | |
c | |||
) | ((T)->Class[c] == NULL) |
Definition at line 180 of file intproto.h.
#define WERDS_PER_CONFIG_VEC |
Definition at line 68 of file intproto.h.
#define WERDS_PER_CP |
Definition at line 66 of file intproto.h.
#define WERDS_PER_CP_VECTOR (BITS_PER_CP_VECTOR / BITS_PER_WERD) |
Definition at line 61 of file intproto.h.
#define WERDS_PER_PP |
Definition at line 64 of file intproto.h.
#define WERDS_PER_PP_VECTOR |
Definition at line 62 of file intproto.h.
#define X_SHIFT (0.5) |
Definition at line 40 of file intproto.h.
#define Y_SHIFT (0.5) |
Definition at line 41 of file intproto.h.
typedef uinT32 CONFIG_PRUNER[NUM_PP_PARAMS][NUM_PP_BUCKETS][4] |
Definition at line 103 of file intproto.h.
typedef struct INT_CLASS_STRUCT * INT_CLASS |
typedef INT_FEATURE_STRUCT* INT_FEATURE |
Definition at line 153 of file intproto.h.
typedef INT_FEATURE_STRUCT INT_FEATURE_ARRAY[MAX_NUM_INT_FEATURES] |
Definition at line 155 of file intproto.h.
typedef struct INT_PROTO_STRUCT * INT_PROTO |
typedef struct INT_TEMPLATES_STRUCT * INT_TEMPLATES |
typedef uinT32 PROTO_PRUNER[NUM_PP_PARAMS][NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR] |
Definition at line 92 of file intproto.h.
typedef struct PROTO_SET_STRUCT * PROTO_SET |
Enumerator | |
---|---|
IDA_ADAPTIVE | |
IDA_STATIC | |
IDA_SHAPE_INDEX | |
IDA_BOTH |
Definition at line 157 of file intproto.h.
void AddIntClass | ( | INT_TEMPLATES | Templates, |
CLASS_ID | ClassId, | ||
INT_CLASS | Class | ||
) |
This routine adds a new class structure to a set of templates. Classes have to be added to Templates in the order of increasing ClassIds.
Templates | templates to add new class to |
ClassId | class id to associate new class with |
Class | class data structure to add to templates |
Globals: none
Definition at line 241 of file intproto.cpp.
int AddIntConfig | ( | INT_CLASS | Class | ) |
This routine returns the index of the next free config in Class.
Class | class to add new configuration to |
Globals: none
Definition at line 274 of file intproto.cpp.
int AddIntProto | ( | INT_CLASS | Class | ) |
This routine allocates the next free proto in Class and returns its index.
Class | class to add new proto to |
Globals: none
Definition at line 298 of file intproto.cpp.
void AddProtoToClassPruner | ( | PROTO | Proto, |
CLASS_ID | ClassId, | ||
INT_TEMPLATES | Templates | ||
) |
Definition at line 337 of file intproto.cpp.
Definition at line 381 of file intproto.cpp.
Definition at line 449 of file intproto.cpp.
Definition at line 445 of file intproto.cpp.
Definition at line 458 of file intproto.cpp.
void ConvertConfig | ( | BIT_VECTOR | Config, |
int | ConfigId, | ||
INT_CLASS | Class | ||
) |
Definition at line 484 of file intproto.cpp.
ScrollView* CreateFeatureSpaceWindow | ( | const char * | name, |
int | xpos, | ||
int | ypos | ||
) |
Definition at line 1976 of file intproto.cpp.
void DisplayIntFeature | ( | const INT_FEATURE_STRUCT * | Feature, |
FLOAT32 | Evidence | ||
) |
Definition at line 628 of file intproto.cpp.
Definition at line 650 of file intproto.cpp.
void free_int_templates | ( | INT_TEMPLATES | templates | ) |
Definition at line 764 of file intproto.cpp.
void InitFeatureDisplayWindowIfReqd | ( | ) |
Initializes the feature display window if it is not already initialized.
Definition at line 1967 of file intproto.cpp.
void InitIntMatchWindowIfReqd | ( | ) |
Initializes the int matcher window if it is not already initialized.
Definition at line 1935 of file intproto.cpp.
void InitProtoDisplayWindowIfReqd | ( | ) |
Initializes the proto display window if it is not already initialized.
Definition at line 1956 of file intproto.cpp.
INT_CLASS NewIntClass | ( | int | MaxNumProtos, |
int | MaxNumConfigs | ||
) |
Definition at line 673 of file intproto.cpp.
INT_TEMPLATES NewIntTemplates | ( | ) |
Definition at line 739 of file intproto.cpp.
void RenderIntFeature | ( | ScrollView * | window, |
const INT_FEATURE_STRUCT * | Feature, | ||
ScrollView::Color | color | ||
) |
Definition at line 1808 of file intproto.cpp.
void ShowMatchDisplay | ( | ) |
void UpdateMatchDisplay | ( | ) |
Definition at line 466 of file intproto.cpp.