Fixed problem with blank pages

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@750 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
theraysmith@gmail.com 2012-09-21 15:27:25 +00:00
parent b301d39e2b
commit fbf7968490

View File

@ -634,8 +634,7 @@ PageIterator* TessBaseAPI::AnalyseLayout() {
page_res_ = new PAGE_RES(block_list_, NULL);
DetectParagraphs(false);
return new PageIterator(
page_res_, tesseract_,
thresholder_->GetScaleFactor(),
page_res_, tesseract_, thresholder_->GetScaleFactor(),
thresholder_->GetScaledYResolution(),
rect_left_, rect_top_, rect_width_, rect_height_);
}
@ -653,6 +652,10 @@ int TessBaseAPI::Recognize(ETEXT_DESC* monitor) {
return -1;
if (page_res_ != NULL)
delete page_res_;
if (block_list_->empty()) {
page_res_ = new PAGE_RES(block_list_, &tesseract_->prev_word_best_choice_);
return 0; // Empty page.
}
tesseract_->SetBlackAndWhitelist();
recognition_done_ = true;