Skip to content

Commit

Permalink
Merge pull request tesseract-ocr#2751 from stweil/master
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Nov 8, 2019
2 parents 0406f77 + ac46b28 commit 944c1d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ccmain/linerec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool Tesseract::TrainLineRecognizer(const STRING& input_imagename,
return false;
}
TrainFromBoxes(boxes, texts, block_list, &images);
if (images.NumPages() <= 0) {
if (images.PagesSize() == 0) {
tprintf("Failed to read pages from %s\n", input_imagename.c_str());
return false;
}
Expand Down
3 changes: 3 additions & 0 deletions src/ccstruct/imagedata.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ class DocumentData {
std::lock_guard<std::mutex> lock(general_mutex_);
return total_pages_;
}
size_t PagesSize() const {
return pages_.size();
}
int64_t memory_used() const {
std::lock_guard<std::mutex> lock(general_mutex_);
return memory_used_;
Expand Down

0 comments on commit 944c1d9

Please sign in to comment.