Skip to content

Commit d40b28f

Browse files
committed
textord: Remove unused constants
Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent db2a8e9 commit d40b28f

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

textord/colfind.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,12 @@
4444

4545
namespace tesseract {
4646

47-
// Minimum width (in pixels) to be considered when making columns.
48-
// TODO(rays) convert to inches, dependent on resolution.
49-
const int kMinColumnWidth = 100;
5047
// When assigning columns, the max number of misfit grid rows/ColPartitionSets
5148
// that can be ignored.
5249
const int kMaxIncompatibleColumnCount = 2;
53-
// Min fraction of ColPartition height to be overlapping for margin purposes.
54-
const double kMarginOverlapFraction = 0.25;
5550
// Max fraction of mean_column_gap_ for the gap between two partitions within a
5651
// column to allow them to merge.
5752
const double kHorizontalGapMergeFraction = 0.5;
58-
// Min fraction of grid size to not be considered likely noise.
59-
const double kMinNonNoiseFraction = 0.5;
6053
// Minimum gutter width as a fraction of gridsize
6154
const double kMinGutterWidthGrid = 0.5;
6255
// Max multiple of a partition's median size as a distance threshold for

textord/strokewidth.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ const double kMaxDiacriticDistanceRatio = 1.25;
8484
// Max x-gap between a diacritic and its base char as a fraction of the height
8585
// of the base char (allowing other blobs to fill the gap.)
8686
const double kMaxDiacriticGapToBaseCharHeight = 1.0;
87-
// Radius of a search for diacritics in grid units.
88-
const int kSearchRadius = 2;
8987
// Ratio between longest side of a line and longest side of a character.
9088
// (neighbor_min > blob_min * kLineTrapShortest &&
9189
// neighbor_max < blob_max / kLineTrapLongest)
@@ -104,18 +102,13 @@ const int kLineResiduePadRatio = 3;
104102
const double kLineResidueSizeRatio = 1.75;
105103
// Aspect ratio filter for OSD.
106104
const float kSizeRatioToReject = 2.0;
107-
// Max number of normal blobs a large blob may overlap before it is rejected
108-
// and determined to be image
109-
const int kMaxLargeOverlaps = 3;
110105
// Expansion factor for search box for good neighbours.
111106
const double kNeighbourSearchFactor = 2.5;
112107
// Factor of increase of overlap when adding diacritics to make an image noisy.
113108
const double kNoiseOverlapGrowthFactor = 4.0;
114109
// Fraction of the image size to add overlap when adding diacritics for an
115110
// image to qualify as noisy.
116111
const double kNoiseOverlapAreaFactor = 1.0 / 512;
117-
// Ratio of perimeter^2/area for a blob to be considered noise vs i dot.
118-
const double kShapePerimeterRatio = 3.0;
119112

120113
StrokeWidth::StrokeWidth(int gridsize,
121114
const ICOORD& bleft, const ICOORD& tright)

textord/tablefind.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ const int kLargeTableRowCount = 6;
114114
// Minimum number of rows in a table
115115
const int kMinRowsInTable = 3;
116116

117-
// The number of "whitespace blobs" that should appear between the
118-
// ColPartition's bounding box and the column tab stops to the left/right
119-
// when looking for center justified tab stops.
120-
const double kRequiredFullJustifiedSpacing = 4.0;
121-
122117
// The amount of padding (multiplied by global_median_xheight_ during use)
123118
// that is vertically added to the search adjacent leader search during
124119
// ColPartition marking.

textord/tordmain.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838

3939
#include "allheaders.h"
4040

41-
// Gridsize for word grid when reassigning diacritics to words. Not critical.
42-
const int kWordGridSize = 50;
43-
4441
#undef EXTERN
4542
#define EXTERN
4643

0 commit comments

Comments
 (0)