37 BLOCK() : re_rotation_(1.0f, 0.0f), classify_rotation_(1.0f, 0.0f), skew_(1.0f, 0.0f) {}
38 BLOCK(
const char *name,
56 void set_stats(
bool prop, int16_t kern, int16_t space, int16_t ch_pitch) {
58 kerning =
static_cast<int8_t
>(kern);
75 return right_to_left_;
78 right_to_left_ =
value;
98 return filename.c_str();
105 return cell_over_xheight_;
108 cell_over_xheight_ = ratio;
116 void compute_row_margins();
133 re_rotation_ = rotation;
136 return classify_rotation_;
139 classify_rotation_ = rotation;
151 median_size_.set_x(
x);
152 median_size_.set_y(
y);
156 return pdblk.render_mask(re_rotation_, mask_box);
161 TBOX restricted_bounding_box(
bool upper_dots,
bool lower_dots)
const;
165 void reflect_polygon_in_y_axis();
167 void rotate(
const FCOORD &rotation);
179 void compress(
const ICOORD vec);
182 void print(FILE *fp,
bool dump);
188 bool proportional =
false;
189 bool right_to_left_ =
false;
193 int16_t font_class = 0;
195 float cell_over_xheight_ = 0.0f;
196 std::string filename;
200 C_BLOB_LIST rej_blobs;
202 FCOORD classify_rotation_;
223 C_BLOB_LIST *not_found_blobs);
#define ELISTIZEH(CLASSNAME)
void RefreshWordBlobsFromNewBlobs(BLOCK_LIST *block_list, C_BLOB_LIST *new_blobs, C_BLOB_LIST *not_found_blobs)
void PrintSegmentationStats(BLOCK_LIST *block_list)
void ExtractBlobsFromSegmentation(BLOCK_LIST *blocks, C_BLOB_LIST *output_blob_list)
const char * name() const
return filename
void set_font_class(int16_t font)
set font class
FCOORD classify_rotation() const
FCOORD re_rotation() const
float cell_over_xheight() const
C_BLOB_LIST * reject_blobs()
int32_t fixed_pitch() const
return pitch
void set_cell_over_xheight(float ratio)
PDBLK pdblk
Page Description Block.
bool prop() const
return proportional
void set_median_size(int x, int y)
bool right_to_left() const
ROW_LIST * row_list()
get rows
void set_classify_rotation(const FCOORD &rotation)
int16_t kern() const
return kerning
void set_skew(const FCOORD &skew)
void set_xheight(int32_t height)
set char size
int16_t font() const
return font class
const ICOORD & median_size() const
void set_stats(bool prop, int16_t kern, int16_t space, int16_t ch_pitch)
int16_t space() const
return spacing
int32_t x_height() const
return xheight
C_BLOB_LIST * blob_list()
get blobs
void set_right_to_left(bool value)
Image render_mask(TBOX *mask_box)
void set_re_rotation(const FCOORD &rotation)