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
normfeat.cpp File Reference
`#include "normfeat.h"`
`#include "intfx.h"`
`#include "featdefs.h"`
`#include "mfoutline.h"`

Go to the source code of this file.

## Functions
FLOAT32 | ActualOutlineLength (FEATURE Feature)
FEATURE_SET | ExtractCharNormFeatures (TBLOB *blob, const DENORM &denorm)

## Function Documentation

FLOAT32 ActualOutlineLength | ( | FEATURE | Feature | ) |

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

Definition at line 32 of file normfeat.cpp.

{
return (Feature->Params[CharNormLength] * LENGTH_COMPRESSION);
}

FEATURE_SET ExtractCharNormFeatures | ( | TBLOB * | blob,
|  | const DENORM & | denorm
| ) |  |

Definition at line 62 of file normfeat.cpp.

{
FEATURE_SET feature_set = NewFeatureSet(1);
FEATURE feature = NewFeature(&CharNormDesc);
INT_FEATURE_ARRAY blfeatures;
INT_FEATURE_ARRAY cnfeatures;
INT_FX_RESULT_STRUCT FXInfo;
ExtractIntFeat(blob, denorm, blfeatures, cnfeatures, &FXInfo);
feature->Params[CharNormY] =
MF_SCALE_FACTOR * (FXInfo.Ymean - BASELINE_OFFSET);
feature->Params[CharNormLength] =
MF_SCALE_FACTOR * FXInfo.Length / LENGTH_COMPRESSION;
feature->Params[CharNormRx] = MF_SCALE_FACTOR * FXInfo.Rx;
feature->Params[CharNormRy] = MF_SCALE_FACTOR * FXInfo.Ry;
AddFeature(feature_set, feature);
return feature_set;
} /* ExtractCharNormFeatures */