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
Macros | Enumerations | Functions
normfeat.h File Reference
`#include "ocrfeatures.h"`

Go to the source code of this file.

## Macros

#define | LENGTH_COMPRESSION (10.0)

## Enumerations

enum | NORM_PARAM_NAME { CharNormY, CharNormLength, CharNormRx, CharNormRy }

## Functions

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

## Macro Definition Documentation

#define LENGTH_COMPRESSION (10.0)

Include Files and Type Defines —————————————————————————-

Definition at line 26 of file normfeat.h.

## Enumeration Type Documentation

enum NORM_PARAM_NAME

Enumerator:

  CharNormY |
  CharNormLength |
  CharNormRx |
  CharNormRy |

Definition at line 28 of file normfeat.h.

{
CharNormY, CharNormLength, CharNormRx, CharNormRy
} NORM_PARAM_NAME;

## Function Documentation

FLOAT32 ActualOutlineLength | ( | FEATURE | Feature | ) |

Public Function Prototypes —————————————————————————-

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 */