20 #ifndef TESSERACT_TEXTORD_BASELINEDETECT_H_ 21 #define TESSERACT_TEXTORD_BASELINEDETECT_H_ 76 double line_spacing,
double line_offset);
94 double cheat_allowance,
95 double target_offset);
98 double PerpDistanceFromBaseline(
const FCOORD& pt)
const;
100 void ComputeBoundingBox();
105 BLOBNBOX_LIST* blobs_;
116 double disp_quant_factor_;
119 double fit_halfrange_;
121 double max_baseline_error_;
123 double baseline_error_;
190 bool ComputeLineSpacing();
199 void EstimateLineSpacing();
212 double m_in,
double* m_out,
double* c_out,
224 bool non_text_block_;
227 bool good_skew_angle_;
231 double line_spacing_;
245 TO_BLOCK_LIST* blocks);
262 bool show_final_rows,
277 #endif // TESSERACT_TEXTORD_BASELINEDETECT_H_ BaselineBlock(int debug_level, bool non_text, TO_BLOCK *block)
bool FitBaselinesAndFindSkew(bool use_box_bottoms)
void PrepareForSplineFitting(ICOORD page_tr, bool remove_noise)
void DrawPixSpline(Pix *pix_in)
bool FitBaseline(bool use_box_bottoms)
void SetupOldLineParameters(TO_ROW *row) const
int direction(EDGEPT *point)
double PerpDisp(const FCOORD &direction) const
double BaselineAngle() const
double SpaceBetween(const BaselineRow &other) const
void SetupBlockParameters() const
void AdjustBaselineToParallel(int debug, const FCOORD &direction)
BaselineRow(double line_size, TO_ROW *to_row)
static double SpacingModelError(double perp_disp, double line_spacing, double line_offset)
double AdjustBaselineToGrid(int debug, const FCOORD &direction, double line_spacing, double line_offset)
double skew_angle() const
void FitBaselineSplines(bool enable_splines, bool show_final_rows, Textord *textord)
BaselineDetect(int debug_level, const FCOORD &page_skew, TO_BLOCK_LIST *blocks)
~BaselineDetect()=default
void ComputeStraightBaselines(bool use_box_bottoms)
void ParallelizeBaselines(double default_block_skew)
void DrawFinalRows(const ICOORD &page_tr)
double StraightYAtX(double x) const
void ComputeBaselineSplinesAndXheights(const ICOORD &page_tr, bool enable_splines, bool remove_noise, bool show_final_rows, Textord *textord)
const TBOX & bounding_box() const