20#ifndef TESSERACT_TEXTORD_BASELINEDETECT_H_
21#define TESSERACT_TEXTORD_BASELINEDETECT_H_
76 double line_spacing,
double line_offset);
81 void SetupBlobDisplacements(
const FCOORD& direction);
93 void FitConstrainedIfBetter(
int debug,
const FCOORD& direction,
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();
194 void ComputeBaselinePositions(
const FCOORD& direction,
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,
bool FitBaseline(bool use_box_bottoms)
double PerpDisp(const FCOORD &direction) const
const TBOX & bounding_box() const
double BaselineAngle() const
void AdjustBaselineToParallel(int debug, const FCOORD &direction)
double SpaceBetween(const BaselineRow &other) const
double StraightYAtX(double x) const
double AdjustBaselineToGrid(int debug, const FCOORD &direction, double line_spacing, double line_offset)
void SetupOldLineParameters(TO_ROW *row) const
void SetupBlockParameters() const
double skew_angle() const
void FitBaselineSplines(bool enable_splines, bool show_final_rows, Textord *textord)
bool FitBaselinesAndFindSkew(bool use_box_bottoms)
void DrawFinalRows(const ICOORD &page_tr)
void DrawPixSpline(Pix *pix_in)
void ParallelizeBaselines(double default_block_skew)
void PrepareForSplineFitting(ICOORD page_tr, bool remove_noise)
static double SpacingModelError(double perp_disp, double line_spacing, double line_offset)
void ComputeBaselineSplinesAndXheights(const ICOORD &page_tr, bool enable_splines, bool remove_noise, bool show_final_rows, Textord *textord)
void ComputeStraightBaselines(bool use_box_bottoms)
~BaselineDetect()=default