14 #ifndef TESSERACT_TEXTORD_TEXTLINEPROJECTION_H_ 15 #define TESSERACT_TEXTORD_TEXTLINEPROJECTION_H_ 48 const FCOORD& rotation, Pix* nontext_map);
58 BLOBNBOX_LIST* small_blobs)
const;
68 const DENORM* denorm,
bool debug)
const;
79 bool horizontal_textline,
80 const DENORM* denorm,
bool debug)
const;
130 int EvaluateBoxInternal(
const TBOX& box,
const DENORM* denorm,
bool debug,
131 int* hgrad1,
int* hgrad2,
132 int* vgrad1,
int* vgrad2)
const;
139 int BestMeanGradientInRow(
const DENORM* denorm, int16_t min_x, int16_t max_x,
140 int16_t y,
bool best_is_max)
const;
148 int BestMeanGradientInColumn(
const DENORM* denorm, int16_t x, int16_t min_y,
149 int16_t max_y,
bool best_is_max)
const;
161 int MeanPixelsInLineSegment(
const DENORM* denorm,
int offset,
166 void IncrementRectangle8Bit(
const TBOX& box);
173 void ProjectBlobs(BLOBNBOX_LIST* blobs,
const FCOORD& rotation,
174 const TBOX& image_box, Pix* nontext_map);
182 void TransformToPixCoords(
const DENORM* denorm,
TPOINT* pt)
const;
185 void TruncateToImageBounds(
TPOINT* pt)
const;
188 int ImageXToProjectionX(
int x)
const;
189 int ImageYToProjectionY(
int y)
const;
206 #endif // TESSERACT_TEXTORD_TEXTLINEPROJECTION_H_ int VerticalDistance(bool debug, int x, int y1, int y2) const
void MoveNonTextlineBlobs(BLOBNBOX_LIST *blobs, BLOBNBOX_LIST *small_blobs) const
TextlineProjection(int resolution)
void DisplayProjection() const
int DistanceOfBoxFromBox(const TBOX &from_box, const TBOX &to_box, bool horizontal_textline, const DENORM *denorm, bool debug) const
int DistanceOfBoxFromPartition(const TBOX &box, const ColPartition &part, const DENORM *denorm, bool debug) const
void ConstructProjection(TO_BLOCK *input_block, const FCOORD &rotation, Pix *nontext_map)
int EvaluateBox(const TBOX &box, const DENORM *denorm, bool debug) const
bool BoxOutOfHTextline(const TBOX &box, const DENORM *denorm, bool debug) const
int EvaluateColPartition(const ColPartition &part, const DENORM *denorm, bool debug) const
int HorizontalDistance(bool debug, int x1, int x2, int y) const
void PlotGradedBlobs(BLOBNBOX_LIST *blobs, ScrollView *win)