tesseract 4.1.1
Loading...
Searching...
No Matches
mfdefs.h File Reference
#include "matchdefs.h"
#include "oldlist.h"

Go to the source code of this file.

Macros

#define MFSIZE   6
 
#define XPOSITION   0
 
#define YPOSITION   1
 
#define MFLENGTH   2
 
#define ORIENTATION   3
 
#define FIRSTBULGE   4
 
#define SECONDBULGE   5
 
#define NextFeatureOf(L)   ((MICROFEATURE)first_node(L))
 

Typedefs

using MICROFEATURES = LIST
 
typedef float MFBLOCK[MFSIZE]
 
using MICROFEATURE = float *
 

Functions

MICROFEATURE NewMicroFeature ()
 
void FreeMicroFeatures (MICROFEATURES MicroFeatures)
 

Macro Definition Documentation

◆ FIRSTBULGE

#define FIRSTBULGE   4

Definition at line 40 of file mfdefs.h.

◆ MFLENGTH

#define MFLENGTH   2

Definition at line 38 of file mfdefs.h.

◆ MFSIZE

#define MFSIZE   6

Definition at line 31 of file mfdefs.h.

◆ NextFeatureOf

#define NextFeatureOf (   L)    ((MICROFEATURE)first_node(L))

Macros

Definition at line 48 of file mfdefs.h.

◆ ORIENTATION

#define ORIENTATION   3

Definition at line 39 of file mfdefs.h.

◆ SECONDBULGE

#define SECONDBULGE   5

Definition at line 41 of file mfdefs.h.

◆ XPOSITION

#define XPOSITION   0

Definition at line 36 of file mfdefs.h.

◆ YPOSITION

#define YPOSITION   1

Definition at line 37 of file mfdefs.h.

Typedef Documentation

◆ MFBLOCK

typedef float MFBLOCK[MFSIZE]

Definition at line 32 of file mfdefs.h.

◆ MICROFEATURE

using MICROFEATURE = float*

Definition at line 33 of file mfdefs.h.

◆ MICROFEATURES


Include Files and Type Defines

Definition at line 28 of file mfdefs.h.

Function Documentation

◆ FreeMicroFeatures()

void FreeMicroFeatures ( MICROFEATURES  MicroFeatures)

This routine deallocates all of the memory consumed by a list of micro-features.

Parameters
MicroFeatureslist of micro-features to be freed

Definition at line 42 of file mfdefs.cpp.

42 {
43 destroy_nodes(MicroFeatures, Efree);
44} /* FreeMicroFeatures */
void Efree(void *ptr)
Definition: emalloc.cpp:45
void destroy_nodes(LIST list, void_dest destructor)
Definition: oldlist.cpp:157

◆ NewMicroFeature()

MICROFEATURE NewMicroFeature ( )

Public Function Prototypes

This routine allocates and returns a new micro-feature data structure.

Returns
New MICROFEATURE

Definition at line 33 of file mfdefs.cpp.

33 {
34 return (static_cast<MICROFEATURE>(Emalloc (sizeof (MFBLOCK))));
35} /* NewMicroFeature */
float * MICROFEATURE
Definition: mfdefs.h:33
float MFBLOCK[MFSIZE]
Definition: mfdefs.h:32
void * Emalloc(int Size)
Definition: emalloc.cpp:31