Remove code for old versions of Leptonica

Those versions are no longer supported.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2016-12-22 11:00:00 +01:00
parent e8d477c538
commit 680bfddb4f
2 changed files with 0 additions and 7 deletions

View File

@ -624,10 +624,6 @@ void EquationDetect::IdentifySeedParts() {
}
float EquationDetect::ComputeForegroundDensity(const TBOX& tbox) {
#if LIBLEPT_MINOR_VERSION < 69 && LIBLEPT_MAJOR_VERSION <= 1
// This will disable the detector because no seed will be identified.
return 1.0f;
#else
Pix *pix_bi = lang_tesseract_->pix_binary();
int pix_height = pixGetHeight(pix_bi);
Box* box = boxCreate(tbox.left(), pix_height - tbox.top(),
@ -639,7 +635,6 @@ float EquationDetect::ComputeForegroundDensity(const TBOX& tbox) {
boxDestroy(&box);
return fract;
#endif
}
bool EquationDetect::CheckSeedFgDensity(const float density_th,

View File

@ -306,10 +306,8 @@ void LineFinder::FindAndRemoveLines(int resolution, bool debug, Pix* pix,
pixDestroy(&pix_non_hline);
pixDestroy(&pix_intersections);
if (pixa_display != NULL) {
#if LIBLEPT_MINOR_VERSION >= 69 || LIBLEPT_MAJOR_VERSION > 1
pixaConvertToPdf(pixa_display, resolution, 1.0f, 0, 0, "LineFinding",
"vhlinefinding.pdf");
#endif
pixaDestroy(&pixa_display);
}
PERF_COUNT_END