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

#include <tablerecog.h>

Collaboration diagram for tesseract::StructuredTable:

Public Member Functions

 StructuredTable ()
 
 ~StructuredTable ()=default
 
void Init ()
 
void set_text_grid (ColPartitionGrid *text)
 
void set_line_grid (ColPartitionGrid *lines)
 
void set_max_text_height (int height)
 
bool is_lined () const
 
int row_count () const
 
int column_count () const
 
int cell_count () const
 
void set_bounding_box (const TBOX &box)
 
const TBOXbounding_box () const
 
int median_cell_height ()
 
int median_cell_width ()
 
int row_height (int row) const
 
int column_width (int column) const
 
int space_above () const
 
int space_below () const
 
bool FindLinedStructure ()
 
bool FindWhitespacedStructure ()
 
bool DoesPartitionFit (const ColPartition &part) const
 
int CountFilledCells ()
 
int CountFilledCellsInRow (int row)
 
int CountFilledCellsInColumn (int column)
 
int CountFilledCells (int row_start, int row_end, int column_start, int column_end)
 
bool VerifyRowFilled (int row)
 
double CalculateCellFilledPercentage (int row, int column)
 
void Display (ScrollView *window, ScrollView::Color color)
 

Protected Member Functions

void ClearStructure ()
 
bool VerifyLinedTableCells ()
 
bool VerifyWhitespacedTable ()
 
void FindWhitespacedColumns ()
 
void FindWhitespacedRows ()
 
void CalculateMargins ()
 
void UpdateMargins (ColPartitionGrid *grid)
 
int FindVerticalMargin (ColPartitionGrid *grid, int start_x, bool decrease) const
 
int FindHorizontalMargin (ColPartitionGrid *grid, int start_y, bool decrease) const
 
void CalculateStats ()
 
void AbsorbNearbyLines ()
 
int CountVerticalIntersections (int x)
 
int CountHorizontalIntersections (int y)
 
int CountPartitions (const TBOX &box)
 

Static Protected Member Functions

static void FindCellSplitLocations (const GenericVector< int > &min_list, const GenericVector< int > &max_list, int max_merged, GenericVector< int > *locations)
 

Protected Attributes

ColPartitionGridtext_grid_
 
ColPartitionGridline_grid_
 
TBOX bounding_box_
 
GenericVectorEqEq< int > cell_x_
 
GenericVectorEqEq< int > cell_y_
 
bool is_lined_
 
int space_above_
 
int space_below_
 
int space_left_
 
int space_right_
 
int median_cell_height_
 
int median_cell_width_
 
int max_text_height_
 

Constructor & Destructor Documentation

◆ StructuredTable()

tesseract::StructuredTable::StructuredTable ( )

◆ ~StructuredTable()

tesseract::StructuredTable::~StructuredTable ( )
default

Member Function Documentation

◆ AbsorbNearbyLines()

void tesseract::StructuredTable::AbsorbNearbyLines ( )
protected

◆ bounding_box()

const TBOX & tesseract::StructuredTable::bounding_box ( ) const

◆ CalculateCellFilledPercentage()

double tesseract::StructuredTable::CalculateCellFilledPercentage ( int  row,
int  column 
)

◆ CalculateMargins()

void tesseract::StructuredTable::CalculateMargins ( )
protected

◆ CalculateStats()

void tesseract::StructuredTable::CalculateStats ( )
protected

◆ cell_count()

int tesseract::StructuredTable::cell_count ( ) const

◆ ClearStructure()

void tesseract::StructuredTable::ClearStructure ( )
protected

◆ column_count()

int tesseract::StructuredTable::column_count ( ) const

◆ column_width()

int tesseract::StructuredTable::column_width ( int  column) const

◆ CountFilledCells() [1/2]

int tesseract::StructuredTable::CountFilledCells ( )

◆ CountFilledCells() [2/2]

int tesseract::StructuredTable::CountFilledCells ( int  row_start,
int  row_end,
int  column_start,
int  column_end 
)

◆ CountFilledCellsInColumn()

int tesseract::StructuredTable::CountFilledCellsInColumn ( int  column)

◆ CountFilledCellsInRow()

int tesseract::StructuredTable::CountFilledCellsInRow ( int  row)

◆ CountHorizontalIntersections()

