Skip to content

Commit

Permalink
Merge pull request #2962 from stweil/GetPageRes
Browse files Browse the repository at this point in the history
Add TessBaseAPI::GetPageRes again
  • Loading branch information
zdenop authored May 4, 2020
2 parents acc4c8b + 9173e6e commit 79c3ebb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions include/tesseract/baseapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,10 @@ class TESS_API TessBaseAPI {
//// paragraphs.cpp ////////////////////////////////////////////////////
TESS_LOCAL void DetectParagraphs(bool after_text_recognition);

TESS_LOCAL const PAGE_RES* GetPageRes() const {
return page_res_;
}

protected:
Tesseract* tesseract_; ///< The underlying data object.
Tesseract* osd_tesseract_; ///< For orientation & script detection.
Expand Down
5 changes: 0 additions & 5 deletions unittest/baseapi_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@ TEST_F(TesseractTest, BasicLSTMTest) {
// errors due to float/int conversions (e.g., see OUTLINE::move() in
// ccstruct/poutline.h) Instead, we do a loose check.
TEST_F(TesseractTest, LSTMGeometryTest) {
#ifdef DISABLED_LEGACY_ENGINE
// Skip test because TessBaseAPI::GetPageRes is missing.
GTEST_SKIP();
#else
Pix* src_pix = pixRead(TestDataNameToPath("deslant.tif").c_str());
FriendlyTessBaseAPI api;
if (api.Init(TessdataPath().c_str(), "eng", tesseract::OEM_LSTM_ONLY) == -1) {
Expand Down Expand Up @@ -303,7 +299,6 @@ TEST_F(TesseractTest, LSTMGeometryTest) {
}
}
pixDestroy(&src_pix);
#endif
}

TEST_F(TesseractTest, InitConfigOnlyTest) {
Expand Down

0 comments on commit 79c3ebb

Please sign in to comment.