tesseract
4.0.0-1-g2a2b
|
#include "adaptive.h"
#include "emalloc.h"
#include "globals.h"
#include "classify.h"
#include <cassert>
#include <cstdio>
Go to the source code of this file.
Namespaces | |
tesseract | |
Functions | |
void | AddAdaptedClass (ADAPT_TEMPLATES Templates, ADAPT_CLASS Class, CLASS_ID ClassId) |
void | FreeTempConfig (TEMP_CONFIG Config) |
void | FreeTempProto (void *arg) |
ADAPT_CLASS | NewAdaptedClass () |
void | free_adapted_class (ADAPT_CLASS adapt_class) |
void | free_adapted_templates (ADAPT_TEMPLATES templates) |
TEMP_CONFIG | NewTempConfig (int MaxProtoId, int FontinfoId) |
TEMP_PROTO | NewTempProto () |
ADAPT_CLASS | ReadAdaptedClass (TFile *fp) |
PERM_CONFIG | ReadPermConfig (TFile *fp) |
TEMP_CONFIG | ReadTempConfig (TFile *fp) |
void | WriteAdaptedClass (FILE *File, ADAPT_CLASS Class, int NumConfigs) |
void | WritePermConfig (FILE *File, PERM_CONFIG Config) |
void | WriteTempConfig (FILE *File, TEMP_CONFIG Config) |
void AddAdaptedClass | ( | ADAPT_TEMPLATES | Templates, |
ADAPT_CLASS | Class, | ||
CLASS_ID | ClassId | ||
) |
This routine adds a new adapted class to an existing set of adapted templates.
Templates | set of templates to add new class to |
Class | new class to add to templates |
ClassId | class id to associate with new class |
Definition at line 46 of file adaptive.cpp.
void free_adapted_class | ( | ADAPT_CLASS | adapt_class | ) |
Definition at line 125 of file adaptive.cpp.
void free_adapted_templates | ( | ADAPT_TEMPLATES | templates | ) |
Definition at line 183 of file adaptive.cpp.
void FreeTempConfig | ( | TEMP_CONFIG | Config | ) |
This routine frees all memory consumed by a temporary configuration.
Config | config to be freed |
Definition at line 75 of file adaptive.cpp.
void FreeTempProto | ( | void * | arg | ) |
Definition at line 82 of file adaptive.cpp.
ADAPT_CLASS NewAdaptedClass | ( | ) |
This operation allocates and initializes a new adapted class data structure and returns a ptr to it.
Definition at line 103 of file adaptive.cpp.
TEMP_CONFIG NewTempConfig | ( | int | MaxProtoId, |
int | FontinfoId | ||
) |
This routine allocates and returns a new temporary config.
MaxProtoId | max id of any proto in new config |
FontinfoId | font information from pre-trained templates |
Definition at line 204 of file adaptive.cpp.
TEMP_PROTO NewTempProto | ( | ) |
This routine allocates and returns a new temporary proto.
Definition at line 229 of file adaptive.cpp.
ADAPT_CLASS ReadAdaptedClass | ( | TFile * | fp | ) |
Read an adapted class description from file and return a ptr to the adapted class.
fp | open file to read adapted class from |
Definition at line 282 of file adaptive.cpp.
PERM_CONFIG ReadPermConfig | ( | TFile * | fp | ) |
Read a permanent configuration description from file and return a ptr to it.
fp | open file to read permanent config from |
Definition at line 363 of file adaptive.cpp.
TEMP_CONFIG ReadTempConfig | ( | TFile * | fp | ) |
Read a temporary configuration description from file and return a ptr to it.
fp | open file to read temporary config from |
Definition at line 387 of file adaptive.cpp.
void WriteAdaptedClass | ( | FILE * | File, |
ADAPT_CLASS | Class, | ||
int | NumConfigs | ||
) |
This routine writes a binary representation of Class to File.
File | open file to write Class to |
Class | adapted class to write to File |
NumConfigs | number of configs in Class |
Definition at line 410 of file adaptive.cpp.
void WritePermConfig | ( | FILE * | File, |
PERM_CONFIG | Config | ||
) |
This routine writes a binary representation of a permanent configuration to File.
File | open file to write Config to |
Config | permanent config to write to File |
Definition at line 482 of file adaptive.cpp.
void WriteTempConfig | ( | FILE * | File, |
TEMP_CONFIG | Config | ||
) |
This routine writes a binary representation of a temporary configuration to File.
File | open file to write Config to |
Config | temporary config to write to File |
Definition at line 504 of file adaptive.cpp.