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