36 : re_rotation_(1.0f, 0.0f),
37 classify_rotation_(1.0f, 0.0f),
39 right_to_left_ =
false;
40 pdblk.hand_poly =
nullptr;
42 BLOCK(
const char *name,
65 kerning = (int8_t) kern;
82 return right_to_left_;
85 right_to_left_ = value;
105 return filename.string ();
112 return cell_over_xheight_;
115 cell_over_xheight_ = ratio;
123 void compute_row_margins();
140 re_rotation_ = rotation;
143 return classify_rotation_;
146 classify_rotation_ = rotation;
158 median_size_.set_x(x);
159 median_size_.set_y(y);
163 return pdblk.render_mask(re_rotation_, mask_box);
168 TBOX restricted_bounding_box(
bool upper_dots,
bool lower_dots)
const;
172 void reflect_polygon_in_y_axis();
174 void rotate(
const FCOORD& rotation);
186 void compress(
const ICOORD vec);
189 void print(FILE* fp,
bool dump);
215 void PrintSegmentationStats(BLOCK_LIST* block_list);
219 void ExtractBlobsFromSegmentation(BLOCK_LIST* blocks,
220 C_BLOB_LIST* output_blob_list);
230 void RefreshWordBlobsFromNewBlobs(BLOCK_LIST* block_list,
231 C_BLOB_LIST* new_blobs,
232 C_BLOB_LIST* not_found_blobs);
void set_median_size(int x, int y)
Definition: ocrblock.h:157
int16_t kern() const
return kerning
Definition: ocrblock.h:92
C_BLOB_LIST * reject_blobs()
Definition: ocrblock.h:133
FCOORD classify_rotation() const
Definition: ocrblock.h:142
FCOORD skew_
Definition: ocrblock.h:210
void set_xheight(int32_t height)
set char size
Definition: ocrblock.h:70
ROW_LIST * row_list()
get rows
Definition: ocrblock.h:118
void set_classify_rotation(const FCOORD &rotation)
Definition: ocrblock.h:145
int16_t font() const
return font class
Definition: ocrblock.h:96
void set_right_to_left(bool value)
Definition: ocrblock.h:84
PARA_LIST * para_list()
Definition: ocrblock.h:126
void set_re_rotation(const FCOORD &rotation)
Definition: ocrblock.h:139
void set_skew(const FCOORD &skew)
Definition: ocrblock.h:151
page block
Definition: pdblock.h:32
int16_t space() const
return spacing
Definition: ocrblock.h:100
void set_stats(BOOL8 prop, int16_t kern, int16_t space, int16_t ch_pitch)
Definition: ocrblock.h:60
float cell_over_xheight() const
Definition: ocrblock.h:111
const char * name() const
return filename
Definition: ocrblock.h:104
STRING filename
Definition: ocrblock.h:203
Definition: pdblock.h:103
FCOORD classify_rotation_
Definition: ocrblock.h:209
ICOORD median_size_
Definition: ocrblock.h:211
const ICOORD & median_size() const
Definition: ocrblock.h:154
void set_cell_over_xheight(float ratio)
Definition: ocrblock.h:114
Definition: ocrblock.h:30
int32_t fixed_pitch() const
return pitch
Definition: ocrblock.h:88
BOOL8 proportional
Definition: ocrblock.h:195
int16_t spacing
Definition: ocrblock.h:198
C_BLOB_LIST rej_blobs
Definition: ocrblock.h:207
int16_t ymax
Definition: pdblock.h:138
bool right_to_left() const
Definition: ocrblock.h:81
BLOCK()
Definition: ocrblock.h:35
PDBLK pdblk
Definition: ocrblock.h:192
Pix * render_mask(TBOX *mask_box)
Definition: ocrblock.h:162
int32_t x_height() const
return xheight
Definition: ocrblock.h:108
PARA_LIST paras_
Definition: ocrblock.h:205
integer coordinate
Definition: points.h:32
float cell_over_xheight_
Definition: ocrblock.h:202
int8_t kerning
Definition: ocrblock.h:197
int16_t ymin
Definition: pdblock.h:137
FCOORD re_rotation() const
Definition: ocrblock.h:136
void set_font_class(int16_t font)
set font class
Definition: ocrblock.h:74
int16_t pitch
Definition: ocrblock.h:199
bool right_to_left_
Definition: ocrblock.h:196
int16_t font_class
Definition: ocrblock.h:200
C_BLOB_LIST c_blobs
Definition: ocrblock.h:206
C_BLOB_LIST * blob_list()
get blobs
Definition: ocrblock.h:130
FCOORD re_rotation_
Definition: ocrblock.h:208
ROW_LIST rows
Definition: ocrblock.h:204
FCOORD skew() const
Definition: ocrblock.h:148
int32_t xheight
Definition: ocrblock.h:201
BOOL8 prop() const
return proportional
Definition: ocrblock.h:78