20 #ifndef TESSERACT_TEXTORD_TABLEFIND_H_ 21 #define TESSERACT_TEXTORD_TABLEFIND_H_ 23 #include "colpartitiongrid.h" 57 bounding_box_.set_top(y);
61 bounding_box_.set_bottom(y);
65 bounding_box_.set_left(x);
69 bounding_box_.set_right(x);
73 bounding_box_ = other;
77 return num_table_cells_;
86 return num_text_cells_;
106 void InsertBox(
const TBOX& other);
145 void Init(
int grid_size,
const ICOORD& bottom_left,
const ICOORD& top_right);
282 ColSegment_LIST *col_segments);
286 ColSegment_LIST *col_segments);
316 ColSegment_LIST *table_regions);
339 const TBOX& search_range,
430 #endif // TESSERACT_TEXTORD_TABLEFIND_H_ void DisplayColPartitionConnections(ScrollView *win, ColPartitionGrid *grid, ScrollView::Color default_color)
Definition: tablefind.cpp:1951
Definition: colpartitiongrid.h:33
Definition: tablefind.h:46
int gridsize() const
Definition: tablefind.cpp:379
void AdjustTableBoundaries()
Definition: tablefind.cpp:1487
void DisplayColSegments(ScrollView *win, ColSegment_LIST *cols, ScrollView::Color color)
Definition: tablefind.cpp:1872
void set_global_median_ledding(int ledding)
Definition: tablefind.cpp:763
ColSegType
Definition: tablefind.h:30
Definition: tablefind.h:33
void GridMergeColumnBlocks()
Definition: tablefind.cpp:1196
void FindNeighbors()
Definition: tablefind.cpp:767
void SetColumnsType(ColSegment_LIST *col_segments)
Definition: tablefind.cpp:1144
void set_left(int x)
Definition: tablefind.h:64
int global_median_xheight_
Definition: tablefind.h:405
void GroupColumnBlocks(ColSegment_LIST *current_segments, ColSegment_LIST *col_segments)
Definition: tablefind.cpp:539
void set_global_median_blob_width(int width)
Definition: tablefind.cpp:760
void GrowTableToIncludePartials(const TBOX &table_box, const TBOX &search_range, TBOX *result_box)
Definition: tablefind.cpp:1543
Definition: colpartitionset.h:40
void set_bounding_box(const TBOX &other)
Definition: tablefind.h:72
Definition: tablefind.h:35
void set_num_text_cells(int n)
Definition: tablefind.h:90
void DeleteSingleColumnTables()
Definition: tablefind.cpp:1704
void set_resolution(int resolution)
Definition: tablefind.h:138
void MoveColSegmentsToGrid(ColSegment_LIST *segments, ColSegmentGrid *col_seg_grid)
Definition: tablefind.cpp:1177
ColSegType type() const
Definition: tablefind.h:94
void DisplayColPartitions(ScrollView *win, ColPartitionGrid *grid, ScrollView::Color text_color, ScrollView::Color table_color)
Definition: tablefind.cpp:1917
void GrowTableBox(const TBOX &table_box, TBOX *result_box)
Definition: tablefind.cpp:1521
void SmoothTablePartitionRuns()
Definition: tablefind.cpp:1109
void InsertRulingPartition(ColPartition *part)
Definition: tablefind.cpp:419
bool HLineBelongsToTable(const ColPartition &part, const TBOX &table_box)
Definition: tablefind.cpp:1601
int global_median_ledding_
Definition: tablefind.h:409
void FilterHeaderAndFooter()
Definition: tablefind.cpp:1075
ColSegmentGrid col_seg_grid_
Definition: tablefind.h:421
bool left_to_right_language_
Definition: tablefind.h:425
void FilterParagraphEndings()
Definition: tablefind.cpp:995
Definition: baseapi.cpp:94
void set_right(int x)
Definition: tablefind.h:68
TableFinder()
Definition: tablefind.cpp:160
int gridheight() const
Definition: tablefind.cpp:385
ColPartitionGrid leader_and_ruling_grid_
Definition: tablefind.h:415
void InsertCleanPartitions(ColPartitionGrid *grid, TO_BLOCK *block)
Definition: tablefind.cpp:194
void MarkTablePartitions()
Definition: tablefind.cpp:790
Definition: tablefind.h:31
bool BelongToOneTable(const TBOX &box1, const TBOX &box2)
Definition: tablefind.cpp:1445
void RecognizeTables()
Definition: tablefind.cpp:1818
TBOX bounding_box_
Definition: tablefind.h:109
void InsertTextPartition(ColPartition *part)
Definition: tablefind.cpp:395
void set_global_median_xheight(int xheight)
Definition: tablefind.cpp:757
Definition: tablefind.h:32
ColSegmentGrid table_grid_
Definition: tablefind.h:423
ColPartitionGrid clean_part_grid_
Definition: tablefind.h:413
bool AllowTextPartition(const ColPartition &part) const
Definition: tablefind.cpp:490
Definition: blobbox.h:144
int global_median_blob_width_
Definition: tablefind.h:407
bool ConsecutiveBoxes(const TBOX &b1, const TBOX &b2)
Definition: tablefind.cpp:569
bool HasLeaderAdjacent(const ColPartition &part)
Definition: tablefind.cpp:947
void GetTableRegions(ColSegment_LIST *table_columns, ColSegment_LIST *table_regions)
Definition: tablefind.cpp:1324
ScrollView * MakeWindow(int x, int y, const char *window_name)
Definition: tablefind.cpp:519
Definition: tablefind.h:131
void GetTableColumns(ColSegment_LIST *table_columns)
Definition: tablefind.cpp:1274
int get_num_text_cells() const
Definition: tablefind.h:85
const ICOORD & bleft() const
Definition: tablefind.cpp:388
int gridwidth() const
Definition: tablefind.cpp:382
bool GapInXProjection(int *xprojection, int length)
Definition: tablefind.cpp:1769
void InitializePartitions(ColPartitionSet **all_columns)
Definition: tablefind.cpp:580
Definition: tesscallback.h:1673
~TableFinder()
Definition: tablefind.cpp:168
void set_left_to_right_language(bool order)
Definition: tablefind.cpp:178
int num_text_cells_
Definition: tablefind.h:111
void IncludeLeftOutColumnHeaders(TBOX *table_box)
Definition: tablefind.cpp:1665
void GridMergeTableRegions()
Definition: tablefind.cpp:1387
integer coordinate
Definition: points.h:32
void MakeTableBlocks(ColPartitionGrid *grid, ColPartitionSet **columns, WidthCallback *width_cb)
Definition: tablefind.cpp:1998
Definition: tablefind.h:34
bool AllowBlob(const BLOBNBOX &blob) const
Definition: tablefind.cpp:503
static void SetPartitionSpacings(ColPartitionGrid *grid, ColPartitionSet **all_columns)
Definition: tablefind.cpp:587
void InsertLeaderPartition(ColPartition *part)
Definition: tablefind.cpp:411
int get_num_table_cells() const
Definition: tablefind.h:76
void LocateTables(ColPartitionGrid *grid, ColPartitionSet **columns, WidthCallback *width_cb, const FCOORD &reskew)
Definition: tablefind.cpp:260
void DisplayColSegmentGrid(ScrollView *win, ColSegmentGrid *grid, ScrollView::Color color)
Definition: tablefind.cpp:1892
int num_table_cells_
Definition: tablefind.h:110
ColPartitionGrid fragmented_text_grid_
Definition: tablefind.h:419
void GetColumnBlocks(ColPartitionSet **columns, ColSegment_LIST *col_segments)
Definition: tablefind.cpp:524
void InsertImagePartition(ColPartition *part)
Definition: tablefind.cpp:422
void set_bottom(int y)
Definition: tablefind.h:60
const TBOX & bounding_box() const
Definition: tablefind.h:52
const ICOORD & tright() const
Definition: tablefind.cpp:391
void set_num_table_cells(int n)
Definition: tablefind.h:81
Definition: blobbox.h:705
void SplitAndInsertFragmentedTextPartition(ColPartition *part)
Definition: tablefind.cpp:437
void Init(int grid_size, const ICOORD &bottom_left, const ICOORD &top_right)
Definition: tablefind.cpp:182
void set_top(int y)
Definition: tablefind.h:56
void SetGlobalSpacings(ColPartitionGrid *grid)
Definition: tablefind.cpp:710
void InsertFragmentedTextPartition(ColPartition *part)
Definition: tablefind.cpp:403
void SetVerticalSpacing(ColPartition *part)
Definition: tablefind.cpp:667
void MarkPartitionsUsingLocalInformation()
Definition: tablefind.cpp:828
Definition: colpartition.h:68
bool HasWideOrNoInterWordGap(ColPartition *part) const
Definition: tablefind.cpp:858
void FilterFalseAlarms()
Definition: tablefind.cpp:989
void GrowTableToIncludeLines(const TBOX &table_box, const TBOX &search_range, TBOX *result_box)
Definition: tablefind.cpp:1571
int resolution_
Definition: tablefind.h:403
ColSegType type_
Definition: tablefind.h:112