int tesseract::StructuredTable::CountHorizontalIntersections ( int  y)
protected

◆ CountPartitions()

int tesseract::StructuredTable::CountPartitions ( const TBOX box)
protected

◆ CountVerticalIntersections()

int tesseract::StructuredTable::CountVerticalIntersections ( int  x)
protected

◆ Display()

void tesseract::StructuredTable::Display ( ScrollView window,
ScrollView::Color  color 
)

◆ DoesPartitionFit()

bool tesseract::StructuredTable::DoesPartitionFit ( const ColPartition part) const

◆ FindCellSplitLocations()

void tesseract::StructuredTable::FindCellSplitLocations ( const GenericVector< int > &  min_list,
const GenericVector< int > &  max_list,
int  max_merged,
GenericVector< int > *  locations 
)
staticprotected

◆ FindHorizontalMargin()

int tesseract::StructuredTable::FindHorizontalMargin ( ColPartitionGrid grid,
int  start_y,
bool  decrease 
) const
protected

◆ FindLinedStructure()

bool tesseract::StructuredTable::FindLinedStructure ( )

◆ FindVerticalMargin()

int tesseract::StructuredTable::FindVerticalMargin ( ColPartitionGrid grid,
int  start_x,
bool  decrease 
) const
protected

◆ FindWhitespacedColumns()

void tesseract::StructuredTable::FindWhitespacedColumns ( )
protected

◆ FindWhitespacedRows()

void tesseract::StructuredTable::FindWhitespacedRows ( )
protected

◆ FindWhitespacedStructure()

bool tesseract::StructuredTable::FindWhitespacedStructure ( )

◆ Init()

void tesseract::StructuredTable::Init ( )

◆ is_lined()

bool tesseract::StructuredTable::is_lined ( ) const

◆ median_cell_height()

int tesseract::StructuredTable::median_cell_height ( )

◆ median_cell_width()

int tesseract::StructuredTable::median_cell_width ( )

◆ row_count()

int tesseract::StructuredTable::row_count ( ) const

◆ row_height()

int tesseract::StructuredTable::row_height ( int  row) const

◆ set_bounding_box()

void tesseract::StructuredTable::set_bounding_box ( const TBOX box)

◆ set_line_grid()

void tesseract::StructuredTable::set_line_grid ( ColPartitionGrid lines)

◆ set_max_text_height()

void tesseract::StructuredTable::set_max_text_height ( int  height)

◆ set_text_grid()

void tesseract::StructuredTable::set_text_grid ( ColPartitionGrid text)

◆ space_above()

int tesseract::StructuredTable::space_above ( ) const

◆ space_below()

int tesseract::StructuredTable::space_below ( ) const

◆ UpdateMargins()

void tesseract::StructuredTable::UpdateMargins ( ColPartitionGrid grid)
protected

◆ VerifyLinedTableCells()

bool tesseract::StructuredTable::VerifyLinedTableCells ( )
protected

◆ VerifyRowFilled()

bool tesseract::StructuredTable::VerifyRowFilled ( int  row)

◆ VerifyWhitespacedTable()

bool tesseract::StructuredTable::VerifyWhitespacedTable ( )
protected

Member Data Documentation

◆ bounding_box_

TBOX tesseract::StructuredTable::bounding_box_
protected

◆ cell_x_

GenericVectorEqEq<int> tesseract::StructuredTable::cell_x_
protected

◆ cell_y_

GenericVectorEqEq<int> tesseract::StructuredTable::cell_y_
protected

◆ is_lined_

bool tesseract::StructuredTable::is_lined_
protected

◆ line_grid_

ColPartitionGrid* tesseract::StructuredTable::line_grid_
protected

◆ max_text_height_

int tesseract::StructuredTable::max_text_height_
protected

◆ median_cell_height_

int tesseract::StructuredTable::median_cell_height_
protected

◆ median_cell_width_

int tesseract::StructuredTable::median_cell_width_
protected

◆ space_above_

int tesseract::StructuredTable::space_above_
protected

◆ space_below_

int tesseract::StructuredTable::space_below_
protected

◆ space_left_

int tesseract::StructuredTable::space_left_
protected

◆ space_right_

int tesseract::StructuredTable::space_right_
protected

◆ text_grid_

ColPartitionGrid* tesseract::StructuredTable::text_grid_
protected

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