119 return type1 >= type2;
138 area =
static_cast<int>(srcblob->
area());
159 base_char_top_ += v.
y();
160 base_char_bottom_ += v.
y();
169 BLOBNBOX_IT *start_it,
170 BLOBNBOX_IT *blob_it,
176 int* v_min,
int* v_max)
const;
200 double fractional_tolerance,
201 double constant_tolerance)
const;
215 base_char_top_ = box.
top();
216 base_char_bottom_ = box.bottom();
219 box = cblob_ptr->bounding_box();
220 base_char_top_ = box.top();
221 base_char_bottom_ = box.bottom();
240 return repeated_set_;
243 repeated_set_ = set_id;
249 return left_tab_type_;
252 left_tab_type_ = new_type;
255 return right_tab_type_;
258 right_tab_type_ = new_type;
264 region_type_ = new_type;
270 spt_type_ = new_type;
279 return vert_possible_;
282 vert_possible_ = value;
285 return horz_possible_;
288 horz_possible_ = value;
294 left_rule_ = new_left;
300 right_rule_ = new_right;
303 return left_crossing_rule_;
306 left_crossing_rule_ = new_left;
309 return right_crossing_rule_;
312 right_crossing_rule_ = new_right;
315 return horz_stroke_width_;
318 horz_stroke_width_ = width;
321 return vert_stroke_width_;
324 vert_stroke_width_ = width;
327 return area_stroke_width_;
336 return leader_on_left_;
339 leader_on_left_ = flag;
342 return leader_on_right_;
345 leader_on_right_ = flag;
348 return neighbours_[n];
351 return good_stroke_neighbours_[n];
355 good_stroke_neighbours_[n] = good;
358 return base_char_top_ != box.top() || base_char_bottom_ != box.bottom();
361 return base_char_top_;
364 return base_char_bottom_;
367 return line_crossings_;
370 line_crossings_ = value;
373 base_char_top_ = diacritic_box.
top();
374 base_char_bottom_ = diacritic_box.
bottom();
377 return base_char_blob_;
380 base_char_blob_ = blob;
384 return vert_possible_ && !horz_possible_;
387 return horz_possible_ && !vert_possible_;
411 #ifndef GRAPHICS_DISABLED
414 static void PlotBlobs(BLOBNBOX_LIST* list,
442 area_stroke_width_ = 0.0f;
443 horz_stroke_width_ = 0.0f;
444 vert_stroke_width_ = 0.0f;
460 left_crossing_rule_ = 0;
461 right_crossing_rule_ = 0;
462 if (area_stroke_width_ == 0.0
f && area > 0 &&
cblob() !=
NULL)
465 base_char_top_ = box.top();
466 base_char_bottom_ = box.bottom();
468 base_char_blob_ =
NULL;
469 horz_possible_ =
false;
470 vert_possible_ =
false;
471 leader_on_left_ =
false;
472 leader_on_right_ =
false;
478 neighbours_[n] =
NULL;
479 good_stroke_neighbours_[n] =
false;
497 inT16 left_crossing_rule_;
498 inT16 right_crossing_rule_;
499 inT16 base_char_top_;
500 inT16 base_char_bottom_;
503 float horz_stroke_width_;
504 float vert_stroke_width_;
505 float area_stroke_width_;
512 bool leader_on_left_;
513 bool leader_on_right_;
537 return (y_min + y_max) / 2.0f;
540 return initial_y_min;
588 para_error = new_error;
591 y_origin = (float) (new_c / sqrt (1 + gradient * gradient));
604 return num_repeated_sets_ != -1;
607 num_repeated_sets_ = -1;
610 return num_repeated_sets_;
613 num_repeated_sets_ = num_sets;
658 int num_repeated_sets_;
683 BLOBNBOX_LIST* blobnbox_list[] = {&blobs, &underlines, &noise_blobs,
684 &small_blobs, &large_blobs,
NULL};
685 for (BLOBNBOX_LIST** list = blobnbox_list; *list !=
NULL; ++list) {
686 BLOBNBOX_IT it(*list);
687 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
688 it.data()->rotate(rotation);
693 block->rotate(rotation);
695 STATS widths(0, block->bounding_box().width());
696 STATS heights(0, block->bounding_box().height());
697 BLOBNBOX_IT blob_it(&blobs);
698 for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
699 widths.add(blob_it.data()->bounding_box().width(), 1);
700 heights.add(blob_it.data()->bounding_box().height(), 1);
702 block->set_median_size(static_cast<int>(widths.median() + 0.5),
703 static_cast<int>(heights.median() + 0.5));
707 TO_ROW_IT row_it = &row_list;
710 for (row_it.mark_cycle_pt (); !row_it.cycled_list ();
712 row = row_it.data ();
713 printf (
"Row range (%g,%g), para_c=%g, blobcount=" INT32FORMAT
723 void ReSetAndReFilterBlobs();
726 void DeleteUnownedNoise();
728 #ifndef GRAPHICS_DISABLED
764 TO_ROW_LIST row_list;
769 "Weighting for error in believability");
807 #ifndef GRAPHICS_DISABLED
812 #endif // GRAPHICS_DISABLED