tesseract  4.0.0-1-g2a2b
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_t ActualProtoNum, uint8_t Evidence, BIT_VECTOR ConfigMask, uint32_t ConfigWord)
 
void IMDebugConfigurationSum (INT_FEATURE FeatureNum, uint8_t *FeatureEvidence, int32_t ConfigCount)
 
void HeapSort (int n, int ra[], 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,
int  ra[],
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

Definition at line 1213 of file intmatcher.cpp.

1213  {
1214  int i, rra, rrb;
1215  int l, j, ir;
1216 
1217  l = (n >> 1) + 1;
1218  ir = n;
1219  for (;;) {
1220  if (l > 1) {
1221  rra = ra[--l];
1222  rrb = rb[l];
1223  }
1224  else {
1225  rra = ra[ir];
1226  rrb = rb[ir];
1227  ra[ir] = ra[1];
1228  rb[ir] = rb[1];
1229  if (--ir == 1) {
1230  ra[1] = rra;
1231  rb[1] = rrb;
1232  return;
1233  }
1234  }
1235  i = l;
1236  j = l << 1;
1237  while (j <= ir) {
1238  if (j < ir && ra[j] < ra[j + 1])
1239  ++j;
1240  if (rra < ra[j]) {
1241  ra[i] = ra[j];
1242  rb[i] = rb[j];
1243  j += (i = j);
1244  }
1245  else
1246  j = ir + 1;
1247  }
1248  ra[i] = rra;
1249  rb[i] = rrb;
1250  }
1251 }

◆ IMDebugConfiguration()

void IMDebugConfiguration ( INT_FEATURE  FeatureNum,
uint16_t  ActualProtoNum,
uint8_t  Evidence,
BIT_VECTOR  ConfigMask,
uint32_t  ConfigWord 
)

Private Function Prototypes

◆ IMDebugConfigurationSum()

void IMDebugConfigurationSum ( INT_FEATURE  FeatureNum,
uint8_t *  FeatureEvidence,
int32_t  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"