Skip to content

Commit

Permalink
Merge pull request tesseract-ocr#3090 from nam-leduc/correct-debug-fi…
Browse files Browse the repository at this point in the history
…nd-images

Correct "NoImages" in debug pdf file
  • Loading branch information
zdenop authored Sep 7, 2020
2 parents 162f370 + eb8f167 commit f5561c4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ccmain/pagesegmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,14 @@ ColumnFinder* Tesseract::SetupPageSegAndDetectOrientation(
// Leptonica is used to find a mask of the photo regions in the input.
*photo_mask_pix = ImageFind::FindImages(pix_binary_, &pixa_debug_);
if (tessedit_dump_pageseg_images) {
pixa_debug_.AddPix(pix_binary_, "NoImages");
Pix* pix_no_image_ = nullptr;
if (*photo_mask_pix != nullptr) {
pix_no_image_ = pixSubtract(nullptr, pix_binary_, *photo_mask_pix);
} else {
pix_no_image_ = pixClone(pix_binary_);
}
pixa_debug_.AddPix(pix_no_image_, "NoImages");
pixDestroy(&pix_no_image_);
}
if (!PSM_COL_FIND_ENABLED(pageseg_mode)) v_lines.clear();

Expand Down

0 comments on commit f5561c4

Please sign in to comment.