#include <matchtab.h>
Definition at line 42 of file matchtab.h.
| tesseract::BlobMatchTable::BlobMatchTable |
( |
| ) |
|
Definition at line 38 of file matchtab.cpp.
39 : been_initialized_(
false), match_table_(
NULL) {
| tesseract::BlobMatchTable::~BlobMatchTable |
( |
| ) |
|
| void tesseract::BlobMatchTable::add_to_match |
( |
TBLOB * |
blob, |
|
|
BLOB_CHOICE_LIST * |
ratings |
|
) |
| |
Definition at line 183 of file matchtab.cpp.
185 int start = Hash(bbox);
189 fprintf(stderr,
"Can not update uninitialized entry in match_table\n");
192 if (match_table_[x].box == bbox) {
195 it.set_to_list(match_table_[x].rating);
196 BLOB_CHOICE_IT new_it;
197 new_it.set_to_list(ratings);
198 assert(it.length() <= new_it.length());
199 for (it.mark_cycle_pt(), new_it.mark_cycle_pt();
200 !it.cycled_list() && !new_it.cycled_list(); new_it.forward()) {
201 if (it.data()->unichar_id() == new_it.data()->unichar_id()) {
204 it.add_before_stay_put(
new BLOB_CHOICE(*(new_it.data())));
211 }
while (x != start);
#define NUM_MATCH_ENTRIES
TBOX bounding_box() const
| void tesseract::BlobMatchTable::end_match_table |
( |
| ) |
|
Definition at line 71 of file matchtab.cpp.
72 if (been_initialized_) {
74 delete[] match_table_;
76 been_initialized_ =
false;
| BLOB_CHOICE_LIST * tesseract::BlobMatchTable::get_match |
( |
TBLOB * |
blob | ) |
|
Definition at line 118 of file matchtab.cpp.
TBOX bounding_box() const
BLOB_CHOICE_LIST * get_match_by_box(const TBOX &box)
| BLOB_CHOICE_LIST * tesseract::BlobMatchTable::get_match_by_box |
( |
const TBOX & |
box | ) |
|
Definition at line 150 of file matchtab.cpp.
151 int start = Hash(box);
159 if (match_table_[x].box == box) {
160 BLOB_CHOICE_LIST *blist =
new BLOB_CHOICE_LIST();
166 }
while (x != start);
#define NUM_MATCH_ENTRIES
static BLOB_CHOICE * deep_copy(const BLOB_CHOICE *src)
| void tesseract::BlobMatchTable::init_match_table |
( |
| ) |
|
Definition at line 52 of file matchtab.cpp.
53 if (been_initialized_) {
57 match_table_[x].
rating->clear();
58 delete match_table_[x].
rating;
67 been_initialized_ =
true;
BLOB_CHOICE_LIST * rating
#define NUM_MATCH_ENTRIES
| void tesseract::BlobMatchTable::put_match |
( |
TBLOB * |
blob, |
|
|
BLOB_CHOICE_LIST * |
ratings |
|
) |
| |
Definition at line 87 of file matchtab.cpp.
91 int start = Hash(bbox);
98 match_table_[x].
box = bbox;
100 match_table_[x].
rating =
new BLOB_CHOICE_LIST();
106 }
while (x != start);
108 cprintf (
"error: Match table is full\n");
BLOB_CHOICE_LIST * rating
#define NUM_MATCH_ENTRIES
TBOX bounding_box() const
static BLOB_CHOICE * deep_copy(const BLOB_CHOICE *src)
void cprintf(const char *format,...)
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/tesseract-ocr-3.02.02/wordrec/matchtab.h
- /home/abuild/rpmbuild/BUILD/tesseract-ocr-3.02.02/wordrec/matchtab.cpp