#include <blobbox.h>
|
| BLOBNBOX () |
|
| BLOBNBOX (C_BLOB *srcblob) |
|
| ~BLOBNBOX () |
|
void | rotate (FCOORD rotation) |
|
void | reflect_box_in_y_axis () |
|
void | rotate_box (FCOORD rotation) |
|
void | translate_box (ICOORD v) |
|
void | merge (BLOBNBOX *nextblob) |
|
void | really_merge (BLOBNBOX *other) |
|
void | chop (BLOBNBOX_IT *start_it, BLOBNBOX_IT *blob_it, FCOORD rotation, float xheight) |
|
void | NeighbourGaps (int gaps[BND_COUNT]) const |
|
void | MinMaxGapsClipped (int *h_min, int *h_max, int *v_min, int *v_max) const |
|
void | CleanNeighbours () |
|
int | GoodTextBlob () const |
|
int | NoisyNeighbours () const |
|
bool | DeletableNoise () const |
|
bool | DefiniteIndividualFlow () |
|
bool | ConfirmNoTabViolation (const BLOBNBOX &other) const |
|
bool | MatchingStrokeWidth (const BLOBNBOX &other, double fractional_tolerance, double constant_tolerance) const |
|
TBOX | BoundsWithinLimits (int left, int right) |
|
void | EstimateBaselinePosition () |
|
const TBOX & | bounding_box () const |
|
void | set_bounding_box (const TBOX &new_box) |
|
void | compute_bounding_box () |
|
const TBOX & | reduced_box () const |
|
void | set_reduced_box (TBOX new_box) |
|
int32_t | enclosed_area () const |
|
bool | joined_to_prev () const |
|
bool | red_box_set () const |
|
int | repeated_set () const |
|
void | set_repeated_set (int set_id) |
|
C_BLOB * | cblob () const |
|
TabType | left_tab_type () const |
|
void | set_left_tab_type (TabType new_type) |
|
TabType | right_tab_type () const |
|
void | set_right_tab_type (TabType new_type) |
|
BlobRegionType | region_type () const |
|
void | set_region_type (BlobRegionType new_type) |
|
BlobSpecialTextType | special_text_type () const |
|
void | set_special_text_type (BlobSpecialTextType new_type) |
|
BlobTextFlowType | flow () const |
|
void | set_flow (BlobTextFlowType value) |
|
bool | vert_possible () const |
|
void | set_vert_possible (bool value) |
|
bool | horz_possible () const |
|
void | set_horz_possible (bool value) |
|
int | left_rule () const |
|
void | set_left_rule (int new_left) |
|
int | right_rule () const |
|
void | set_right_rule (int new_right) |
|
int | left_crossing_rule () const |
|
void | set_left_crossing_rule (int new_left) |
|
int | right_crossing_rule () const |
|
void | set_right_crossing_rule (int new_right) |
|
float | horz_stroke_width () const |
|
void | set_horz_stroke_width (float width) |
|
float | vert_stroke_width () const |
|
void | set_vert_stroke_width (float width) |
|
float | area_stroke_width () const |
|
tesseract::ColPartition * | owner () const |
|
void | set_owner (tesseract::ColPartition *new_owner) |
|
bool | leader_on_left () const |
|
void | set_leader_on_left (bool flag) |
|
bool | leader_on_right () const |
|
void | set_leader_on_right (bool flag) |
|
BLOBNBOX * | neighbour (BlobNeighbourDir n) const |
|
bool | good_stroke_neighbour (BlobNeighbourDir n) const |
|
void | set_neighbour (BlobNeighbourDir n, BLOBNBOX *neighbour, bool good) |
|
bool | IsDiacritic () const |
|
int | base_char_top () const |
|
int | base_char_bottom () const |
|
int | baseline_position () const |
|
int | line_crossings () const |
|
void | set_line_crossings (int value) |
|
void | set_diacritic_box (const TBOX &diacritic_box) |
|
BLOBNBOX * | base_char_blob () const |
|
void | set_base_char_blob (BLOBNBOX *blob) |
|
void | set_owns_cblob (bool value) |
|
bool | UniquelyVertical () const |
|
bool | UniquelyHorizontal () const |
|
ScrollView::Color | BoxColor () const |
|
void | plot (ScrollView *window, ScrollView::Color blob_colour, ScrollView::Color child_colour) |
|
void | ReInit () |
|
void | ClearNeighbours () |
|
| ELIST_LINK () |
|
| ELIST_LINK (const ELIST_LINK &) |
|
void | operator= (const ELIST_LINK &) |
|
Definition at line 143 of file blobbox.h.
◆ BLOBNBOX() [1/2]
◆ BLOBNBOX() [2/2]
BLOBNBOX::BLOBNBOX |
( |
C_BLOB * |
srcblob | ) |
|
|
inlineexplicit |
Definition at line 149 of file blobbox.h.
153 area =
static_cast<int>(srcblob->
area());
◆ ~BLOBNBOX()
Definition at line 155 of file blobbox.h.
156 if (owns_cblob_)
delete cblob_ptr;
◆ area_stroke_width()
float BLOBNBOX::area_stroke_width |
( |
| ) |
const |
|
inline |
Definition at line 349 of file blobbox.h.
350 return area_stroke_width_;
◆ base_char_blob()
BLOBNBOX* BLOBNBOX::base_char_blob |
( |
| ) |
const |
|
inline |
Definition at line 402 of file blobbox.h.
403 return base_char_blob_;
◆ base_char_bottom()
int BLOBNBOX::base_char_bottom |
( |
| ) |
const |
|
inline |
Definition at line 386 of file blobbox.h.
387 return base_char_bottom_;
◆ base_char_top()
int BLOBNBOX::base_char_top |
( |
| ) |
const |
|
inline |
Definition at line 383 of file blobbox.h.
384 return base_char_top_;
◆ baseline_position()
int BLOBNBOX::baseline_position |
( |
| ) |
const |
|
inline |
◆ bounding_box()
const TBOX& BLOBNBOX::bounding_box |
( |
| ) |
const |
|
inline |
◆ BoundsWithinLimits()
TBOX BLOBNBOX::BoundsWithinLimits |
( |
int |
left, |
|
|
int |
right |
|
) |
| |
Definition at line 333 of file blobbox.cpp.
334 FCOORD no_rotation(1.0f, 0.0f);
335 float top = box.
top();
336 float bottom = box.
bottom();
337 if (cblob_ptr !=
nullptr) {
339 static_cast<float>(right), no_rotation,
347 FCOORD bot_left(left, bottom);
348 FCOORD top_right(right, top);
349 TBOX shrunken_box(bot_left);
350 TBOX shrunken_box2(top_right);
351 shrunken_box += shrunken_box2;
◆ BoxColor()
◆ cblob()
C_BLOB* BLOBNBOX::cblob |
( |
| ) |
const |
|
inline |
◆ chop()
void BLOBNBOX::chop |
( |
BLOBNBOX_IT * |
start_it, |
|
|
BLOBNBOX_IT * |
blob_it, |
|
|
FCOORD |
rotation, |
|
|
float |
xheight |
|
) |
| |
Definition at line 120 of file blobbox.cpp.
134 float test_ymin, test_ymax;
139 blobcount =
static_cast<int16_t
>(floor (box.
width () / xheight));
140 if (blobcount > 1 && cblob_ptr !=
nullptr) {
142 blobwidth =
static_cast<float>(box.
width () + 1) / blobcount;
143 for (blobindex = blobcount - 1, rightx = box.
right ();
144 blobindex >= 0; blobindex--, rightx -= blobwidth) {
145 ymin =
static_cast<float>(INT32_MAX);
146 ymax =
static_cast<float>(-INT32_MAX);
149 blob = blob_it.data ();
152 test_ymin, test_ymax);
156 while (blob != end_it->data ());
158 leftx =
static_cast<int16_t
>(floor (rightx - blobwidth));
159 if (leftx < box.
left ())
161 bl =
ICOORD (leftx,
static_cast<int16_t
>(floor (ymin)));
162 tr =
ICOORD (
static_cast<int16_t
>(ceil (rightx)),
static_cast<int16_t
>(ceil (ymax)));
168 newblob->box =
TBOX (bl, tr);
170 newblob->base_char_top_ = tr.
y();
171 newblob->base_char_bottom_ = bl.
y();
172 end_it->add_after_stay_put (newblob);
◆ CleanNeighbours() [1/2]
void BLOBNBOX::CleanNeighbours |
( |
| ) |
|
Definition at line 214 of file blobbox.cpp.
215 for (
int dir = 0; dir <
BND_COUNT; ++dir) {
218 neighbours_[dir] =
nullptr;
219 good_stroke_neighbours_[dir] =
false;
◆ CleanNeighbours() [2/2]
void BLOBNBOX::CleanNeighbours |
( |
BLOBNBOX_LIST * |
blobs | ) |
|
|
static |
Definition at line 364 of file blobbox.cpp.
365 BLOBNBOX_IT blob_it(blobs);
366 for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
367 blob_it.data()->CleanNeighbours();
◆ ClearNeighbours()
void BLOBNBOX::ClearNeighbours |
( |
| ) |
|
|
inline |
Definition at line 499 of file blobbox.h.
501 neighbours_[n] =
nullptr;
502 good_stroke_neighbours_[n] =
false;
◆ compute_bounding_box()
void BLOBNBOX::compute_bounding_box |
( |
| ) |
|
|
inline |
Definition at line 240 of file blobbox.h.
242 base_char_top_ = box.
top();
243 base_char_bottom_ = box.
bottom();
244 baseline_y_ = box.
bottom();
◆ ComputeEdgeOffsets()
void BLOBNBOX::ComputeEdgeOffsets |
( |
Pix * |
thresholds, |
|
|
Pix * |
grey, |
|
|
BLOBNBOX_LIST * |
blobs |
|
) |
| |
|
static |
Definition at line 385 of file blobbox.cpp.
389 int scale_factor = 1;
390 if (thresholds !=
nullptr && grey !=
nullptr) {
391 grey_height = pixGetHeight(grey);
392 thr_height = pixGetHeight(thresholds);
396 BLOBNBOX_IT blob_it(blobs);
397 for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
399 if (blob->
cblob() !=
nullptr) {
401 l_uint32 threshold = 128;
402 if (thresholds !=
nullptr && grey !=
nullptr) {
407 pixGetPixel(thresholds, pt.x / scale_factor,
408 thr_height - 1 - pt.y / scale_factor, &threshold);
◆ ConfirmNoTabViolation()
bool BLOBNBOX::ConfirmNoTabViolation |
( |
const BLOBNBOX & |
other | ) |
const |
◆ DefiniteIndividualFlow()
bool BLOBNBOX::DefiniteIndividualFlow |
( |
| ) |
|
Definition at line 252 of file blobbox.cpp.
253 if (
cblob() ==
nullptr)
return false;
254 int box_perimeter = 2 * (box.
height() + box.
width());
265 perimeter -= 4 *
cblob()->
area() / perimeter;
266 perimeter -= 2 * box.
width();
280 perimeter -= 4 *
cblob()->
area() / perimeter;
281 perimeter -= 2 * box.
height();
◆ DeletableNoise()
bool BLOBNBOX::DeletableNoise |
( |
| ) |
const |
|
inline |
◆ DeleteNoiseBlobs()
void BLOBNBOX::DeleteNoiseBlobs |
( |
BLOBNBOX_LIST * |
blobs | ) |
|
|
static |
Definition at line 372 of file blobbox.cpp.
373 BLOBNBOX_IT blob_it(blobs);
374 for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
377 delete blob->
cblob();
378 delete blob_it.extract();
◆ enclosed_area()
int32_t BLOBNBOX::enclosed_area |
( |
| ) |
const |
|
inline |
◆ EstimateBaselinePosition()
void BLOBNBOX::EstimateBaselinePosition |
( |
| ) |
|
Definition at line 357 of file blobbox.cpp.
358 baseline_y_ = box.
bottom();
359 if (cblob_ptr ==
nullptr)
return;
◆ flow()
◆ good_stroke_neighbour()
Definition at line 373 of file blobbox.h.
374 return good_stroke_neighbours_[n];
◆ GoodTextBlob()
int BLOBNBOX::GoodTextBlob |
( |
| ) |
const |
◆ horz_possible()
bool BLOBNBOX::horz_possible |
( |
| ) |
const |
|
inline |
Definition at line 307 of file blobbox.h.
308 return horz_possible_;
◆ horz_stroke_width()
float BLOBNBOX::horz_stroke_width |
( |
| ) |
const |
|
inline |
Definition at line 337 of file blobbox.h.
338 return horz_stroke_width_;
◆ IsDiacritic()
bool BLOBNBOX::IsDiacritic |
( |
| ) |
const |
|
inline |
Definition at line 380 of file blobbox.h.
381 return base_char_top_ != box.
top() || base_char_bottom_ != box.
bottom();
◆ IsImageType()
◆ IsLineType()
◆ IsTextType()
◆ joined_to_prev()
bool BLOBNBOX::joined_to_prev |
( |
| ) |
const |
|
inline |
◆ leader_on_left()
bool BLOBNBOX::leader_on_left |
( |
| ) |
const |
|
inline |
Definition at line 358 of file blobbox.h.
359 return leader_on_left_;
◆ leader_on_right()
bool BLOBNBOX::leader_on_right |
( |
| ) |
const |
|
inline |
Definition at line 364 of file blobbox.h.
365 return leader_on_right_;
◆ left_crossing_rule()
int BLOBNBOX::left_crossing_rule |
( |
| ) |
const |
|
inline |
Definition at line 325 of file blobbox.h.
326 return left_crossing_rule_;
◆ left_rule()
int BLOBNBOX::left_rule |
( |
| ) |
const |
|
inline |
◆ left_tab_type()
TabType BLOBNBOX::left_tab_type |
( |
| ) |
const |
|
inline |
Definition at line 271 of file blobbox.h.
272 return left_tab_type_;
◆ line_crossings()
int BLOBNBOX::line_crossings |
( |
| ) |
const |
|
inline |
Definition at line 392 of file blobbox.h.
393 return line_crossings_;
◆ MatchingStrokeWidth()
bool BLOBNBOX::MatchingStrokeWidth |
( |
const BLOBNBOX & |
other, |
|
|
double |
fractional_tolerance, |
|
|
double |
constant_tolerance |
|
) |
| const |
Definition at line 305 of file blobbox.cpp.
312 float h_tolerance = horz_stroke_width_ * fractional_tolerance
313 + constant_tolerance;
314 float v_tolerance = vert_stroke_width_ * fractional_tolerance
315 + constant_tolerance;
316 double p_tolerance = p_width * fractional_tolerance
317 + constant_tolerance;
318 bool h_zero = horz_stroke_width_ == 0.0f || other.horz_stroke_width_ == 0.0f;
319 bool v_zero = vert_stroke_width_ == 0.0f || other.vert_stroke_width_ == 0.0f;
320 bool h_ok = !h_zero &&
NearlyEqual(horz_stroke_width_,
321 other.horz_stroke_width_, h_tolerance);
322 bool v_ok = !v_zero &&
NearlyEqual(vert_stroke_width_,
323 other.vert_stroke_width_, v_tolerance);
324 bool p_ok = h_zero && v_zero &&
NearlyEqual(p_width, n_p_width, p_tolerance);
328 return p_ok || ((v_ok || h_ok) && (h_ok || h_zero) && (v_ok || v_zero));
◆ merge()
void BLOBNBOX::merge |
( |
BLOBNBOX * |
nextblob | ) |
|
Definition at line 92 of file blobbox.cpp.
97 nextblob->joined =
true;
◆ MinMaxGapsClipped()
void BLOBNBOX::MinMaxGapsClipped |
( |
int * |
h_min, |
|
|
int * |
h_max, |
|
|
int * |
v_min, |
|
|
int * |
v_max |
|
) |
| const |
Definition at line 200 of file blobbox.cpp.
202 int max_dimension = std::max(box.
width(), box.
height());
207 if (*h_max > max_dimension && *h_min < max_dimension) *h_max = *h_min;
210 if (*v_max > max_dimension && *v_min < max_dimension) *v_max = *v_min;
◆ neighbour()
Definition at line 370 of file blobbox.h.
371 return neighbours_[n];
◆ NeighbourGaps()
void BLOBNBOX::NeighbourGaps |
( |
int |
gaps[BND_COUNT] | ) |
const |
Definition at line 181 of file blobbox.cpp.
182 for (
int dir = 0; dir <
BND_COUNT; ++dir) {
183 gaps[dir] = INT16_MAX;
188 gaps[dir] = box.
x_gap(n_box);
190 gaps[dir] = box.
y_gap(n_box);
◆ NoisyNeighbours()
int BLOBNBOX::NoisyNeighbours |
( |
| ) |
const |
◆ owner()
◆ plot()
Definition at line 485 of file blobbox.cpp.
488 if (cblob_ptr !=
nullptr)
489 cblob_ptr->
plot(window, blob_colour, child_colour);
◆ PlotBlobs()
Definition at line 419 of file blobbox.cpp.
423 BLOBNBOX_IT it(list);
424 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
425 it.data()->plot(win, body_colour, child_colour);
◆ PlotNoiseBlobs()
Definition at line 432 of file blobbox.cpp.
436 BLOBNBOX_IT it(list);
437 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
440 blob->
plot(win, body_colour, child_colour);
◆ RealBlob()
◆ really_merge()
void BLOBNBOX::really_merge |
( |
BLOBNBOX * |
other | ) |
|
Definition at line 103 of file blobbox.cpp.
104 if (other->cblob_ptr !=
nullptr) {
105 C_OUTLINE_IT ol_it(cblob_ptr->
out_list());
106 ol_it.add_list_after(other->cblob_ptr->
out_list());
◆ red_box_set()
bool BLOBNBOX::red_box_set |
( |
| ) |
const |
|
inline |
◆ reduced_box()
const TBOX& BLOBNBOX::reduced_box |
( |
| ) |
const |
|
inline |
◆ reflect_box_in_y_axis()
void BLOBNBOX::reflect_box_in_y_axis |
( |
| ) |
|
◆ region_type()
◆ ReInit()
void BLOBNBOX::ReInit |
( |
| ) |
|
|
inline |
Definition at line 470 of file blobbox.h.
481 left_crossing_rule_ = 0;
482 right_crossing_rule_ = 0;
483 if (area_stroke_width_ == 0.0f && area > 0 &&
cblob() !=
nullptr
484 &&
cblob()->perimeter()!=0)
487 base_char_top_ = box.
top();
488 base_char_bottom_ = box.
bottom();
489 baseline_y_ = box.
bottom();
491 base_char_blob_ =
nullptr;
492 horz_possible_ =
false;
493 vert_possible_ =
false;
494 leader_on_left_ =
false;
495 leader_on_right_ =
false;
◆ repeated_set()
int BLOBNBOX::repeated_set |
( |
| ) |
const |
|
inline |
Definition at line 262 of file blobbox.h.
263 return repeated_set_;
◆ right_crossing_rule()
int BLOBNBOX::right_crossing_rule |
( |
| ) |
const |
|
inline |
Definition at line 331 of file blobbox.h.
332 return right_crossing_rule_;
◆ right_rule()
int BLOBNBOX::right_rule |
( |
| ) |
const |
|
inline |
◆ right_tab_type()
TabType BLOBNBOX::right_tab_type |
( |
| ) |
const |
|
inline |
Definition at line 277 of file blobbox.h.
278 return right_tab_type_;
◆ rotate()
void BLOBNBOX::rotate |
( |
FCOORD |
rotation | ) |
|
◆ rotate_box()
void BLOBNBOX::rotate_box |
( |
FCOORD |
rotation | ) |
|
Definition at line 71 of file blobbox.cpp.
75 ICOORD bottom_pt(top_pt.x(), base_char_bottom_);
76 top_pt.rotate(rotation);
77 base_char_top_ = top_pt.y();
78 bottom_pt.rotate(rotation);
79 base_char_bottom_ = bottom_pt.y();
◆ set_base_char_blob()
void BLOBNBOX::set_base_char_blob |
( |
BLOBNBOX * |
blob | ) |
|
|
inline |
Definition at line 405 of file blobbox.h.
406 base_char_blob_ = blob;
◆ set_bounding_box()
void BLOBNBOX::set_bounding_box |
( |
const TBOX & |
new_box | ) |
|
|
inline |
Definition at line 235 of file blobbox.h.
237 base_char_top_ = box.
top();
238 base_char_bottom_ = box.
bottom();
◆ set_diacritic_box()
void BLOBNBOX::set_diacritic_box |
( |
const TBOX & |
diacritic_box | ) |
|
|
inline |
Definition at line 398 of file blobbox.h.
399 base_char_top_ = diacritic_box.
top();
400 base_char_bottom_ = diacritic_box.
bottom();
◆ set_flow()
◆ set_horz_possible()
void BLOBNBOX::set_horz_possible |
( |
bool |
value | ) |
|
|
inline |
Definition at line 310 of file blobbox.h.
311 horz_possible_ = value;
◆ set_horz_stroke_width()
void BLOBNBOX::set_horz_stroke_width |
( |
float |
width | ) |
|
|
inline |
Definition at line 340 of file blobbox.h.
341 horz_stroke_width_ = width;
◆ set_leader_on_left()
void BLOBNBOX::set_leader_on_left |
( |
bool |
flag | ) |
|
|
inline |
Definition at line 361 of file blobbox.h.
362 leader_on_left_ = flag;
◆ set_leader_on_right()
void BLOBNBOX::set_leader_on_right |
( |
bool |
flag | ) |
|
|
inline |
Definition at line 367 of file blobbox.h.
368 leader_on_right_ = flag;
◆ set_left_crossing_rule()
void BLOBNBOX::set_left_crossing_rule |
( |
int |
new_left | ) |
|
|
inline |
Definition at line 328 of file blobbox.h.
329 left_crossing_rule_ = new_left;
◆ set_left_rule()
void BLOBNBOX::set_left_rule |
( |
int |
new_left | ) |
|
|
inline |
Definition at line 316 of file blobbox.h.
317 left_rule_ = new_left;
◆ set_left_tab_type()
void BLOBNBOX::set_left_tab_type |
( |
TabType |
new_type | ) |
|
|
inline |
Definition at line 274 of file blobbox.h.
275 left_tab_type_ = new_type;
◆ set_line_crossings()
void BLOBNBOX::set_line_crossings |
( |
int |
value | ) |
|
|
inline |
Definition at line 395 of file blobbox.h.
396 line_crossings_ = value;
◆ set_neighbour()
Definition at line 376 of file blobbox.h.
378 good_stroke_neighbours_[n] = good;
◆ set_owner()
◆ set_owns_cblob()
void BLOBNBOX::set_owns_cblob |
( |
bool |
value | ) |
|
|
inline |
Definition at line 408 of file blobbox.h.
408 { owns_cblob_ = value; }
◆ set_reduced_box()
void BLOBNBOX::set_reduced_box |
( |
TBOX |
new_box | ) |
|
|
inline |
◆ set_region_type()
Definition at line 286 of file blobbox.h.
287 region_type_ = new_type;
◆ set_repeated_set()
void BLOBNBOX::set_repeated_set |
( |
int |
set_id | ) |
|
|
inline |
Definition at line 265 of file blobbox.h.
266 repeated_set_ = set_id;
◆ set_right_crossing_rule()
void BLOBNBOX::set_right_crossing_rule |
( |
int |
new_right | ) |
|
|
inline |
Definition at line 334 of file blobbox.h.
335 right_crossing_rule_ = new_right;
◆ set_right_rule()
void BLOBNBOX::set_right_rule |
( |
int |
new_right | ) |
|
|
inline |
Definition at line 322 of file blobbox.h.
323 right_rule_ = new_right;
◆ set_right_tab_type()
void BLOBNBOX::set_right_tab_type |
( |
TabType |
new_type | ) |
|
|
inline |
Definition at line 280 of file blobbox.h.
281 right_tab_type_ = new_type;
◆ set_special_text_type()
Definition at line 292 of file blobbox.h.
293 spt_type_ = new_type;
◆ set_vert_possible()
void BLOBNBOX::set_vert_possible |
( |
bool |
value | ) |
|
|
inline |
Definition at line 304 of file blobbox.h.
305 vert_possible_ = value;
◆ set_vert_stroke_width()
void BLOBNBOX::set_vert_stroke_width |
( |
float |
width | ) |
|
|
inline |
Definition at line 346 of file blobbox.h.
347 vert_stroke_width_ = width;
◆ special_text_type()
◆ TextlineColor()
◆ translate_box()
void BLOBNBOX::translate_box |
( |
ICOORD |
v | ) |
|
|
inline |
Definition at line 174 of file blobbox.h.
177 base_char_top_ += v.
y();
178 base_char_bottom_ += v.
y();
◆ UniquelyHorizontal()
bool BLOBNBOX::UniquelyHorizontal |
( |
| ) |
const |
|
inline |
Definition at line 413 of file blobbox.h.
414 return horz_possible_ && !vert_possible_;
◆ UniquelyVertical()
bool BLOBNBOX::UniquelyVertical |
( |
| ) |
const |
|
inline |
Definition at line 410 of file blobbox.h.
411 return vert_possible_ && !horz_possible_;
◆ UnMergeableType()
◆ vert_possible()
bool BLOBNBOX::vert_possible |
( |
| ) |
const |
|
inline |
Definition at line 301 of file blobbox.h.
302 return vert_possible_;
◆ vert_stroke_width()
float BLOBNBOX::vert_stroke_width |
( |
| ) |
const |
|
inline |
Definition at line 343 of file blobbox.h.
344 return vert_stroke_width_;
The documentation for this class was generated from the following files:
int IntCastRounded(double x)
const double kDefiniteAspectRatio
TBOX bounding_box() const
BLOBNBOX * neighbour(BlobNeighbourDir n) const
BlobRegionType region_type() const
bool NearlyEqual(T x, T y, T tolerance)
const double kCosSmallAngle
const TBOX & bounding_box() const
void plot(ScrollView *window, ScrollView::Color blob_colour, ScrollView::Color child_colour)
void NeighbourGaps(int gaps[BND_COUNT]) const
tesseract::ColPartition * owner() const
void rotate_box(FCOORD rotation)
int16_t y() const
access_function
int x_gap(const TBOX &box) const
int y_gap(const TBOX &box) const
static bool IsLineType(BlobRegionType type)
int16_t EstimateBaselinePosition()
float area_stroke_width() const
void find_cblob_limits(C_BLOB *blob, float leftx, float rightx, FCOORD rotation, float &ymin, float &ymax)
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
static ScrollView::Color TextlineColor(BlobRegionType region_type, BlobTextFlowType flow_type)
void move(const ICOORD vec)
void find_cblob_vlimits(C_BLOB *blob, float leftx, float rightx, float &ymin, float &ymax)
static bool IsImageType(BlobRegionType type)
void rotate(const FCOORD &vec)
bool DeletableNoise() const
void rotate(const FCOORD &rotation)
void set_diacritic_box(const TBOX &diacritic_box)
const double kComplexShapePerimeterRatio
void ComputeEdgeOffsets(int threshold, Pix *pix)
void plot(ScrollView *window, ScrollView::Color blob_colour, ScrollView::Color child_colour)
void set_horz_possible(bool value)
void set_vert_possible(bool value)
void compute_bounding_box()
C_OUTLINE_LIST * out_list()
float horz_stroke_width() const
bool good_stroke_neighbour(BlobNeighbourDir n) const
float vert_stroke_width() const