|
Tesseract
3.02
|
#include "commontraining.h"#include "base/init_google.h"#include "base/commandlineflags.h"#include "allheaders.h"#include "ccutil.h"#include "classify.h"#include "oldlist.h"#include "globals.h"#include "mf.h"#include "clusttool.h"#include "cluster.h"#include "tessopt.h"#include "efio.h"#include "emalloc.h"#include "featdefs.h"#include "fontinfo.h"#include "intfeaturespace.h"#include "mastertrainer.h"#include "tessdatamanager.h"#include "tprintf.h"#include "freelist.h"#include "params.h"#include "shapetable.h"#include "unicity_table.h"#include <math.h>Go to the source code of this file.
Namespaces | |
| namespace | tesseract |
Functions | |
| INT_PARAM_FLAG (debug_level, 0,"Level of Trainer debugging") | |
| INT_PARAM_FLAG (load_images, 0,"Load images with tr files") | |
| STRING_PARAM_FLAG (configfile,"","File to load more configs from") | |
| STRING_PARAM_FLAG (D,"","Directory to write output files to") | |
| STRING_PARAM_FLAG (F,"font_properties","File listing font properties") | |
| STRING_PARAM_FLAG (X,"","File listing font xheights") | |
| STRING_PARAM_FLAG (U,"unicharset","File to load unicharset from") | |
| STRING_PARAM_FLAG (O,"","File to write unicharset to") | |
| STRING_PARAM_FLAG (input_trainer,"","File to load trainer from") | |
| STRING_PARAM_FLAG (output_trainer,"","File to write trainer to") | |
| STRING_PARAM_FLAG (test_ch,"","UTF8 test character string") | |
| 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 | FreeTrainingSamples (LIST CharList) |
| void | FreeLabeledList (LABELEDLIST LabeledList) |
| CLUSTERER * | SetUpForClustering (const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIST char_sample, const char *program_feature_type) |
| void | MergeInsignificantProtos (LIST ProtoList, const char *label, CLUSTERER *Clusterer, CLUSTERCONFIG *Config) |
| void | CleanUpUnusedData (LIST ProtoList) |
| LIST | RemoveInsignificantProtos (LIST ProtoList, BOOL8 KeepSigProtos, BOOL8 KeepInsigProtos, int N) |
| MERGE_CLASS | FindClass (LIST List, const char *Label) |
| MERGE_CLASS | NewLabeledClass (const char *Label) |
| void | FreeLabeledClassList (LIST ClassList) |
| CLASS_STRUCT * | SetUpForFloat2Int (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) |
Variables | |
| CLUSTERCONFIG | Config = { elliptical, 0.625, 0.05, 1.0, 1e-6, 0 } |
| const char * | kUsage = "[flags] [ .tr files ... ]\n" |
| FEATURE_DEFS_STRUCT | feature_defs |
| CCUtil | ccutil |
Definition at line 935 of file commontraining.cpp.
| void CleanUpUnusedData | ( | LIST | ProtoList | ) |
Definition at line 683 of file commontraining.cpp.
| MERGE_CLASS FindClass | ( | LIST | List, |
| const char * | Label | ||
| ) |
Definition at line 778 of file commontraining.cpp.
| LABELEDLIST FindList | ( | LIST | List, |
| char * | Label | ||
| ) |
Definition at line 385 of file commontraining.cpp.
| void FreeLabeledClassList | ( | LIST | ClassList | ) |
Definition at line 809 of file commontraining.cpp.
| void FreeLabeledList | ( | LABELEDLIST | LabeledList | ) |
Definition at line 548 of file commontraining.cpp.
| void FreeNormProtoList | ( | LIST | CharList | ) |
Definition at line 919 of file commontraining.cpp.
| void FreeTrainingSamples | ( | LIST | CharList | ) |
Definition at line 518 of file commontraining.cpp.
| const char* GetNextFilename | ( | int | argc, |
| const char *const * | argv | ||
| ) |
Definition at line 362 of file commontraining.cpp.
| INT_PARAM_FLAG | ( | debug_level | , |
| 0 | , | ||
| "Level of Trainer debugging" | |||
| ) |
| INT_PARAM_FLAG | ( | load_images | , |
| 0 | , | ||
| "Load images with tr files" | |||
| ) |
| void MergeInsignificantProtos | ( | LIST | ProtoList, |
| const char * | label, | ||
| CLUSTERER * | Clusterer, | ||
| CLUSTERCONFIG * | Config | ||
| ) |
Definition at line 618 of file commontraining.cpp.
| MERGE_CLASS NewLabeledClass | ( | const char * | Label | ) |
Definition at line 795 of file commontraining.cpp.
| LABELEDLIST NewLabeledList | ( | const char * | Label | ) |
Definition at line 417 of file commontraining.cpp.
| void Normalize | ( | float * | Values | ) |
Definition at line 902 of file commontraining.cpp.
Definition at line 953 of file commontraining.cpp.
| void ParseArguments | ( | int * | argc, |
| char *** | argv | ||
| ) |
Definition at line 88 of file commontraining.cpp.
| void ReadTrainingSamples | ( | const FEATURE_DEFS_STRUCT & | feature_defs, |
| const char * | feature_name, | ||
| int | max_samples, | ||
| UNICHARSET * | unicharset, | ||
| FILE * | file, | ||
| LIST * | training_samples | ||
| ) |
Definition at line 448 of file commontraining.cpp.
| LIST RemoveInsignificantProtos | ( | LIST | ProtoList, |
| BOOL8 | KeepSigProtos, | ||
| BOOL8 | KeepInsigProtos, | ||
| int | N | ||
| ) |
Definition at line 710 of file commontraining.cpp.
| CLUSTERER* SetUpForClustering | ( | const FEATURE_DEFS_STRUCT & | FeatureDefs, |
| LABELEDLIST | char_sample, | ||
| const char * | program_feature_type | ||
| ) |
Definition at line 567 of file commontraining.cpp.
| CLASS_STRUCT* SetUpForFloat2Int | ( | const UNICHARSET & | unicharset, |
| LIST | LabeledClassList | ||
| ) |
SetUpForFloat2Int
Definition at line 839 of file commontraining.cpp.
| STRING_PARAM_FLAG | ( | configfile | , |
| "" | , | ||
| "File to load more configs from" | |||
| ) |
| STRING_PARAM_FLAG | ( | D | , |
| "" | , | ||
| "Directory to write output files to" | |||
| ) |
| STRING_PARAM_FLAG | ( | F | , |
| "font_properties" | , | ||
| "File listing font properties" | |||
| ) |
| STRING_PARAM_FLAG | ( | X | , |
| "" | , | ||
| "File listing font xheights" | |||
| ) |
| STRING_PARAM_FLAG | ( | U | , |
| "unicharset" | , | ||
| "File to load unicharset from" | |||
| ) |
| STRING_PARAM_FLAG | ( | O | , |
| "" | , | ||
| "File to write unicharset to" | |||
| ) |
| STRING_PARAM_FLAG | ( | input_trainer | , |
| "" | , | ||
| "File to load trainer from" | |||
| ) |
| STRING_PARAM_FLAG | ( | output_trainer | , |
| "" | , | ||
| "File to write trainer to" | |||
| ) |
| STRING_PARAM_FLAG | ( | test_ch | , |
| "" | , | ||
| "UTF8 test character string" | |||
| ) |
| CCUtil ccutil |
Definition at line 85 of file commontraining.cpp.
| CLUSTERCONFIG Config = { elliptical, 0.625, 0.05, 1.0, 1e-6, 0 } |
Definition at line 53 of file commontraining.cpp.
| FEATURE_DEFS_STRUCT feature_defs |
Definition at line 84 of file commontraining.cpp.
| const char* kUsage = "[flags] [ .tr files ... ]\n" |
Definition at line 71 of file commontraining.cpp.