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 1235 of file intmatcher.cpp.

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

◆ 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"