59 TPOINT(int16_t vx, int16_t vy) :
x(vx),
y(vy) {}
71 return x == other.
x &&
y == other.
y;
109 return x_dist * x_dist * x_factor + y_dist * y_dist;
124 }
while (pt != end && pt !=
this);
136 }
while (pt != end && pt !=
this);
146 if (pt == end)
return true;
149 }
while (pt !=
this &&
count <= min_points);
161 return flags[0] != 0;
167 return flags[2] != 0;
188 TESSLINE() : is_hole(false), loop(nullptr), next(nullptr) {}
208 void Rotate(
const FCOORD rotation);
210 void Move(
const ICOORD vec);
212 void Scale(
float factor);
216 void ComputeBoundingBox();
222 void MinMaxCrossProduct(
const TPOINT vec,
int* min_xp,
int* max_xp)
const;
224 TBOX bounding_box()
const;
231 if (Contains(pt1) && Contains(pt2)) {
236 }
while (pt != loop);
242 return topleft.x <= pt.
x && pt.
x <= botright.x &&
243 botright.y <= pt.
y && pt.
y <= topleft.y;
246 #ifndef GRAPHICS_DISABLED 249 #endif // GRAPHICS_DISABLED 253 EDGEPT* FindBestStartPt()
const;
257 return (botright.x - topleft.x) * (topleft.y - botright.y);
303 const DENORM* predecessor,
304 float x_origin,
float y_origin,
305 float x_scale,
float y_scale,
306 float final_xshift,
float final_yshift,
307 bool inverse, Pix* pix);
313 void Scale(
float factor);
325 outline = outline->
next) {
326 if (outline->SegmentCrosses(pt1, pt2))
return true;
333 outline = outline->
next) {
334 if (outline->Contains(pt))
return true;
351 #ifndef GRAPHICS_DISABLED 354 #endif // GRAPHICS_DISABLED 359 total_area += outline->BBArea();
392 void CollectEdges(
const TBOX& box,
420 float x_height,
float baseline_shift,
bool numeric_mode,
422 const TBOX* norm_box,
void BLNormalize(const BLOCK *block, const ROW *row, Pix *pix, bool inverse, float x_height, float baseline_shift, bool numeric_mode, tesseract::OcrEngineMode hint, const TBOX *norm_box, DENORM *word_denorm)
int ComputeMoments(FCOORD *center, FCOORD *second_moments) const
static TBLOB * PolygonalCopy(bool allow_detailed_fx, C_BLOB *src)
TESSLINE(const TESSLINE &src)
TBOX SegmentBox(const EDGEPT *end) const
void CopyFrom(const TBLOB &src)
void plot(ScrollView *window, ScrollView::Color color, ScrollView::Color child_color)
bool ShortNonCircularSegment(int min_points, const EDGEPT *end) const
TBOX bounding_box() const
void operator+=(const TPOINT &other)
bool Contains(const TPOINT &pt) const
EDGEPT(const EDGEPT &src)
TWERD & operator=(const TWERD &src)
TBLOB & operator=(const TBLOB &src)
bool operator==(const TPOINT &other) const
bool SegmentCrosses(const TPOINT &pt1, const TPOINT &pt2) const
void operator/=(int divisor)
bool SegmentCrossesOutline(const TPOINT &pt1, const TPOINT &pt2) const
void EliminateDuplicateOutlines()
CLISTIZEH(STRING) CLISTIZE(STRING) namespace tesseract
void Normalize(const BLOCK *block, const FCOORD *rotation, const DENORM *predecessor, float x_origin, float y_origin, float x_scale, float y_scale, float final_xshift, float final_yshift, bool inverse, Pix *pix)
static bool IsCrossed(const TPOINT &a0, const TPOINT &a1, const TPOINT &b0, const TPOINT &b1)
EDGEPT & operator=(const EDGEPT &src)
void CopyFrom(const TWERD &src)
void plot(ScrollView *window)
void Rotate(const FCOORD rotation)
int SegmentArea(const EDGEPT *end) const
TESSLINE & operator=(const TESSLINE &src)
TBOX bounding_box() const
TBLOB * ClassifyNormalizeIfNeeded() const
bool Contains(const TPOINT &pt) const
GenericVector< TBLOB * > blobs
void GetPreciseBoundingBox(TBOX *precise_box) const
void ComputeBoundingBoxes()
void CopyFrom(const EDGEPT &src)
static TBLOB * ShallowCopy(const TBLOB &src)
void MergeBlobs(int start, int end)
const DENORM & denorm() const
TPOINT(int16_t vx, int16_t vy)
int WeightedDistance(const EDGEPT &other, int x_factor) const
bool divisible_blob(TBLOB *blob, bool italic_blob, TPOINT *location)
void Normalize(float *Values)
bool SameBox(const TESSLINE &other) const
void CorrectBlobOrder(TBLOB *next)
static TWERD * PolygonalCopy(bool allow_detailed_fx, WERD *src)
void ComputeBoundingBoxes()
void GetEdgeCoords(const TBOX &box, GenericVector< GenericVector< int > > *x_coords, GenericVector< GenericVector< int > > *y_coords) const
bool EqualPos(const EDGEPT &other) const
void divide_blobs(TBLOB *blob, TBLOB *other_blob, bool italic_blob, const TPOINT &location)
void Move(const ICOORD vec)