20 #ifndef TESSERACT_TEXTORD_BASELINEDETECT_H_ 21 #define TESSERACT_TEXTORD_BASELINEDETECT_H_ 23 #include "detlinefit.h" 24 #include "genericvector.h" 76 double line_spacing,
double line_offset);
94 double cheat_allowance,
95 double target_offset);
142 static double SpacingModelError(
double perp_disp,
double line_spacing,
149 bool FitBaselinesAndFindSkew(
bool use_box_bottoms);
153 void ParallelizeBaselines(
double default_block_skew);
156 void SetupBlockParameters()
const;
166 void PrepareForSplineFitting(
ICOORD page_tr,
bool remove_noise);
173 void FitBaselineSplines(
bool enable_splines,
bool show_final_rows,
178 void DrawFinalRows(
const ICOORD& page_tr);
181 void DrawPixSpline(Pix* pix_in);
190 bool ComputeLineSpacing();
194 void ComputeBaselinePositions(
const FCOORD& direction,
199 void EstimateLineSpacing();
212 double m_in,
double* m_out,
double* c_out,
245 TO_BLOCK_LIST* blocks);
252 void ComputeStraightBaselines(
bool use_box_bottoms);
259 void ComputeBaselineSplinesAndXheights(
const ICOORD& page_tr,
262 bool show_final_rows,
277 #endif // TESSERACT_TEXTORD_BASELINEDETECT_H_ double max_baseline_error_
Definition: baselinedetect.h:121
FCOORD page_skew_
Definition: baselinedetect.h:268
double PerpDisp(const FCOORD &direction) const
Definition: baselinedetect.cpp:123
bool FitBaseline(bool use_box_bottoms)
Definition: baselinedetect.cpp:144
TBOX bounding_box_
Definition: baselinedetect.h:107
FCOORD baseline_pt1_
Definition: baselinedetect.h:111
bool non_text_block_
Definition: baselinedetect.h:224
Definition: baselinedetect.h:40
PointerVector< BaselineBlock > blocks_
Definition: baselinedetect.h:272
double StraightYAtX(double x) const
Definition: baselinedetect.cpp:131
DetLineFit fitter_
Definition: baselinedetect.h:109
FCOORD baseline_pt2_
Definition: baselinedetect.h:112
Definition: baselinedetect.h:242
double model_error_
Definition: baselinedetect.h:239
double fit_halfrange_
Definition: baselinedetect.h:119
Definition: baseapi.cpp:94
void AdjustBaselineToParallel(int debug, const FCOORD &direction)
Definition: baselinedetect.cpp:216
GenericVector< double > displacement_modes_
Definition: baselinedetect.h:114
PointerVector< BaselineRow > rows_
Definition: baselinedetect.h:220
double SpaceBetween(const BaselineRow &other) const
Definition: baselinedetect.cpp:110
void SetupOldLineParameters(TO_ROW *row) const
Definition: baselinedetect.cpp:79
bool good_skew_angle_
Definition: baselinedetect.h:227
Definition: detlinefit.h:56
void FitConstrainedIfBetter(int debug, const FCOORD &direction, double cheat_allowance, double target_offset)
Definition: baselinedetect.cpp:347
double baseline_error_
Definition: baselinedetect.h:123
Definition: baselinedetect.h:129
double AdjustBaselineToGrid(int debug, const FCOORD &direction, double line_spacing, double line_offset)
Definition: baselinedetect.cpp:231
double skew_angle() const
Definition: baselinedetect.h:136
TO_BLOCK * block() const
Definition: baselinedetect.h:133
TO_BLOCK * block_
Definition: baselinedetect.h:218
void SetupBlobDisplacements(const FCOORD &direction)
Definition: baselinedetect.cpp:287
void Print() const
Definition: baselinedetect.cpp:89
double BaselineAngle() const
Definition: baselinedetect.cpp:100
Definition: blobbox.h:556
integer coordinate
Definition: points.h:32
double line_spacing_
Definition: baselinedetect.h:231
double disp_quant_factor_
Definition: baselinedetect.h:116
bool good_baseline_
Definition: baselinedetect.h:125
const TBOX & bounding_box() const
Definition: baselinedetect.h:44
Definition: genericvector.h:457
BLOBNBOX_LIST * blobs_
Definition: baselinedetect.h:105
double skew_angle_
Definition: baselinedetect.h:229
Definition: blobbox.h:705
double line_offset_
Definition: baselinedetect.h:237
void ComputeBoundingBox()
Definition: baselinedetect.cpp:401
int debug_level_
Definition: baselinedetect.h:222
BaselineRow(double line_size, TO_ROW *to_row)
Definition: baselinedetect.cpp:67
double PerpDistanceFromBaseline(const FCOORD &pt) const
Definition: baselinedetect.cpp:393
int debug_level_
Definition: baselinedetect.h:270