tesseract  4.0.0-beta.1-59-g2cc4
intfx.cpp File Reference
#include "intfx.h"
#include "allheaders.h"
#include "ccutil.h"
#include "classify.h"
#include "const.h"
#include "helpers.h"
#include "intmatcher.h"
#include "linlsq.h"
#include "ndminx.h"
#include "normalis.h"
#include "statistc.h"
#include "trainingsample.h"

Go to the source code of this file.

Namespaces

 tesseract
 

Functions

void InitIntegerFX ()
 
FCOORD FeatureDirection (uint8_t theta)
 
TrainingSampletesseract::BlobToTrainingSample (const TBLOB &blob, bool nonlinear_norm, INT_FX_RESULT_STRUCT *fx_info, GenericVector< INT_FEATURE_STRUCT > *bl_features)
 
uint8_t tesseract::NormalizeDirection (uint8_t dir, const FCOORD &unnormed_pos, const DENORM &denorm, const DENORM *root_denorm)
 

Variables

tesseract::CCUtilMutex atan_table_mutex
 

Function Documentation

◆ FeatureDirection()

FCOORD FeatureDirection ( uint8_t  theta)

Definition at line 70 of file intfx.cpp.

70  {
71  return FCOORD(cos_table[theta], sin_table[theta]);
72 }
Definition: points.h:189

◆ InitIntegerFX()

void InitIntegerFX ( )

Public Code

Definition at line 55 of file intfx.cpp.

55  {
56  static bool atan_table_init = false;
58  if (!atan_table_init) {
59  for (int i = 0; i < INT_CHAR_NORM_RANGE; ++i) {
60  cos_table[i] = cos(i * 2 * PI / INT_CHAR_NORM_RANGE + PI);
61  sin_table[i] = sin(i * 2 * PI / INT_CHAR_NORM_RANGE + PI);
62  }
63  atan_table_init = true;
64  }
66 }
#define PI
Definition: const.h:19
#define INT_CHAR_NORM_RANGE
Definition: intproto.h:133
tesseract::CCUtilMutex atan_table_mutex
Definition: intfx.cpp:48

Variable Documentation

◆ atan_table_mutex

tesseract::CCUtilMutex atan_table_mutex

Definition at line 48 of file intfx.cpp.