Tesseract
3.02
|
Go to the source code of this file.
Defines | |
#define | MAX_PICO_FEATURES (1000) |
#define | GetPicoFeatureLength() (PicoFeatureLength) |
Enumerations | |
enum | IntParams { IntX, IntY, IntDir } |
enum | GeoParams { GeoBottom, GeoTop, GeoWidth, GeoCount } |
enum | PICO_FEAT_PARAM_NAME { PicoFeatY, PicoFeatDir, PicoFeatX } |
Functions | |
FEATURE_SET | ExtractIntCNFeatures (TBLOB *Blob, const DENORM &denorm) |
FEATURE_SET | ExtractIntGeoFeatures (TBLOB *Blob, const DENORM &denorm) |
Variables | |
double | classify_pico_feature_length = 0.05 |
FLOAT32 | PicoFeatureLength |
#define GetPicoFeatureLength | ( | ) | (PicoFeatureLength) |
---------------------------------------------------------------------------- Public Function Prototypes ----------------------------------------------------------------------------
Definition at line 59 of file picofeat.h.
#define MAX_PICO_FEATURES (1000) |
Definition at line 47 of file picofeat.h.
enum GeoParams |
Definition at line 35 of file picofeat.h.
enum IntParams |
---------------------------------------------------------------------------- Include Files and Type Defines ----------------------------------------------------------------------------
Definition at line 28 of file picofeat.h.
enum PICO_FEAT_PARAM_NAME |
Definition at line 43 of file picofeat.h.
{ PicoFeatY, PicoFeatDir, PicoFeatX }
FEATURE_SET ExtractIntCNFeatures | ( | TBLOB * | Blob, |
const DENORM & | denorm | ||
) |
Definition at line 227 of file picofeat.cpp.
{ /* ** Parameters: ** blob blob to extract features from ** denorm normalization/denormalization parameters. ** Return: Integer character-normalized features for blob. ** Exceptions: none ** History: 8/8/2011, rays, Created. */ tesseract::TrainingSample* sample = GetIntFeatures( tesseract::NM_CHAR_ANISOTROPIC, blob, denorm); if (sample == NULL) return NULL; int num_features = sample->num_features(); const INT_FEATURE_STRUCT* features = sample->features(); FEATURE_SET feature_set = NewFeatureSet(num_features); for (int f = 0; f < num_features; ++f) { FEATURE feature = NewFeature(&IntFeatDesc); feature->Params[IntX] = features[f].X; feature->Params[IntY] = features[f].Y; feature->Params[IntDir] = features[f].Theta; AddFeature(feature_set, feature); } delete sample; return feature_set; } /* ExtractIntCNFeatures */
FEATURE_SET ExtractIntGeoFeatures | ( | TBLOB * | Blob, |
const DENORM & | denorm | ||
) |
Definition at line 257 of file picofeat.cpp.
{ /* ** Parameters: ** blob blob to extract features from ** denorm normalization/denormalization parameters. ** Return: Geometric (top/bottom/width) features for blob. ** Exceptions: none ** History: 8/8/2011, rays, Created. */ tesseract::TrainingSample* sample = GetIntFeatures( tesseract::NM_CHAR_ANISOTROPIC, blob, denorm); if (sample == NULL) return NULL; FEATURE_SET feature_set = NewFeatureSet(1); FEATURE feature = NewFeature(&IntFeatDesc); feature->Params[GeoBottom] = sample->geo_feature(GeoBottom); feature->Params[GeoTop] = sample->geo_feature(GeoTop); feature->Params[GeoWidth] = sample->geo_feature(GeoWidth); AddFeature(feature_set, feature); delete sample; return feature_set; } /* ExtractIntGeoFeatures */
double classify_pico_feature_length = 0.05 |
"Pico Feature Length"
---------------------------------------------------------------------------- Include Files and Type Defines ---------------------------------------------------------------------------- "Pico Feature Length"
Definition at line 39 of file picofeat.cpp.
---------------------------------------------------------------------------- Global Data Definitions and Declarations ----------------------------------------------------------------------------