classify: Remove deprecated method ExtractIntFeat (#1422)

It was deprecated with commit 99edf4ccb four years ago.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2018-03-25 17:34:41 +02:00 committed by zdenop
parent bf0bddb9ca
commit 3dcab4e187
2 changed files with 0 additions and 51 deletions

View File

@ -487,47 +487,3 @@ void Classify::ExtractFeatures(const TBLOB& blob,
}
} // namespace tesseract
/*--------------------------------------------------------------------------*/
// Extract a set of standard-sized features from Blobs and write them out in
// two formats: baseline normalized and character normalized.
//
// We presume the Blobs are already scaled so that x-height=128 units
//
// Standard Features:
// We take all outline segments longer than 7 units and chop them into
// standard-sized segments of approximately 13 = (64 / 5) units.
// When writing these features out, we output their center and angle as
// measured counterclockwise from the vector <-1, 0>
//
// Baseline Normalized Output:
// We center the grapheme by aligning the x-coordinate of its centroid with
// x=0 and subtracting 128 from the y-coordinate.
//
// Character Normalized Output:
// We align the grapheme's centroid at the origin and scale it asymmetrically
// in x and y so that the result is vaguely square.
//
// Deprecated! Prefer tesseract::Classify::ExtractFeatures instead.
bool ExtractIntFeat(const TBLOB& blob,
bool nonlinear_norm,
INT_FEATURE_ARRAY baseline_features,
INT_FEATURE_ARRAY charnorm_features,
INT_FX_RESULT_STRUCT* results) {
GenericVector<INT_FEATURE_STRUCT> bl_features;
GenericVector<INT_FEATURE_STRUCT> cn_features;
tesseract::Classify::ExtractFeatures(blob, nonlinear_norm,
&bl_features, &cn_features, results,
NULL);
if (bl_features.empty() || cn_features.empty() ||
bl_features.size() > MAX_NUM_INT_FEATURES ||
cn_features.size() > MAX_NUM_INT_FEATURES) {
return false; // Feature extraction failed.
}
memcpy(baseline_features, &bl_features[0],
bl_features.size() * sizeof(bl_features[0]));
memcpy(charnorm_features, &cn_features[0],
cn_features.size() * sizeof(cn_features[0]));
return true;
}

View File

@ -65,11 +65,4 @@ namespace tesseract {
GenericVector<INT_FEATURE_STRUCT>* bl_features);
}
// Deprecated! Prefer tesseract::Classify::ExtractFeatures instead.
bool ExtractIntFeat(const TBLOB& blob,
bool nonlinear_norm,
INT_FEATURE_ARRAY BLFeat,
INT_FEATURE_ARRAY CNFeat,
INT_FX_RESULT_STRUCT* Results);
#endif