Skip to content

Commit

Permalink
Merge pull request #1070 from stweil/resolution
Browse files Browse the repository at this point in the history
Change default resolution from 70 to 300 dpi
  • Loading branch information
egorpugin authored Aug 8, 2017
2 parents 5f5e85e + 0720b3f commit efa50da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/baseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ const int kMaxIntSize = 22;
const int kMinCredibleResolution = 70;
/** Maximum believable resolution. */
const int kMaxCredibleResolution = 2400;
/** Default resolution. */
const int kDefaultResolution = 300;

TessBaseAPI::TessBaseAPI()
: tesseract_(nullptr),
Expand Down Expand Up @@ -2199,8 +2201,8 @@ bool TessBaseAPI::Threshold(Pix** pix) {
// Use the minimum default resolution, as it is safer to under-estimate
// than over-estimate resolution.
tprintf("Warning. Invalid resolution %d dpi. Using %d instead.\n", y_res,
kMinCredibleResolution);
thresholder_->SetSourceYResolution(kMinCredibleResolution);
kDefaultResolution);
thresholder_->SetSourceYResolution(kDefaultResolution);
}
PageSegMode pageseg_mode =
static_cast<PageSegMode>(
Expand Down

0 comments on commit efa50da

Please sign in to comment.