/home/rays/src/opensrc/tesseract-ocr/training/commontraining.h File Reference

#include "oldlist.h"
#include "cluster.h"
#include "intproto.h"
#include "featdefs.h"
#include "base/commandlineflags.h"

Go to the source code of this file.

Classes

struct  LABELEDLISTNODE
struct  MERGE_CLASS_NODE

Namespaces

namespace  tesseract

Defines

#define INT_PARAM_FLAG(name, val, comment)   DEFINE_int32(name, val, comment)
#define DECLARE_INT_PARAM_FLAG(name)   DECLARE_int32(name)
#define STRING_PARAM_FLAG(name, val, comment)   DEFINE_string(name, val, comment)
#define DECLARE_STRING_PARAM_FLAG(name)   DECLARE_string(name)

Typedefs

typedef struct LABELEDLISTNODELABELEDLIST
typedef MERGE_CLASS_NODEMERGE_CLASS

Functions

void ParseArguments (int *argc, char ***argv)
ShapeTable * tesseract::LoadShapeTable (const STRING &file_prefix)
void tesseract::WriteShapeTable (const STRING &file_prefix, const ShapeTable &shape_table)
MasterTrainer * tesseract::LoadTrainingData (int argc, const char *const *argv, bool replication, ShapeTable **shape_table, STRING *file_prefix)
const char * GetNextFilename (int argc, const char *const *argv)
LABELEDLIST FindList (LIST List, char *Label)
LABELEDLIST NewLabeledList (const char *Label)
void ReadTrainingSamples (const FEATURE_DEFS_STRUCT &feature_defs, const char *feature_name, int max_samples, UNICHARSET *unicharset, FILE *file, LIST *training_samples)
void WriteTrainingSamples (const FEATURE_DEFS_STRUCT &FeatureDefs, char *Directory, LIST CharList, const char *program_feature_type)
void FreeTrainingSamples (LIST CharList)
void FreeLabeledList (LABELEDLIST LabeledList)
void FreeLabeledClassList (LIST ClassListList)
CLUSTERERSetUpForClustering (const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIST CharSample, const char *program_feature_type)
LIST RemoveInsignificantProtos (LIST ProtoList, BOOL8 KeepSigProtos, BOOL8 KeepInsigProtos, int N)
void CleanUpUnusedData (LIST ProtoList)
void MergeInsignificantProtos (LIST ProtoList, const char *label, CLUSTERER *Clusterer, CLUSTERCONFIG *Config)
MERGE_CLASS FindClass (LIST List, const char *Label)
MERGE_CLASS NewLabeledClass (const char *Label)
CLASS_STRUCTSetUpForFloat2Int (const UNICHARSET &unicharset, LIST LabeledClassList)
void Normalize (float *Values)
void FreeNormProtoList (LIST CharList)
void AddToNormProtosList (LIST *NormProtoList, LIST ProtoList, char *CharName)
int NumberOfProtos (LIST ProtoList, BOOL8 CountSigProtos, BOOL8 CountInsigProtos)
void allocNormProtos ()

Variables

FEATURE_DEFS_STRUCT feature_defs
CLUSTERCONFIG Config

Define Documentation

#define DECLARE_INT_PARAM_FLAG ( name   )     DECLARE_int32(name)
#define DECLARE_STRING_PARAM_FLAG ( name   )     DECLARE_string(name)
#define INT_PARAM_FLAG ( name,
val,
comment   )     DEFINE_int32(name, val, comment)
#define STRING_PARAM_FLAG ( name,
val,
comment   )     DEFINE_string(name, val, comment)

Typedef Documentation

typedef struct LABELEDLISTNODE * LABELEDLIST

Function Documentation

void AddToNormProtosList ( LIST NormProtoList,
LIST  ProtoList,
char *  CharName 
)
void allocNormProtos (  ) 
void CleanUpUnusedData ( LIST  ProtoList  ) 
MERGE_CLASS FindClass ( LIST  List,
const char *  Label 
)
LABELEDLIST FindList ( LIST  List,
char *  Label 
)
void FreeLabeledClassList ( LIST  ClassListList  ) 
void FreeLabeledList ( LABELEDLIST  LabeledList  ) 
void FreeNormProtoList ( LIST  CharList  ) 
void FreeTrainingSamples ( LIST  CharList  ) 
const char* GetNextFilename ( int  argc,
const char *const *  argv 
)
void MergeInsignificantProtos ( LIST  ProtoList,
const char *  label,
CLUSTERER Clusterer,
CLUSTERCONFIG Config 
)
MERGE_CLASS NewLabeledClass ( const char *  Label  ) 
LABELEDLIST NewLabeledList ( const char *  Label  ) 
void Normalize ( float *  Values  ) 
int NumberOfProtos ( LIST  ProtoList,
BOOL8  CountSigProtos,
BOOL8  CountInsigProtos 
)
void ParseArguments ( int *  argc,
char ***  argv 
)
void ReadTrainingSamples ( const FEATURE_DEFS_STRUCT feature_defs,
const char *  feature_name,
int  max_samples,
UNICHARSET unicharset,
FILE *  file,
LIST training_samples 
)
LIST RemoveInsignificantProtos ( LIST  ProtoList,
BOOL8  KeepSigProtos,
BOOL8  KeepInsigProtos,
int  N 
)
CLUSTERER* SetUpForClustering ( const FEATURE_DEFS_STRUCT FeatureDefs,
LABELEDLIST  CharSample,
const char *  program_feature_type 
)
CLASS_STRUCT* SetUpForFloat2Int ( const UNICHARSET unicharset,
LIST  LabeledClassList 
)

SetUpForFloat2Int

void WriteTrainingSamples ( const FEATURE_DEFS_STRUCT FeatureDefs,
char *  Directory,
LIST  CharList,
const char *  program_feature_type 
)

Variable Documentation

Generated on Thu Feb 2 08:19:22 2012 for Tesseract by  doxygen 1.6.3