Skip to content

Commit

Permalink
ccmain: Remove unused constants
Browse files Browse the repository at this point in the history
In osdetect.cpp, a local definition of kMinCredibleResolution was
identical to a global one, so the local one could be removed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Sep 6, 2016
1 parent fcd5f7d commit a5b61e2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions ccmain/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
#define MAX_XHEIGHT_DIFF 3

const char* const kBackUpConfigFile = "tempconfigdata.config";
// Multiple of x-height to make a repeated word have spaces in it.
const double kRepcharGapThreshold = 0.5;
// Min believable x-height for any text when refitting as a fraction of
// original x-height
const double kMinRefitXHeightFraction = 0.5;
Expand Down
4 changes: 0 additions & 4 deletions ccmain/osdetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const int kMaxCharactersToTry = 5 * kMinCharactersToTry;
const float kSizeRatioToReject = 2.0;
const int kMinAcceptableBlobHeight = 10;

const float kOrientationAcceptRatio = 1.3;
const float kScriptAcceptRatio = 1.3;

const float kHanRatioInKorean = 0.7;
Expand All @@ -61,8 +60,6 @@ const char* ScriptDetector::fraktur_script_ = "Fraktur";

// Minimum believable resolution.
const int kMinCredibleResolution = 70;
// Default resolution used if input is not believable.
const int kDefaultResolution = 300;

void OSResults::update_best_orientation() {
float first = orientations[0];
Expand Down Expand Up @@ -167,7 +164,6 @@ void remove_nontext_regions(tesseract::Tesseract *tess, BLOCK_LIST *blocks,
int vertical_y = 1;
tesseract::TabVector_LIST v_lines;
tesseract::TabVector_LIST h_lines;
const int kMinCredibleResolution = 70;
int resolution = (kMinCredibleResolution > pixGetXRes(pix)) ?
kMinCredibleResolution : pixGetXRes(pix);

Expand Down
4 changes: 0 additions & 4 deletions ccmain/pagesegmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@

namespace tesseract {

/// Minimum believable resolution.
const int kMinCredibleResolution = 70;
/// Default resolution used if input in not believable.
const int kDefaultResolution = 300;
// Max erosions to perform in removing an enclosing circle.
const int kMaxCircleErosions = 8;

Expand Down

0 comments on commit a5b61e2

Please sign in to comment.