Skip to content

Commit a5b61e2

Browse files
committed
ccmain: Remove unused constants
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 <[email protected]>
1 parent fcd5f7d commit a5b61e2

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

ccmain/control.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
#define MAX_XHEIGHT_DIFF 3
5252

5353
const char* const kBackUpConfigFile = "tempconfigdata.config";
54-
// Multiple of x-height to make a repeated word have spaces in it.
55-
const double kRepcharGapThreshold = 0.5;
5654
// Min believable x-height for any text when refitting as a fraction of
5755
// original x-height
5856
const double kMinRefitXHeightFraction = 0.5;

ccmain/osdetect.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const int kMaxCharactersToTry = 5 * kMinCharactersToTry;
3939
const float kSizeRatioToReject = 2.0;
4040
const int kMinAcceptableBlobHeight = 10;
4141

42-
const float kOrientationAcceptRatio = 1.3;
4342
const float kScriptAcceptRatio = 1.3;
4443

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

6261
// Minimum believable resolution.
6362
const int kMinCredibleResolution = 70;
64-
// Default resolution used if input is not believable.
65-
const int kDefaultResolution = 300;
6663

6764
void OSResults::update_best_orientation() {
6865
float first = orientations[0];
@@ -167,7 +164,6 @@ void remove_nontext_regions(tesseract::Tesseract *tess, BLOCK_LIST *blocks,
167164
int vertical_y = 1;
168165
tesseract::TabVector_LIST v_lines;
169166
tesseract::TabVector_LIST h_lines;
170-
const int kMinCredibleResolution = 70;
171167
int resolution = (kMinCredibleResolution > pixGetXRes(pix)) ?
172168
kMinCredibleResolution : pixGetXRes(pix);
173169

ccmain/pagesegmain.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@
5454

5555
namespace tesseract {
5656

57-
/// Minimum believable resolution.
58-
const int kMinCredibleResolution = 70;
59-
/// Default resolution used if input in not believable.
60-
const int kDefaultResolution = 300;
6157
// Max erosions to perform in removing an enclosing circle.
6258
const int kMaxCircleErosions = 8;
6359

0 commit comments

Comments
 (0)