tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::DetLineFit Class Reference

#include <detlinefit.h>

Collaboration diagram for tesseract::DetLineFit:

Classes

struct  PointWidth
 

Public Member Functions

 DetLineFit ()
 
 ~DetLineFit ()=default
 
void Clear ()
 
void Add (const ICOORD &pt)
 
void Add (const ICOORD &pt, int halfwidth)
 
double Fit (ICOORD *pt1, ICOORD *pt2)
 
double Fit (int skip_first, int skip_last, ICOORD *pt1, ICOORD *pt2)
 
double ConstrainedFit (const FCOORD &direction, double min_dist, double max_dist, bool debug, ICOORD *line_pt)
 
bool SufficientPointsForIndependentFit () const
 
double Fit (float *m, float *c)
 
double ConstrainedFit (double m, float *c)
 

Private Types

using DistPointPair = KDPairInc< double, ICOORD >
 

Private Member Functions

double EvaluateLineFit ()
 
double ComputeUpperQuartileError ()
 
int NumberOfMisfittedPoints (double threshold) const
 
void ComputeDistances (const ICOORD &start, const ICOORD &end)
 
void ComputeConstrainedDistances (const FCOORD &direction, double min_dist, double max_dist)
 

Private Attributes

GenericVector< PointWidthpts_
 
GenericVector< DistPointPairdistances_
 
double square_length_
 

Member Typedef Documentation

◆ DistPointPair

Constructor & Destructor Documentation

◆ DetLineFit()

tesseract::DetLineFit::DetLineFit ( )

◆ ~DetLineFit()

tesseract::DetLineFit::~DetLineFit ( )
default

Member Function Documentation

◆ Add() [1/2]

void tesseract::DetLineFit::Add ( const ICOORD pt)

◆ Add() [2/2]

void tesseract::DetLineFit::Add ( const ICOORD pt,
int  halfwidth 
)

◆ Clear()

void tesseract::DetLineFit::Clear ( )

◆ ComputeConstrainedDistances()

void tesseract::DetLineFit::ComputeConstrainedDistances ( const FCOORD direction,
double  min_dist,
double  max_dist 
)
private

◆ ComputeDistances()

void tesseract::DetLineFit::ComputeDistances ( const ICOORD start,
const ICOORD end 
)
private

◆ ComputeUpperQuartileError()

double tesseract::DetLineFit::ComputeUpperQuartileError ( )
private

◆ ConstrainedFit() [1/2]

double tesseract::DetLineFit::ConstrainedFit ( const FCOORD direction,
double  min_dist,
double  max_dist,
bool  debug,
ICOORD line_pt 
)

◆ ConstrainedFit() [2/2]

double tesseract::DetLineFit::ConstrainedFit ( double  m,
float *  c 
)

◆ EvaluateLineFit()

double tesseract::DetLineFit::EvaluateLineFit ( )
private

◆ Fit() [1/3]

double tesseract::DetLineFit::Fit ( ICOORD pt1,
ICOORD pt2 
)
inline

◆ Fit() [2/3]

double tesseract::DetLineFit::Fit ( int  skip_first,
int  skip_last,
ICOORD pt1,
ICOORD pt2 
)

◆ Fit() [3/3]

double tesseract::DetLineFit::Fit ( float *  m,
float *  c 
)

◆ NumberOfMisfittedPoints()

int tesseract::DetLineFit::NumberOfMisfittedPoints ( double  threshold) const
private

◆ SufficientPointsForIndependentFit()

bool tesseract::DetLineFit::SufficientPointsForIndependentFit ( ) const

Member Data Documentation

◆ distances_

GenericVector<DistPointPair> tesseract::DetLineFit::distances_
private

◆ pts_

GenericVector<PointWidth> tesseract::DetLineFit::pts_
private

◆ square_length_

double tesseract::DetLineFit::square_length_
private

The documentation for this class was generated from the following files: