Tesseract
3.02
|
#include <ocrblock.h>
Public Member Functions | |
BLOCK () | |
BLOCK (const char *name, BOOL8 prop, inT16 kern, inT16 space, inT16 xmin, inT16 ymin, inT16 xmax, inT16 ymax) | |
~BLOCK () | |
void | set_stats (BOOL8 prop, inT16 kern, inT16 space, inT16 ch_pitch) |
void | set_xheight (inT32 height) |
set char size | |
void | set_font_class (inT16 font) |
set font class | |
BOOL8 | prop () const |
return proportional | |
bool | right_to_left () const |
void | set_right_to_left (bool value) |
inT32 | fixed_pitch () const |
return pitch | |
inT16 | kern () const |
return kerning | |
inT16 | font () const |
return font class | |
inT16 | space () const |
return spacing | |
const char * | name () const |
return filename | |
inT32 | x_height () const |
return xheight | |
float | cell_over_xheight () const |
void | set_cell_over_xheight (float ratio) |
ROW_LIST * | row_list () |
get rows | |
void | compute_row_margins () |
PARA_LIST * | para_list () |
C_BLOB_LIST * | blob_list () |
get blobs | |
C_BLOB_LIST * | reject_blobs () |
FCOORD | re_rotation () const |
void | set_re_rotation (const FCOORD &rotation) |
FCOORD | classify_rotation () const |
void | set_classify_rotation (const FCOORD &rotation) |
FCOORD | skew () const |
void | set_skew (const FCOORD &skew) |
const ICOORD & | median_size () const |
void | set_median_size (int x, int y) |
Pix * | render_mask () |
void | reflect_polygon_in_y_axis () |
void | rotate (const FCOORD &rotation) |
void | sort_rows () |
decreasing y order | |
void | compress () |
shrink white space | |
void | check_pitch () |
check proportional | |
void | compress (const ICOORD vec) |
shrink white space and move by vector | |
void | print (FILE *fp, BOOL8 dump) |
dump whole table | |
BLOCK & | operator= (const BLOCK &source) |
![]() | |
ELIST_LINK () | |
ELIST_LINK (const ELIST_LINK &) | |
void | operator= (const ELIST_LINK &) |
![]() | |
PDBLK () | |
empty constructor | |
PDBLK (inT16 xmin, inT16 ymin, inT16 xmax, inT16 ymax) | |
simple constructor | |
void | set_sides (ICOORDELT_LIST *left, ICOORDELT_LIST *right) |
~PDBLK () | |
destructor | |
POLY_BLOCK * | poly_block () const |
void | set_poly_block (POLY_BLOCK *blk) |
set the poly block | |
void | bounding_box (ICOORD &bottom_left, ICOORD &top_right) const |
get box | |
const TBOX & | bounding_box () const |
get real box | |
int | index () const |
void | set_index (int value) |
BOOL8 | contains (ICOORD pt) |
is pt inside block | |
void | move (const ICOORD vec) |
reposition block | |
Pix * | render_mask (const FCOORD &rerotation) |
void | plot (ScrollView *window, inT32 serial, ScrollView::Color colour) |
void | show (IMAGE *image, ScrollView *window) |
PDBLK & | operator= (const PDBLK &source) |
Friends | |
class | BLOCK_RECT_IT |
Additional Inherited Members | |
![]() | |
POLY_BLOCK * | hand_poly |
ICOORDELT_LIST | leftside |
ICOORDELT_LIST | rightside |
TBOX | box |
int | index_ |
Definition at line 31 of file ocrblock.h.
|
inline |
BLOCK::BLOCK | ( | const char * | name, |
BOOL8 | prop, | ||
inT16 | kern, | ||
inT16 | space, | ||
inT16 | xmin, | ||
inT16 | ymin, | ||
inT16 | xmax, | ||
inT16 | ymax | ||
) |
Constructor for a simple rectangular block.
Definition at line 35 of file ocrblock.cpp.
|
inline |
Definition at line 53 of file ocrblock.h.
|
inline |
|
inline |
Definition at line 114 of file ocrblock.h.
void BLOCK::check_pitch | ( | ) |
check proportional
Check whether the block is fixed or prop, set the flag, and set the pitch if it is fixed.
Definition at line 159 of file ocrblock.cpp.
|
inline |
Definition at line 145 of file ocrblock.h.
void BLOCK::compress | ( | ) |
shrink white space
Delete space between the rows. (And maybe one day, compress the rows) Fill space of block from top down, left aligning rows.
Definition at line 121 of file ocrblock.cpp.
void BLOCK::compress | ( | const ICOORD | vec | ) |
shrink white space and move by vector
Compress and move in a single operation.
Definition at line 171 of file ocrblock.cpp.
void BLOCK::compute_row_margins | ( | ) |
Definition at line 322 of file ocrblock.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 157 of file ocrblock.h.
|
inline |
Assignment - duplicate the block structure, but with an EMPTY row list.
Definition at line 217 of file ocrblock.cpp.
|
inline |
Definition at line 129 of file ocrblock.h.
void BLOCK::print | ( | FILE * | fp, |
BOOL8 | dump | ||
) |
dump whole table
Print the info on a block
Definition at line 185 of file ocrblock.cpp.
|
inline |
|
inline |
Definition at line 139 of file ocrblock.h.
void BLOCK::reflect_polygon_in_y_axis | ( | ) |
BLOCK::reflect_polygon_in_y_axis
Reflects the polygon in the y-axis and recompute the bounding_box. Does nothing to any contained rows/words/blobs etc.
Definition at line 96 of file ocrblock.cpp.
|
inline |
Definition at line 136 of file ocrblock.h.
|
inline |
Definition at line 165 of file ocrblock.h.
|
inline |
Definition at line 84 of file ocrblock.h.
void BLOCK::rotate | ( | const FCOORD & | rotation | ) |
Rotate the polygon by the given rotation and recompute the bounding_box.
Definition at line 85 of file ocrblock.cpp.
|
inline |
|
inline |
Definition at line 117 of file ocrblock.h.
|
inline |
Definition at line 148 of file ocrblock.h.
|
inline |
|
inline |
Definition at line 160 of file ocrblock.h.
|
inline |
Definition at line 142 of file ocrblock.h.
|
inline |
Definition at line 87 of file ocrblock.h.
|
inline |
Definition at line 154 of file ocrblock.h.
|
inline |
|
inline |
Definition at line 151 of file ocrblock.h.
void BLOCK::sort_rows | ( | ) |
decreasing y order
Order rows so that they are in order of decreasing Y coordinate
Definition at line 107 of file ocrblock.cpp.
|
inline |
|
inline |
|
friend |
Reimplemented from PDBLK.
Definition at line 34 of file ocrblock.h.