tesseract v5.3.3.20231005
|
#include <tablerecog.h>
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 |
unsigned | row_count () const |
unsigned | column_count () const |
unsigned | cell_count () const |
void | set_bounding_box (const TBOX &box) |
const TBOX & | bounding_box () const |
int | median_cell_height () |
int | median_cell_width () |
int | row_height (unsigned row) const |
int | column_width (unsigned 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 (unsigned row_start, unsigned row_end, unsigned column_start, unsigned column_end) |
bool | VerifyRowFilled (int row) |
double | CalculateCellFilledPercentage (unsigned row, unsigned 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 std::vector< int > &min_list, const std::vector< int > &max_list, int max_merged, std::vector< int > *locations) |
Protected Attributes | |
ColPartitionGrid * | text_grid_ |
ColPartitionGrid * | line_grid_ |
TBOX | bounding_box_ |
std::vector< int > | cell_x_ |
std::vector< 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_ |
Definition at line 70 of file tablerecog.h.
tesseract::StructuredTable::StructuredTable | ( | ) |
Definition at line 88 of file tablerecog.cpp.
|
default |
|
protected |
Definition at line 573 of file tablerecog.cpp.
const TBOX & tesseract::StructuredTable::bounding_box | ( | ) | const |
Definition at line 126 of file tablerecog.cpp.
double tesseract::StructuredTable::CalculateCellFilledPercentage | ( | unsigned | row, |
unsigned | column | ||
) |
Definition at line 294 of file tablerecog.cpp.
|
protected |
Definition at line 496 of file tablerecog.cpp.
|
protected |
Definition at line 551 of file tablerecog.cpp.
unsigned tesseract::StructuredTable::cell_count | ( | ) | const |
Definition at line 120 of file tablerecog.cpp.
|
protected |
Definition at line 336 of file tablerecog.cpp.
unsigned tesseract::StructuredTable::column_count | ( | ) | const |
Definition at line 117 of file tablerecog.cpp.
int tesseract::StructuredTable::column_width | ( | unsigned | column | ) | const |
Definition at line 139 of file tablerecog.cpp.
int tesseract::StructuredTable::CountFilledCells | ( | ) |
Definition at line 250 of file tablerecog.cpp.
int tesseract::StructuredTable::CountFilledCells | ( | unsigned | row_start, |
unsigned | row_end, | ||
unsigned | column_start, | ||
unsigned | column_end | ||
) |
Definition at line 259 of file tablerecog.cpp.
int tesseract::StructuredTable::CountFilledCellsInColumn | ( | int | column | ) |
Definition at line 256 of file tablerecog.cpp.
int tesseract::StructuredTable::CountFilledCellsInRow | ( | int | row | ) |
Definition at line 253 of file tablerecog.cpp.
|
protected |
Definition at line 699 of file tablerecog.cpp.
|
protected |
Definition at line 727 of file tablerecog.cpp.
|
protected |
Definition at line 673 of file tablerecog.cpp.
void tesseract::StructuredTable::Display | ( | ScrollView * | window, |
ScrollView::Color | color | ||
) |
Definition at line 319 of file tablerecog.cpp.
bool tesseract::StructuredTable::DoesPartitionFit | ( | const ColPartition & | part | ) | const |
Definition at line 234 of file tablerecog.cpp.
|
staticprotected |
Definition at line 630 of file tablerecog.cpp.
|
protected |
Definition at line 533 of file tablerecog.cpp.
bool tesseract::StructuredTable::FindLinedStructure | ( | ) |
Definition at line 157 of file tablerecog.cpp.
|
protected |
Definition at line 516 of file tablerecog.cpp.
|
protected |
Definition at line 384 of file tablerecog.cpp.
|
protected |
Definition at line 429 of file tablerecog.cpp.
bool tesseract::StructuredTable::FindWhitespacedStructure | ( | ) |
Definition at line 210 of file tablerecog.cpp.
void tesseract::StructuredTable::Init | ( | ) |
Definition at line 100 of file tablerecog.cpp.
bool tesseract::StructuredTable::is_lined | ( | ) | const |
Definition at line 111 of file tablerecog.cpp.
int tesseract::StructuredTable::median_cell_height | ( | ) |
Definition at line 129 of file tablerecog.cpp.
int tesseract::StructuredTable::median_cell_width | ( | ) |
Definition at line 132 of file tablerecog.cpp.
unsigned tesseract::StructuredTable::row_count | ( | ) | const |
Definition at line 114 of file tablerecog.cpp.
int tesseract::StructuredTable::row_height | ( | unsigned | row | ) | const |
Definition at line 135 of file tablerecog.cpp.
void tesseract::StructuredTable::set_bounding_box | ( | const TBOX & | box | ) |
Definition at line 123 of file tablerecog.cpp.
void tesseract::StructuredTable::set_line_grid | ( | ColPartitionGrid * | lines | ) |
Definition at line 105 of file tablerecog.cpp.
void tesseract::StructuredTable::set_max_text_height | ( | int | height | ) |
Definition at line 108 of file tablerecog.cpp.
void tesseract::StructuredTable::set_text_grid | ( | ColPartitionGrid * | text | ) |
Definition at line 102 of file tablerecog.cpp.
int tesseract::StructuredTable::space_above | ( | ) | const |
Definition at line 143 of file tablerecog.cpp.
int tesseract::StructuredTable::space_below | ( | ) | const |
Definition at line 146 of file tablerecog.cpp.
|
protected |
Definition at line 506 of file tablerecog.cpp.
|
protected |
Definition at line 350 of file tablerecog.cpp.
bool tesseract::StructuredTable::VerifyRowFilled | ( | int | row | ) |
Definition at line 282 of file tablerecog.cpp.
|
protected |
Definition at line 374 of file tablerecog.cpp.
|
protected |
Definition at line 236 of file tablerecog.h.
|
protected |
Definition at line 237 of file tablerecog.h.
|
protected |
Definition at line 238 of file tablerecog.h.
|
protected |
Definition at line 239 of file tablerecog.h.
|
protected |
Definition at line 232 of file tablerecog.h.
|
protected |
Definition at line 248 of file tablerecog.h.
|
protected |
Definition at line 245 of file tablerecog.h.
|
protected |
Definition at line 246 of file tablerecog.h.
|
protected |
Definition at line 241 of file tablerecog.h.
|
protected |
Definition at line 242 of file tablerecog.h.
|
protected |
Definition at line 243 of file tablerecog.h.
|
protected |
Definition at line 244 of file tablerecog.h.
|
protected |
Definition at line 231 of file tablerecog.h.