20 #ifndef TESSERACT_TEXTORD_TABLEFIND_H_ 21 #define TESSERACT_TEXTORD_TABLEFIND_H_ 38 class ColPartitionSet;
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);
110 int num_table_cells_;
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_ bool BelongToOneTable(const TBOX &box1, const TBOX &box2)
void DisplayColPartitions(ScrollView *win, ColPartitionGrid *grid, ScrollView::Color text_color, ScrollView::Color table_color)
const ICOORD & bleft() const
bool HasLeaderAdjacent(const ColPartition &part)
#define ELISTIZEH(CLASSNAME)
void set_global_median_xheight(int xheight)
void SetVerticalSpacing(ColPartition *part)
int global_median_blob_width_
void GrowTableToIncludeLines(const TBOX &table_box, const TBOX &search_range, TBOX *result_box)
void SplitAndInsertFragmentedTextPartition(ColPartition *part)
void SmoothTablePartitionRuns()
void set_resolution(int resolution)
void GrowTableToIncludePartials(const TBOX &table_box, const TBOX &search_range, TBOX *result_box)
void SetGlobalSpacings(ColPartitionGrid *grid)
ColPartitionGrid leader_and_ruling_grid_
void InsertCleanPartitions(ColPartitionGrid *grid, TO_BLOCK *block)
void DisplayColPartitionConnections(ScrollView *win, ColPartitionGrid *grid, ScrollView::Color default_color)
bool HasWideOrNoInterWordGap(ColPartition *part) const
int get_num_table_cells() const
int global_median_xheight_
void MarkTablePartitions()
static void SetPartitionSpacings(ColPartitionGrid *grid, ColPartitionSet **all_columns)
bool GapInXProjection(int *xprojection, int length)
void SetColumnsType(ColSegment_LIST *col_segments)
bool ConsecutiveBoxes(const TBOX &b1, const TBOX &b2)
bool AllowBlob(const BLOBNBOX &blob) const
void FilterParagraphEndings()
void InsertTextPartition(ColPartition *part)
ScrollView * MakeWindow(int x, int y, const char *window_name)
void DisplayColSegments(ScrollView *win, ColSegment_LIST *cols, ScrollView::Color color)
void AdjustTableBoundaries()
void DeleteSingleColumnTables()
void DisplayColSegmentGrid(ScrollView *win, ColSegmentGrid *grid, ScrollView::Color color)
int get_num_text_cells() const
void MarkPartitionsUsingLocalInformation()
void InsertRulingPartition(ColPartition *part)
void GetColumnBlocks(ColPartitionSet **columns, ColSegment_LIST *col_segments)
void InsertLeaderPartition(ColPartition *part)
const ICOORD & tright() const
void set_global_median_ledding(int ledding)
CLISTIZEH(STRING) CLISTIZE(STRING) namespace tesseract
void GrowTableBox(const TBOX &table_box, TBOX *result_box)
int global_median_ledding_
void MoveColSegmentsToGrid(ColSegment_LIST *segments, ColSegmentGrid *col_seg_grid)
void IncludeLeftOutColumnHeaders(TBOX *table_box)
void set_bounding_box(const TBOX &other)
ColSegmentGrid col_seg_grid_
ColSegmentGrid table_grid_
void MakeTableBlocks(ColPartitionGrid *grid, ColPartitionSet **columns, WidthCallback *width_cb)
bool left_to_right_language_
ColPartitionGrid clean_part_grid_
bool AllowTextPartition(const ColPartition &part) const
void FilterHeaderAndFooter()
void GroupColumnBlocks(ColSegment_LIST *current_segments, ColSegment_LIST *col_segments)
void GridMergeColumnBlocks()
void LocateTables(ColPartitionGrid *grid, ColPartitionSet **columns, WidthCallback *width_cb, const FCOORD &reskew)
void GetTableRegions(ColSegment_LIST *table_columns, ColSegment_LIST *table_regions)
const TBOX & bounding_box() const
void set_num_text_cells(int n)
void set_left_to_right_language(bool order)
void Init(int grid_size, const ICOORD &bottom_left, const ICOORD &top_right)
void GridMergeTableRegions()
void InsertFragmentedTextPartition(ColPartition *part)
bool HLineBelongsToTable(const ColPartition &part, const TBOX &table_box)
void InitializePartitions(ColPartitionSet **all_columns)
void InsertImagePartition(ColPartition *part)
void GetTableColumns(ColSegment_LIST *table_columns)
ColPartitionGrid fragmented_text_grid_
void set_num_table_cells(int n)
void set_global_median_blob_width(int width)
BBGrid< ColSegment, ColSegment_CLIST, ColSegment_C_IT > ColSegmentGrid