mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 06:53:36 +08:00
commit
944c1d9bff
@ -62,7 +62,7 @@ bool Tesseract::TrainLineRecognizer(const STRING& input_imagename,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TrainFromBoxes(boxes, texts, block_list, &images);
|
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());
|
tprintf("Failed to read pages from %s\n", input_imagename.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -233,6 +233,9 @@ class DocumentData {
|
|||||||
std::lock_guard<std::mutex> lock(general_mutex_);
|
std::lock_guard<std::mutex> lock(general_mutex_);
|
||||||
return total_pages_;
|
return total_pages_;
|
||||||
}
|
}
|
||||||
|
size_t PagesSize() const {
|
||||||
|
return pages_.size();
|
||||||
|
}
|
||||||
int64_t memory_used() const {
|
int64_t memory_used() const {
|
||||||
std::lock_guard<std::mutex> lock(general_mutex_);
|
std::lock_guard<std::mutex> lock(general_mutex_);
|
||||||
return memory_used_;
|
return memory_used_;
|
||||||
|
Loading…
Reference in New Issue
Block a user