#include "adaptive.h"#include "emalloc.h"#include "freelist.h"#include "globals.h"#include "classify.h"#include <stdio.h>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) |
| void | FreePermConfig (PERM_CONFIG Config) |
| 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 (FILE *File) |
| PERM_CONFIG | ReadPermConfig (FILE *File) |
| TEMP_CONFIG | ReadTempConfig (FILE *File) |
| 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 49 of file adaptive.cpp.
| void free_adapted_class | ( | ADAPT_CLASS | adapt_class | ) |
Definition at line 136 of file adaptive.cpp.
| void free_adapted_templates | ( | ADAPT_TEMPLATES | templates | ) |
Definition at line 199 of file adaptive.cpp.
| void FreePermConfig | ( | PERM_CONFIG | Config | ) |
Definition at line 96 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 80 of file adaptive.cpp.
| void FreeTempProto | ( | void * | arg | ) |
Definition at line 90 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 113 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 223 of file adaptive.cpp.
| TEMP_PROTO NewTempProto | ( | ) |
This routine allocates and returns a new temporary proto.
Definition at line 254 of file adaptive.cpp.
| ADAPT_CLASS ReadAdaptedClass | ( | FILE * | File | ) |
Read an adapted class description from File and return a ptr to the adapted class.
| File | open file to read adapted class from |
Definition at line 313 of file adaptive.cpp.
| PERM_CONFIG ReadPermConfig | ( | FILE * | File | ) |
Read a permanent configuration description from File and return a ptr to it.
| File | open file to read permanent config from |
Definition at line 402 of file adaptive.cpp.
| TEMP_CONFIG ReadTempConfig | ( | FILE * | File | ) |
Read a temporary configuration description from File and return a ptr to it.
| File | open file to read temporary config from |
Definition at line 429 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 459 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 535 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 559 of file adaptive.cpp.