Skip to content

Commit

Permalink
Update fopr leptonica 1.74
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Smith committed Sep 8, 2017
1 parent a2a72d7 commit f25cc27
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions textord/imagefind.cpp
Expand Up @@ -84,9 +84,19 @@ Pix* ImageFind::FindImages(Pix* pix, DebugPixa* pixa_debug) {
pixDestroy(&pixr);
return pixCreate(pixGetWidth(pix), pixGetHeight(pix), 1);
}
// Get the halftone mask.
l_int32 ht_found = 0;
Pix *pixht2 = pixGenHalftoneMask(pixr, NULL, &ht_found,
textord_tabfind_show_images);
Pixa* pixadb = (textord_tabfind_show_images && pixa_debug != nullptr)
? pixaCreate(0)
: nullptr;
Pix* pixht2 = pixGenerateHalftoneMask(pixr, NULL, &ht_found, pixadb);
if (pixadb) {
Pix* pixdb = pixaDisplayTiledInColumns(pixadb, 3, 1.0, 20, 2);
if (textord_tabfind_show_images && pixa_debug != nullptr)
pixa_debug->AddPix(pixdb, "HalftoneMask");
pixDestroy(&pixdb);
pixaDestroy(&pixadb);
}
pixDestroy(&pixr);
if (!ht_found && pixht2 != NULL)
pixDestroy(&pixht2);
Expand Down

0 comments on commit f25cc27

Please sign in to comment.