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,
279 STRING debug_file_prefix_;
284 #endif // TESSERACT_TEXTORD_BASELINEDETECT_H_ void ComputeStraightBaselines(bool use_box_bottoms)
bool FitBaseline(bool use_box_bottoms)
BaselineDetect(int debug_level, const FCOORD &page_skew, TO_BLOCK_LIST *blocks)
double AdjustBaselineToGrid(int debug, const FCOORD &direction, double line_spacing, double line_offset)
void ParallelizeBaselines(double default_block_skew)
static double SpacingModelError(double perp_disp, double line_spacing, double line_offset)
void FitBaselineSplines(bool enable_splines, bool show_final_rows, Textord *textord)
void DrawFinalRows(const ICOORD &page_tr)
const TBOX & bounding_box() const
void PrepareForSplineFitting(ICOORD page_tr, bool remove_noise)
int direction(EDGEPT *point)
double PerpDisp(const FCOORD &direction) const
double StraightYAtX(double x) const
void SetupOldLineParameters(TO_ROW *row) const
BaselineRow(double line_size, TO_ROW *to_row)
void DrawPixSpline(Pix *pix_in)
void ComputeBaselineSplinesAndXheights(const ICOORD &page_tr, bool enable_splines, bool remove_noise, bool show_final_rows, Textord *textord)
double skew_angle() const
void SetDebugImage(Pix *pixIn, const STRING &output_path)
BaselineBlock(int debug_level, bool non_text, TO_BLOCK *block)
double SpaceBetween(const BaselineRow &other) const
bool FitBaselinesAndFindSkew(bool use_box_bottoms)
void SetupBlockParameters() const
void AdjustBaselineToParallel(int debug, const FCOORD &direction)
double BaselineAngle() const