tesseract  3.04.00
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

#define SE_TABLE_BITS   9

Public Function Prototypes

Definition at line 66 of file intmatcher.h.

#define SE_TABLE_SIZE   512

Definition at line 67 of file intmatcher.h.

Function Documentation

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

Definition at line 1273 of file intmatcher.cpp.

1273  {
1274 /*
1275  ** Parameters:
1276  ** n Number of elements to sort
1277  ** ra Key array [1..n]
1278  ** rb Index array [1..n]
1279  ** Globals:
1280  ** Operation:
1281  ** Sort Key array in ascending order using heap sort
1282  ** algorithm. Also sort Index array that is tied to
1283  ** the key array.
1284  ** Return:
1285  ** Exceptions: none
1286  ** History: Tue Feb 19 10:24:24 MST 1991, RWM, Created.
1287  */
1288  register int i, rra, rrb;
1289  int l, j, ir;
1290 
1291  l = (n >> 1) + 1;
1292  ir = n;
1293  for (;;) {
1294  if (l > 1) {
1295  rra = ra[--l];
1296  rrb = rb[l];
1297  }
1298  else {
1299  rra = ra[ir];
1300  rrb = rb[ir];
1301  ra[ir] = ra[1];
1302  rb[ir] = rb[1];
1303  if (--ir == 1) {
1304  ra[1] = rra;
1305  rb[1] = rrb;
1306  return;
1307  }
1308  }
1309  i = l;
1310  j = l << 1;
1311  while (j <= ir) {
1312  if (j < ir && ra[j] < ra[j + 1])
1313  ++j;
1314  if (rra < ra[j]) {
1315  ra[i] = ra[j];
1316  rb[i] = rb[j];
1317  j += (i = j);
1318  }
1319  else
1320  j = ir + 1;
1321  }
1322  ra[i] = rra;
1323  rb[i] = rrb;
1324  }
1325 }
void IMDebugConfiguration ( INT_FEATURE  FeatureNum,
uinT16  ActualProtoNum,
uinT8  Evidence,
BIT_VECTOR  ConfigMask,
uinT32  ConfigWord 
)

Private Function Prototypes

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

Variable Documentation

int classify_adapt_feature_thresh = 230

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

int classify_adapt_proto_thresh = 230

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

int classify_integer_matcher_multiplier = 10

"Integer Matcher Multiplier 0-255: "

bool disable_character_fragments = FALSE

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