mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
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:
parent
e8d477c538
commit
680bfddb4f
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user