Tesseract
3.02
|
#include "protos.h"
#include "const.h"
#include "emalloc.h"
#include "freelist.h"
#include "callcpp.h"
#include "tprintf.h"
#include "scanutils.h"
#include "globals.h"
#include "classify.h"
#include "params.h"
#include <stdio.h>
#include <math.h>
Go to the source code of this file.
Namespaces | |
namespace | tesseract |
Macros | |
#define | PROTO_INCREMENT 32 |
#define | CONFIG_INCREMENT 16 |
Functions | |||||
AddConfigToClass | |||||
Add a new config to this class. Malloc new space and copy the old configs if necessary. Return the config id for the new config.
| |||||
int | AddConfigToClass (CLASS_TYPE Class) | ||||
AddProtoToClass | |||||
Add a new proto to this class. Malloc new space and copy the old protos if necessary. Return the proto id for the new proto.
| |||||
int | AddProtoToClass (CLASS_TYPE Class) | ||||
ClassConfigLength | |||||
Return the length of all the protos in this class.
| |||||
FLOAT32 | ClassConfigLength (CLASS_TYPE Class, BIT_VECTOR Config) | ||||
ClassProtoLength | |||||
Return the length of all the protos in this class.
| |||||
FLOAT32 | ClassProtoLength (CLASS_TYPE Class) | ||||
CopyProto | |||||
Copy the first proto into the second.
| |||||
void | CopyProto (PROTO Src, PROTO Dest) | ||||
void | FillABC (PROTO Proto) | ||||
void | FreeClass (CLASS_TYPE Class) | ||||
void | FreeClassFields (CLASS_TYPE Class) | ||||
CLASS_TYPE | NewClass (int NumProtos, int NumConfigs) | ||||
void | PrintProtos (CLASS_TYPE Class) | ||||
void | ReadClassFromFile (FILE *File, UNICHAR_ID unichar_id) | ||||
void | ReadConfigs (register FILE *File, CLASS_TYPE Class) | ||||
void | ReadProtos (register FILE *File, CLASS_TYPE Class) | ||||
SplitProto | |||||
Add a new proto to this class. Malloc new space and copy the old protos if necessary. Return the proto id for the new proto. Update all configurations so that each config which contained the specified old proto will also contain the new proto. The caller is responsible for actually filling in the appropriate proto params. | |||||
int | SplitProto (CLASS_TYPE Class, int OldPid) | ||||
WriteOldConfigFile | |||||
| |||||
void | WriteOldConfigFile (FILE *File, CLASS_TYPE Class) | ||||
WriteOldProtoFile | |||||
| |||||
void | WriteOldProtoFile (FILE *File, CLASS_TYPE Class) |
Variables | |
CLASS_STRUCT | TrainingData [NUMBER_OF_CLASSES] |
char * | classify_training_file = "MicroFeatures" |
#define CONFIG_INCREMENT 16 |
Definition at line 43 of file protos.cpp.
#define PROTO_INCREMENT 32 |
Definition at line 42 of file protos.cpp.
int AddConfigToClass | ( | CLASS_TYPE | Class | ) |
Definition at line 63 of file protos.cpp.
int AddProtoToClass | ( | CLASS_TYPE | Class | ) |
Definition at line 99 of file protos.cpp.
FLOAT32 ClassConfigLength | ( | CLASS_TYPE | Class, |
BIT_VECTOR | Config | ||
) |
FLOAT32 ClassProtoLength | ( | CLASS_TYPE | Class | ) |
void FillABC | ( | PROTO | Proto | ) |
Definition at line 198 of file protos.cpp.
void FreeClass | ( | CLASS_TYPE | Class | ) |
Definition at line 215 of file protos.cpp.
void FreeClassFields | ( | CLASS_TYPE | Class | ) |
Definition at line 228 of file protos.cpp.
CLASS_TYPE NewClass | ( | int | NumProtos, |
int | NumConfigs | ||
) |
Definition at line 248 of file protos.cpp.
void PrintProtos | ( | CLASS_TYPE | Class | ) |
Definition at line 273 of file protos.cpp.
void ReadClassFromFile | ( | FILE * | File, |
UNICHAR_ID | unichar_id | ||
) |
ReadClassFromFile
Read in a class description (protos and configs) from a file. Update the class structure record.
Definition at line 321 of file protos.cpp.
void ReadConfigs | ( | register FILE * | File, |
CLASS_TYPE | Class | ||
) |
ReadConfigs
Read the prototype configurations for this class from a file. Read the requested number of lines.
Definition at line 337 of file protos.cpp.
void ReadProtos | ( | register FILE * | File, |
CLASS_TYPE | Class | ||
) |
ReadProtos
Read in all the prototype information from a file. Read the number of lines requested.
Definition at line 367 of file protos.cpp.
int SplitProto | ( | CLASS_TYPE | Class, |
int | OldPid | ||
) |
Definition at line 399 of file protos.cpp.
void WriteOldConfigFile | ( | FILE * | File, |
CLASS_TYPE | Class | ||
) |
Definition at line 425 of file protos.cpp.
void WriteOldProtoFile | ( | FILE * | File, |
CLASS_TYPE | Class | ||
) |
Definition at line 457 of file protos.cpp.
char* classify_training_file = "MicroFeatures" |
"Training file"
Definition at line 50 of file protos.cpp.
CLASS_STRUCT TrainingData[NUMBER_OF_CLASSES] |
Definition at line 48 of file protos.cpp.