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

#include <baselinedetect.h>

Collaboration diagram for tesseract::BaselineBlock:

Public Member Functions

 BaselineBlock (int debug_level, bool non_text, TO_BLOCK *block)
 
TO_BLOCKblock () const
 
double skew_angle () const
 
bool FitBaselinesAndFindSkew (bool use_box_bottoms)
 
void ParallelizeBaselines (double default_block_skew)
 
void SetupBlockParameters () const
 
void PrepareForSplineFitting (ICOORD page_tr, bool remove_noise)
 
void FitBaselineSplines (bool enable_splines, bool show_final_rows, Textord *textord)
 
void DrawFinalRows (const ICOORD &page_tr)
 
void DrawPixSpline (Pix *pix_in)
 

Static Public Member Functions

static double SpacingModelError (double perp_disp, double line_spacing, double line_offset)
 

Private Member Functions

bool ComputeLineSpacing ()
 
void ComputeBaselinePositions (const FCOORD &direction, GenericVector< double > *positions)
 
void EstimateLineSpacing ()
 
void RefineLineSpacing (const GenericVector< double > &positions)
 
double FitLineSpacingModel (const GenericVector< double > &positions, double m_in, double *m_out, double *c_out, int *index_delta)
 

Private Attributes

TO_BLOCKblock_
 
PointerVector< BaselineRowrows_
 
int debug_level_
 
bool non_text_block_
 
bool good_skew_angle_
 
double skew_angle_
 
double line_spacing_
 
double line_offset_
 
double model_error_
 

Constructor & Destructor Documentation

◆ BaselineBlock()

tesseract::BaselineBlock::BaselineBlock ( int  debug_level,
bool  non_text,
TO_BLOCK block 
)

Member Function Documentation

◆ block()

TO_BLOCK* tesseract::BaselineBlock::block ( ) const
inline

◆ ComputeBaselinePositions()

void tesseract::BaselineBlock::ComputeBaselinePositions ( const FCOORD direction,
GenericVector< double > *  positions 
)
private

◆ ComputeLineSpacing()

bool tesseract::BaselineBlock::ComputeLineSpacing ( )
private

◆ DrawFinalRows()

void tesseract::BaselineBlock::DrawFinalRows ( const ICOORD page_tr)

◆ DrawPixSpline()

void tesseract::BaselineBlock::DrawPixSpline ( Pix *  pix_in)

◆ EstimateLineSpacing()

void tesseract::BaselineBlock::EstimateLineSpacing ( )
private

◆ FitBaselinesAndFindSkew()

bool tesseract::BaselineBlock::FitBaselinesAndFindSkew ( bool  use_box_bottoms)

◆ FitBaselineSplines()

void tesseract::BaselineBlock::FitBaselineSplines ( bool  enable_splines,
bool  show_final_rows,
Textord textord 
)

◆ FitLineSpacingModel()

double tesseract::BaselineBlock::FitLineSpacingModel ( const GenericVector< double > &  positions,
double  m_in,
double *  m_out,
double *  c_out,
int *  index_delta 
)
private

◆ ParallelizeBaselines()

void tesseract::BaselineBlock::ParallelizeBaselines ( double  default_block_skew)

◆ PrepareForSplineFitting()

void tesseract::BaselineBlock::PrepareForSplineFitting ( ICOORD  page_tr,
bool  remove_noise 
)

◆ RefineLineSpacing()

void tesseract::BaselineBlock::RefineLineSpacing ( const GenericVector< double > &  positions)
private

◆ SetupBlockParameters()

void tesseract::BaselineBlock::SetupBlockParameters ( ) const

◆ skew_angle()

double tesseract::BaselineBlock::skew_angle ( ) const
inline

◆ SpacingModelError()

double tesseract::BaselineBlock::SpacingModelError ( double  perp_disp,
double  line_spacing,
double  line_offset 
)
static

Member Data Documentation

◆ block_

TO_BLOCK* tesseract::BaselineBlock::block_
private

◆ debug_level_

int tesseract::BaselineBlock::debug_level_
private

◆ good_skew_angle_

bool tesseract::BaselineBlock::good_skew_angle_
private

◆ line_offset_

double tesseract::BaselineBlock::line_offset_
private

◆ line_spacing_

double tesseract::BaselineBlock::line_spacing_
private

◆ model_error_

double tesseract::BaselineBlock::model_error_
private

◆ non_text_block_

bool tesseract::BaselineBlock::non_text_block_
private

◆ rows_

PointerVector<BaselineRow> tesseract::BaselineBlock::rows_
private

◆ skew_angle_

double tesseract::BaselineBlock::skew_angle_
private

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