Skip to content

Commit

Permalink
textord: Remove unused constants
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Sep 6, 2016
1 parent db2a8e9 commit d40b28f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
7 changes: 0 additions & 7 deletions textord/colfind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,12 @@

namespace tesseract {

// Minimum width (in pixels) to be considered when making columns.
// TODO(rays) convert to inches, dependent on resolution.
const int kMinColumnWidth = 100;
// When assigning columns, the max number of misfit grid rows/ColPartitionSets
// that can be ignored.
const int kMaxIncompatibleColumnCount = 2;
// Min fraction of ColPartition height to be overlapping for margin purposes.
const double kMarginOverlapFraction = 0.25;
// Max fraction of mean_column_gap_ for the gap between two partitions within a
// column to allow them to merge.
const double kHorizontalGapMergeFraction = 0.5;
// Min fraction of grid size to not be considered likely noise.
const double kMinNonNoiseFraction = 0.5;
// Minimum gutter width as a fraction of gridsize
const double kMinGutterWidthGrid = 0.5;
// Max multiple of a partition's median size as a distance threshold for
Expand Down
7 changes: 0 additions & 7 deletions textord/strokewidth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ const double kMaxDiacriticDistanceRatio = 1.25;
// Max x-gap between a diacritic and its base char as a fraction of the height
// of the base char (allowing other blobs to fill the gap.)
const double kMaxDiacriticGapToBaseCharHeight = 1.0;
// Radius of a search for diacritics in grid units.
const int kSearchRadius = 2;
// Ratio between longest side of a line and longest side of a character.
// (neighbor_min > blob_min * kLineTrapShortest &&
// neighbor_max < blob_max / kLineTrapLongest)
Expand All @@ -104,18 +102,13 @@ const int kLineResiduePadRatio = 3;
const double kLineResidueSizeRatio = 1.75;
// Aspect ratio filter for OSD.
const float kSizeRatioToReject = 2.0;
// Max number of normal blobs a large blob may overlap before it is rejected
// and determined to be image
const int kMaxLargeOverlaps = 3;
// Expansion factor for search box for good neighbours.
const double kNeighbourSearchFactor = 2.5;
// Factor of increase of overlap when adding diacritics to make an image noisy.
const double kNoiseOverlapGrowthFactor = 4.0;
// Fraction of the image size to add overlap when adding diacritics for an
// image to qualify as noisy.
const double kNoiseOverlapAreaFactor = 1.0 / 512;
// Ratio of perimeter^2/area for a blob to be considered noise vs i dot.
const double kShapePerimeterRatio = 3.0;

StrokeWidth::StrokeWidth(int gridsize,
const ICOORD& bleft, const ICOORD& tright)
Expand Down
5 changes: 0 additions & 5 deletions textord/tablefind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ const int kLargeTableRowCount = 6;
// Minimum number of rows in a table
const int kMinRowsInTable = 3;

// The number of "whitespace blobs" that should appear between the
// ColPartition's bounding box and the column tab stops to the left/right
// when looking for center justified tab stops.
const double kRequiredFullJustifiedSpacing = 4.0;

// The amount of padding (multiplied by global_median_xheight_ during use)
// that is vertically added to the search adjacent leader search during
// ColPartition marking.
Expand Down
3 changes: 0 additions & 3 deletions textord/tordmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@

#include "allheaders.h"

// Gridsize for word grid when reassigning diacritics to words. Not critical.
const int kWordGridSize = 50;

#undef EXTERN
#define EXTERN

Expand Down

0 comments on commit d40b28f

Please sign in to comment.