#include "blobs.h"
#include <stdio.h>
Go to the source code of this file.
#define DefineFeature |
( |
|
Name, |
|
|
|
NL, |
|
|
|
NC, |
|
|
|
SN, |
|
|
|
PN |
|
) |
| |
#define DefineParam |
( |
|
Circular, |
|
|
|
NonEssential, |
|
|
|
Min, |
|
|
|
Max |
|
) |
| |
Value:{Circular, NonEssential, Min, Max, \
(Max) - (Min), (((Max) - (Min))/2.0), (((Max) + (Min))/2.0)},
Definition at line 88 of file ocrfeatures.h.
#define FEAT_NAME_SIZE 80 |
#define ILLEGAL_FEATURE_PARAM 1000 |
#define ILLEGAL_NUM_FEATURES 1001 |
#define StartParamDesc |
( |
|
Name | ) |
const PARAM_DESC Name[] = { |
Include Files and Type Defines
Public Code
Definition at line 35 of file ocrfeatures.cpp.
void FreeFeature(FEATURE Feature)
void FreeFeature |
( |
FEATURE |
Feature | ) |
|
Definition at line 59 of file ocrfeatures.cpp.
72 "sizeof(FEATURE_STRUCT)+sizeof(FLOAT32)*(NumParamsIn(Feature)-1)");
const FEATURE_DESC_STRUCT * Type
void free_struct(void *deadstruct, inT32, const char *)
Definition at line 79 of file ocrfeatures.cpp.
void FreeFeature(FEATURE Feature)
void memfree(void *element)
Definition at line 102 of file ocrfeatures.cpp.
118 "sizeof(FEATURE_STRUCT)+sizeof(FLOAT32)*(NumParamsIn(Feature)-1)");
119 Feature->
Type = FeatureDesc;
const FEATURE_DESC_STRUCT * Type
void * alloc_struct(inT32 count, const char *)
Definition at line 149 of file ocrfeatures.cpp.
FEATURE NewFeature(const FEATURE_DESC_STRUCT *FeatureDesc)
int tfscanf(FILE *stream, const char *format,...)
const FEATURE_DESC_STRUCT * Type
void DoError(int Error, const char *Message)
#define ILLEGAL_FEATURE_PARAM
Definition at line 181 of file ocrfeatures.cpp.
200 if (
tfscanf(File,
"%d", &NumFeatures) != 1 || NumFeatures < 0)
204 for (i = 0; i < NumFeatures; i++)
int tfscanf(FILE *stream, const char *format,...)
FEATURE_SET NewFeatureSet(int NumFeatures)
FEATURE ReadFeature(FILE *File, const FEATURE_DESC_STRUCT *FeatureDesc)
void DoError(int Error, const char *Message)
#define ILLEGAL_NUM_FEATURES
BOOL8 AddFeature(FEATURE_SET FeatureSet, FEATURE Feature)
Definition at line 226 of file ocrfeatures.cpp.
const FEATURE_DESC_STRUCT * Type
void add_str_double(const char *str, double number)
Definition at line 251 of file ocrfeatures.cpp.
255 for (
int i = 0; i < FeatureSet->
NumFeatures; i++) {
void WriteFeature(FEATURE Feature, STRING *str)
void add_str_int(const char *str, int number)