|
tesseract
4.0.0-beta.1-59-g2cc4
|
#include <werd.h>
Public Member Functions | |
| WERD () | |
| WERD (C_BLOB_LIST *blob_list, uint8_t blanks, const char *text) | |
| WERD (C_BLOB_LIST *blob_list, WERD *clone) | |
| WERD * | ConstructFromSingleBlob (bool bol, bool eol, C_BLOB *blob) |
| ~WERD () | |
| WERD & | operator= (const WERD &source) |
| WERD * | ConstructWerdWithNewBlobs (C_BLOB_LIST *all_blobs, C_BLOB_LIST *orphan_blobs) |
| C_BLOB_LIST * | rej_cblob_list () |
| C_BLOB_LIST * | cblob_list () |
| uint8_t | space () |
| void | set_blanks (uint8_t new_blanks) |
| int | script_id () const |
| void | set_script_id (int id) |
| TBOX | bounding_box () const |
| TBOX | restricted_bounding_box (bool upper_dots, bool lower_dots) const |
| TBOX | true_bounding_box () const |
| const char * | text () const |
| void | set_text (const char *new_text) |
| BOOL8 | flag (WERD_FLAGS mask) const |
| void | set_flag (WERD_FLAGS mask, BOOL8 value) |
| BOOL8 | display_flag (uint8_t flag) const |
| void | set_display_flag (uint8_t flag, BOOL8 value) |
| WERD * | shallow_copy () |
| void | move (const ICOORD vec) |
| void | join_on (WERD *other) |
| void | copy_on (WERD *other) |
| void | print () |
| void | plot (ScrollView *window, ScrollView::Color colour) |
| void | plot (ScrollView *window) |
| void | plot_rej_blobs (ScrollView *window) |
| void | CleanNoise (float size_threshold) |
| void | GetNoiseOutlines (GenericVector< C_OUTLINE *> *outlines) |
| bool | AddSelectedOutlines (const GenericVector< bool > &wanted, const GenericVector< C_BLOB *> &target_blobs, const GenericVector< C_OUTLINE *> &outlines, bool *make_next_word_fuzzy) |
Public Member Functions inherited from ELIST2_LINK | |
| ELIST2_LINK () | |
| ELIST2_LINK (const ELIST2_LINK &) | |
| void | operator= (const ELIST2_LINK &) |
Static Public Member Functions | |
| static ScrollView::Color | NextColor (ScrollView::Color colour) |
| WERD::WERD | ( | C_BLOB_LIST * | blob_list, |
| uint8_t | blank_count, | ||
| const char * | text | ||
| ) |
Constructor to build a WERD from a list of C_BLOBs. blob_list The C_BLOBs (in word order) are not copied; we take its elements and put them in our lists. blank_count blanks in front of the word text correct text, outlives this WERD
Definition at line 48 of file werd.cpp.
| WERD::WERD | ( | C_BLOB_LIST * | blob_list, |
| WERD * | clone | ||
| ) |
| bool WERD::AddSelectedOutlines | ( | const GenericVector< bool > & | wanted, |
| const GenericVector< C_BLOB *> & | target_blobs, | ||
| const GenericVector< C_OUTLINE *> & | outlines, | ||
| bool * | make_next_word_fuzzy | ||
| ) |
| TBOX WERD::bounding_box | ( | ) | const |
Return the bounding box of the WERD. This is quite a mess to compute! ORIGINALLY, REJECT CBLOBS WERE EXCLUDED, however, this led to bugs when the words on the row were re-sorted. The original words were built with reject blobs included. The FUZZY SPACE flags were set accordingly. If ALL the blobs in a word are rejected the BB for the word is NULL, causing the sort to screw up, leading to the erroneous possibility of the first word in a row being marked as FUZZY space.
Definition at line 160 of file werd.cpp.
|
inline |
| void WERD::CleanNoise | ( | float | size_threshold | ) |
Definition at line 506 of file werd.cpp.
| WERD * WERD::ConstructWerdWithNewBlobs | ( | C_BLOB_LIST * | all_blobs, |
| C_BLOB_LIST * | orphan_blobs | ||
| ) |
WERD::ConstructWerdWithNewBlobs()
This method returns a new werd constructed using the blobs in the input all_blobs list, which correspond to the blobs in this werd object. The blobs used to construct the new word are consumed and removed from the input all_blobs list. Returns NULL if the word couldn't be constructed. Returns original blobs for which no matches were found in the output list orphan_blobs (appends).
Definition at line 412 of file werd.cpp.
| void WERD::copy_on | ( | WERD * | other | ) |
|
inline |
| void WERD::GetNoiseOutlines | ( | GenericVector< C_OUTLINE *> * | outlines | ) |
Definition at line 530 of file werd.cpp.
| void WERD::join_on | ( | WERD * | other | ) |
|
static |
| void WERD::plot | ( | ScrollView * | window, |
| ScrollView::Color | colour | ||
| ) |
| void WERD::plot | ( | ScrollView * | window | ) |
| void WERD::plot_rej_blobs | ( | ScrollView * | window | ) |
Draw the WERD rejected blobs in window - ALWAYS GREY
Definition at line 337 of file werd.cpp.
| void WERD::print | ( | ) |
|
inline |
| TBOX WERD::restricted_bounding_box | ( | bool | upper_dots, |
| bool | lower_dots | ||
| ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| WERD * WERD::shallow_copy | ( | ) |
Make a shallow copy of a word
|
inline |