#include <tabvector.h>
Definition at line 69 of file tabvector.h.
| tesseract::TabConstraint::TabConstraint |
( |
| ) |
|
|
inline |
| void tesseract::TabConstraint::ApplyConstraints |
( |
TabConstraint_LIST * |
constraints | ) |
|
|
static |
Definition at line 120 of file tabvector.cpp.
123 GetConstraints(constraints, &y_min, &y_max);
124 int y = (y_min + y_max) / 2;
125 TabConstraint_IT it(constraints);
126 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
128 TabVector* v = constraint->vector_;
129 if (constraint->is_top_) {
131 v->set_top_constraints(
NULL);
134 v->set_bottom_constraints(
NULL);
| bool tesseract::TabConstraint::CompatibleConstraints |
( |
TabConstraint_LIST * |
list1, |
|
|
TabConstraint_LIST * |
list2 |
|
) |
| |
|
static |
Definition at line 79 of file tabvector.cpp.
86 tprintf(
"Testing constraint compatibility\n");
87 GetConstraints(list1, &y_min, &y_max);
88 GetConstraints(list2, &y_min, &y_max);
90 tprintf(
"Resulting range = [%d,%d]\n", y_min, y_max);
91 return y_max >= y_min;
int textord_debug_tabfind
DLLSYM void tprintf(const char *format,...)
| void tesseract::TabConstraint::CreateConstraint |
( |
TabVector * |
vector, |
|
|
bool |
is_top |
|
) |
| |
|
static |
Definition at line 67 of file tabvector.cpp.
69 TabConstraint_LIST* constraints =
new TabConstraint_LIST;
70 TabConstraint_IT it(constraints);
71 it.add_to_end(constraint);
73 vector->set_top_constraints(constraints);
75 vector->set_bottom_constraints(constraints);
| void tesseract::TabConstraint::MergeConstraints |
( |
TabConstraint_LIST * |
list1, |
|
|
TabConstraint_LIST * |
list2 |
|
) |
| |
|
static |
Definition at line 96 of file tabvector.cpp.
100 TabConstraint_IT it(list2);
102 tprintf(
"Merging constraints\n");
104 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
107 constraint->vector_->Print(
"Merge");
108 if (constraint->is_top_)
109 constraint->vector_->set_top_constraints(list1);
111 constraint->vector_->set_bottom_constraints(list1);
114 it.add_list_before(list2);
int textord_debug_tabfind
DLLSYM void tprintf(const char *format,...)
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/tesseract-ocr-3.02.02/textord/tabvector.h
- /home/abuild/rpmbuild/BUILD/tesseract-ocr-3.02.02/textord/tabvector.cpp