Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
flexfx.cpp File Reference
`#include "flexfx.h"`
`#include "featdefs.h"`
`#include "emalloc.h"`
`#include <string.h>`
`#include <stdio.h>`

Go to the source code of this file.

## Functions

CHAR_DESC | ExtractFlexFeatures (const FEATURE_DEFS_STRUCT &FeatureDefs, TBLOB *Blob, const DENORM &denorm)

## Function Documentation

CHAR_DESC ExtractFlexFeatures | ( | const FEATURE_DEFS_STRUCT & | FeatureDefs,
|  | TBLOB * | Blob,
|  | const DENORM & | denorm
| ) |  |

Include Files and Type Defines —————————————————————————- ---------------------------------------------------------------------------- Public Code —————————————————————————-

Definition at line 31 of file flexfx.cpp.

{
/*
** Parameters:
** Blob blob to extract features from
** denorm control parameter for feature extractor
** Globals: none
** Operation: Allocate a new character descriptor and fill it in by
** calling all feature extractors which are enabled.
** Return: Structure containing features extracted from Blob.
** Exceptions: none
** History: Wed May 23 13:46:22 1990, DSJ, Created.
*/
int Type;
CHAR_DESC CharDesc;
CharDesc = NewCharDescription(FeatureDefs);
for (Type = 0; Type < CharDesc->NumFeatureSets; Type++)
if (FeatureDefs.FeatureExtractors[Type] != NULL &&
FeatureDefs.FeatureExtractors[Type]->Extractor != NULL) {
CharDesc->FeatureSets[Type] =
(FeatureDefs.FeatureExtractors[Type])->Extractor(Blob, denorm);
if (CharDesc->FeatureSets[Type] == NULL) {
FreeCharDescription(CharDesc);
return NULL;
}
}
return (CharDesc);
} /* ExtractFlexFeatures */