Go to the source code of this file.
◆ NUM_FEATURE_TYPES
#define NUM_FEATURE_TYPES 4 |
Include Files and Type Defines
Definition at line 26 of file featdefs.h.
◆ CHAR_DESC
◆ FEATURE_DEFS
◆ FreeCharDescription()
void FreeCharDescription |
( |
CHAR_DESC |
CharDesc | ) |
|
Release the memory consumed by the specified character description and all of the features in that description.
- Parameters
-
CharDesc | character description to be deallocated |
Globals:
Definition at line 128 of file featdefs.cpp.
◆ InitFeatureDefs()
◆ NewCharDescription()
Allocate a new character description, initialize its feature sets to be empty, and return it.
Globals:
- Returns
- New character description structure.
Definition at line 147 of file featdefs.cpp.
◆ ReadCharDescription()
Read a character description from File, and return a data structure containing this information. The data is formatted as follows:
NumberOfSets
ShortNameForSet1 Set1
ShortNameForSet2 Set2
...
Globals:
- Parameters
-
FeatureDefs | definitions of feature types/extractors |
File | open text file to read character description from |
- Returns
- Character description read from File.
Definition at line 235 of file featdefs.cpp.
248 for (; NumSetsToRead > 0; NumSetsToRead--) {
249 tfscanf(File,
"%s", ShortName);
◆ ShortNameToFeatureType()
uint32_t ShortNameToFeatureType |
( |
const FEATURE_DEFS_STRUCT & |
FeatureDefs, |
|
|
const char * |
ShortName |
|
) |
| |
Search through all features currently defined and return the feature type for the feature with the specified short name. Trap an error if the specified name is not found.
Globals:
- Parameters
-
FeatureDefs | definitions of feature types/extractors |
ShortName | short name of a feature type |
- Returns
- Feature type which corresponds to ShortName.
Definition at line 269 of file featdefs.cpp.
274 return static_cast<uint32_t>(i);
◆ ValidCharDescription()
Definition at line 194 of file featdefs.cpp.
197 bool anything_written =
false;
198 bool well_formed =
true;
204 if (std::isnan(feat->
Params[p]) || std::isinf(feat->
Params[p]))
207 anything_written =
true;
214 return anything_written && well_formed;
◆ WriteCharDescription()
Appends a textual representation of CharDesc to str. The format used is to write out the number of feature sets which will be written followed by a representation of each feature set.
Each set starts with the short name for that feature followed by a description of the feature set. Feature sets which are not present are not written.
- Parameters
-
FeatureDefs | definitions of feature types/extractors |
str | string to append CharDesc to |
CharDesc | character description to write to File |
Definition at line 173 of file featdefs.cpp.
176 int NumSetsToWrite = 0;
◆ CharNormDesc
◆ GeoFeatDesc
◆ IntFeatDesc
◆ kCNFeatureType
const TESS_API char* const kCNFeatureType |
◆ kGeoFeatureType
const TESS_API char* const kGeoFeatureType |
◆ kIntFeatureType
const TESS_API char* const kIntFeatureType |
◆ kMicroFeatureType
const TESS_API char* const kMicroFeatureType |
◆ MicroFeatureDesc
Global Data Definitions and Declarations
◆ OutlineFeatDesc
◆ PicoFeatDesc