tesseract
4.0.0-1-g2a2b
|
#include "picofeat.h"
#include "classify.h"
#include "featdefs.h"
#include "fpoint.h"
#include "mfoutline.h"
#include "ocrfeatures.h"
#include "params.h"
#include "trainingsample.h"
#include <cmath>
#include <cstdio>
Go to the source code of this file.
Namespaces | |
tesseract | |
Functions | |
void | ConvertSegmentToPicoFeat (FPOINT *Start, FPOINT *End, FEATURE_SET FeatureSet) |
void | ConvertToPicoFeatures2 (MFOUTLINE Outline, FEATURE_SET FeatureSet) |
void | NormalizePicoX (FEATURE_SET FeatureSet) |
Variables | |
double | classify_pico_feature_length = 0.05 |
void ConvertSegmentToPicoFeat | ( | FPOINT * | Start, |
FPOINT * | End, | ||
FEATURE_SET | FeatureSet | ||
) |
This routine converts an entire segment of an outline into a set of pico features which are added to FeatureSet. The length of the segment is rounded to the nearest whole number of pico-features. The pico-features are spaced evenly over the entire segment. Globals:
Start | starting point of pico-feature |
End | ending point of pico-feature |
FeatureSet | set to add pico-feature to |
Definition at line 104 of file picofeat.cpp.
void ConvertToPicoFeatures2 | ( | MFOUTLINE | Outline, |
FEATURE_SET | FeatureSet | ||
) |
This routine steps through the specified outline and cuts it up into pieces of equal length. These pieces become the desired pico-features. Each segment in the outline is converted into an integral number of pico-features.
Globals:
Outline | outline to extract micro-features from |
FeatureSet | set of features to add pico-features to |
Definition at line 156 of file picofeat.cpp.
void NormalizePicoX | ( | FEATURE_SET | FeatureSet | ) |
This routine computes the average x position over all of the pico-features in FeatureSet and then renormalizes the pico-features to force this average to be the x origin (i.e. x=0).
FeatureSet | pico-features to be normalized |
Definition at line 195 of file picofeat.cpp.
double classify_pico_feature_length = 0.05 |
"Pico Feature Length"
Definition at line 38 of file picofeat.cpp.