tesseract  4.00.00dev
intmatcher.h File Reference
#include "params.h"
#include "intproto.h"
#include "cutoffs.h"

Go to the source code of this file.

Classes

struct  CP_RESULT_STRUCT
 
struct  ScratchEvidence
 
class  IntegerMatcher
 

Namespaces

 tesseract
 

Macros

#define SE_TABLE_BITS   9
 
#define SE_TABLE_SIZE   512
 

Functions

void IMDebugConfiguration (INT_FEATURE FeatureNum, uinT16 ActualProtoNum, uinT8 Evidence, BIT_VECTOR ConfigMask, uinT32 ConfigWord)
 
void IMDebugConfigurationSum (INT_FEATURE FeatureNum, uinT8 *FeatureEvidence, inT32 ConfigCount)
 
void HeapSort (int n, register int ra[], register int rb[])
 

Variables

bool disable_character_fragments = FALSE
 
int classify_integer_matcher_multiplier = 10
 
int classify_adapt_proto_thresh = 230
 
int classify_adapt_feature_thresh = 230
 

Macro Definition Documentation

◆ SE_TABLE_BITS

#define SE_TABLE_BITS   9

Public Function Prototypes

Definition at line 66 of file intmatcher.h.

◆ SE_TABLE_SIZE

#define SE_TABLE_SIZE   512

Definition at line 67 of file intmatcher.h.

Function Documentation

◆ HeapSort()

void HeapSort ( int  n,
register int  ra[],
register int  rb[] 
)

Sort Key array in ascending order using heap sort algorithm. Also sort Index array that is tied to the key array.

Parameters
nNumber of elements to sort
raKey array [1..n]
rbIndex array [1..n]
Returns
none
Note
Exceptions: none
History: Tue Feb 19 10:24:24 MST 1991, RWM, Created.

Definition at line 1236 of file intmatcher.cpp.

1236  {
1237  int i, rra, rrb;
1238  int l, j, ir;
1239 
1240  l = (n >> 1) + 1;
1241  ir = n;
1242  for (;;) {
1243  if (l > 1) {
1244  rra = ra[--l];
1245  rrb = rb[l];
1246  }
1247  else {
1248  rra = ra[ir];
1249  rrb = rb[ir];
1250  ra[ir] = ra[1];
1251  rb[ir] = rb[1];
1252  if (--ir == 1) {
1253  ra[1] = rra;
1254  rb[1] = rrb;
1255  return;
1256  }
1257  }
1258  i = l;
1259  j = l << 1;
1260  while (j <= ir) {
1261  if (j < ir && ra[j] < ra[j + 1])
1262  ++j;
1263  if (rra < ra[j]) {
1264  ra[i] = ra[j];
1265  rb[i] = rb[j];
1266  j += (i = j);
1267  }
1268  else
1269  j = ir + 1;
1270  }
1271  ra[i] = rra;
1272  rb[i] = rrb;
1273  }
1274 }

◆ IMDebugConfiguration()

void IMDebugConfiguration ( INT_FEATURE  FeatureNum,
uinT16  ActualProtoNum,
uinT8  Evidence,
BIT_VECTOR  ConfigMask,
uinT32  ConfigWord 
)

Private Function Prototypes

◆ IMDebugConfigurationSum()

void IMDebugConfigurationSum ( INT_FEATURE  FeatureNum,
uinT8 FeatureEvidence,
inT32  ConfigCount 
)

Variable Documentation

◆ classify_adapt_feature_thresh

int classify_adapt_feature_thresh = 230

"Threshold for good features during adaptive 0-255: "

◆ classify_adapt_proto_thresh

int classify_adapt_proto_thresh = 230

"Threshold for good protos during adaptive 0-255: "

◆ classify_integer_matcher_multiplier

int classify_integer_matcher_multiplier = 10

"Integer Matcher Multiplier 0-255: "

◆ disable_character_fragments

bool disable_character_fragments = FALSE

"Do not include character fragments in the" " results of the classifier"