20 #ifndef TESSERACT_CCSTRUCT_DETLINEFIT_H_ 21 #define TESSERACT_CCSTRUCT_DETLINEFIT_H_ 23 #include "genericvector.h" 71 void Add(
const ICOORD& pt,
int halfwidth);
76 return Fit(0, 0, pt1, pt2);
90 double min_dist,
double max_dist,
91 bool debug,
ICOORD* line_pt);
100 double Fit(
float* m,
float* c);
115 : pt(pt0), halfwidth(halfwidth0) {}
145 double min_dist,
double max_dist);
162 #endif // TESSERACT_CCSTRUCT_DETLINEFIT_H_ double Fit(ICOORD *pt1, ICOORD *pt2)
Definition: detlinefit.h:75
int halfwidth
Definition: detlinefit.h:118
bool SufficientPointsForIndependentFit() const
Definition: detlinefit.cpp:162
void Clear()
Definition: detlinefit.cpp:45
int NumberOfMisfittedPoints(double threshold) const
Definition: detlinefit.cpp:232
GenericVector< PointWidth > pts_
Definition: detlinefit.h:149
void Add(const ICOORD &pt)
Definition: detlinefit.cpp:51
PointWidth()
Definition: detlinefit.h:113
Definition: baseapi.cpp:94
PointWidth(const ICOORD &pt0, int halfwidth0)
Definition: detlinefit.h:114
double square_length_
Definition: detlinefit.h:157
DetLineFit()
Definition: detlinefit.cpp:41
Definition: detlinefit.h:56
double ComputeUpperQuartileError()
Definition: detlinefit.cpp:216
integer coordinate
Definition: points.h:32
Definition: detlinefit.h:112
GenericVector< DistPointPair > distances_
Definition: detlinefit.h:155
void ComputeConstrainedDistances(const FCOORD &direction, double min_dist, double max_dist)
Definition: detlinefit.cpp:279
ICOORD pt
Definition: detlinefit.h:117
void ComputeDistances(const ICOORD &start, const ICOORD &end)
Definition: detlinefit.cpp:247
double ConstrainedFit(const FCOORD &direction, double min_dist, double max_dist, bool debug, ICOORD *line_pt)
Definition: detlinefit.cpp:130
double EvaluateLineFit()
Definition: detlinefit.cpp:200