#include <blobbox.h>
|
| TO_ROW () |
|
| TO_ROW (BLOBNBOX *blob, float top, float bottom, float row_size) |
|
void | print () const |
|
float | max_y () const |
|
float | min_y () const |
|
float | mean_y () const |
|
float | initial_min_y () const |
|
float | line_m () const |
|
float | line_c () const |
|
float | line_error () const |
|
float | parallel_c () const |
|
float | parallel_error () const |
|
float | believability () const |
|
float | intercept () const |
|
void | add_blob (BLOBNBOX *blob, float top, float bottom, float row_size) |
|
void | insert_blob (BLOBNBOX *blob) |
|
BLOBNBOX_LIST * | blob_list () |
|
void | set_line (float new_m, float new_c, float new_error) |
|
void | set_parallel_line (float gradient, float new_c, float new_error) |
|
void | set_limits (float new_min, float new_max) |
|
void | compute_vertical_projection () |
|
bool | rep_chars_marked () const |
|
void | clear_rep_chars_marked () |
|
int | num_repeated_sets () const |
|
void | set_num_repeated_sets (int num_sets) |
|
| ELIST2_LINK () |
|
| ELIST2_LINK (const ELIST2_LINK &) |
|
void | operator= (const ELIST2_LINK &) |
|
Definition at line 556 of file blobbox.h.
◆ TO_ROW() [1/2]
◆ TO_ROW() [2/2]
TO_ROW::TO_ROW |
( |
BLOBNBOX * |
blob, |
|
|
float |
top, |
|
|
float |
bottom, |
|
|
float |
row_size |
|
) |
| |
Definition at line 690 of file blobbox.cpp.
699 initial_y_min = bottom;
702 BLOBNBOX_IT it = &blobs;
704 it.add_to_end (blob);
705 diff = top - bottom - row_size;
711 else if ((top - bottom) * 3 < row_size) {
712 diff = row_size / 3 + bottom - top;
◆ add_blob()
void TO_ROW::add_blob |
( |
BLOBNBOX * |
blob, |
|
|
float |
top, |
|
|
float |
bottom, |
|
|
float |
row_size |
|
) |
| |
Definition at line 734 of file blobbox.cpp.
742 BLOBNBOX_IT it = &blobs;
744 it.add_to_end (blob);
745 allowed = row_size + y_min - y_max;
747 available = top > y_max ? top - y_max : 0;
750 available += y_min - bottom;
752 available += available;
753 if (available < allowed)
756 y_min -= (y_min - bottom) * allowed / available;
758 y_max += (top - y_max) * allowed / available;
◆ believability()
float TO_ROW::believability |
( |
| ) |
const |
|
inline |
◆ blob_list()
BLOBNBOX_LIST* TO_ROW::blob_list |
( |
| ) |
|
|
inline |
◆ clear_rep_chars_marked()
void TO_ROW::clear_rep_chars_marked |
( |
| ) |
|
|
inline |
Definition at line 647 of file blobbox.h.
648 num_repeated_sets_ = -1;
◆ compute_vertical_projection()
void TO_ROW::compute_vertical_projection |
( |
| ) |
|
Definition at line 797 of file blobbox.cpp.
803 if (blob_it.empty ())
805 row_box = blob_it.data ()->bounding_box ();
806 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list (); blob_it.forward ())
807 row_box += blob_it.data ()->bounding_box ();
813 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list (); blob_it.forward ()) {
814 blob = blob_it.data();
815 if (blob->
cblob() !=
nullptr)
bool set_range(int32_t min_bucket_value, int32_t max_bucket_value_plus_1)
#define PROJECTION_MARGIN
void vertical_cblob_projection(C_BLOB *blob, STATS *stats)
BLOBNBOX_LIST * blob_list()
◆ initial_min_y()
float TO_ROW::initial_min_y |
( |
| ) |
const |
|
inline |
Definition at line 580 of file blobbox.h.
581 return initial_y_min;
◆ insert_blob()
void TO_ROW::insert_blob |
( |
BLOBNBOX * |
blob | ) |
|
Definition at line 770 of file blobbox.cpp.
773 BLOBNBOX_IT it = &blobs;
776 it.add_before_then_move (blob);
779 while (!it.cycled_list ()
780 && it.data ()->bounding_box ().left () <=
783 if (it.cycled_list ())
784 it.add_to_end (blob);
786 it.add_before_stay_put (blob);
const TBOX & bounding_box() const
◆ intercept()
float TO_ROW::intercept |
( |
| ) |
const |
|
inline |
◆ line_c()
float TO_ROW::line_c |
( |
| ) |
const |
|
inline |
◆ line_error()
float TO_ROW::line_error |
( |
| ) |
const |
|
inline |
◆ line_m()
float TO_ROW::line_m |
( |
| ) |
const |
|
inline |
◆ max_y()
float TO_ROW::max_y |
( |
| ) |
const |
|
inline |
◆ mean_y()
float TO_ROW::mean_y |
( |
| ) |
const |
|
inline |
Definition at line 577 of file blobbox.h.
578 return (y_min + y_max) / 2.0f;
◆ min_y()
float TO_ROW::min_y |
( |
| ) |
const |
|
inline |
◆ num_repeated_sets()
int TO_ROW::num_repeated_sets |
( |
| ) |
const |
|
inline |
Definition at line 650 of file blobbox.h.
651 return num_repeated_sets_;
◆ parallel_c()
float TO_ROW::parallel_c |
( |
| ) |
const |
|
inline |
◆ parallel_error()
float TO_ROW::parallel_error |
( |
| ) |
const |
|
inline |
◆ print()
void TO_ROW::print |
( |
| ) |
const |
Definition at line 718 of file blobbox.cpp.
719 tprintf(
"pitch=%d, fp=%g, fps=%g, fpns=%g, prs=%g, prns=%g," 720 " spacing=%g xh=%g y_origin=%g xev=%d, asc=%g, desc=%g," 721 " body=%g, minsp=%d maxnsp=%d, thr=%d kern=%g sp=%g\n",
DLLSYM void tprintf(const char *format,...)
PITCH_TYPE pitch_decision
◆ rep_chars_marked()
bool TO_ROW::rep_chars_marked |
( |
| ) |
const |
|
inline |
Definition at line 644 of file blobbox.h.
645 return num_repeated_sets_ != -1;
◆ set_limits()
void TO_ROW::set_limits |
( |
float |
new_min, |
|
|
float |
new_max |
|
) |
| |
|
inline |
◆ set_line()
void TO_ROW::set_line |
( |
float |
new_m, |
|
|
float |
new_c, |
|
|
float |
new_error |
|
) |
| |
|
inline |
◆ set_num_repeated_sets()
void TO_ROW::set_num_repeated_sets |
( |
int |
num_sets | ) |
|
|
inline |
Definition at line 653 of file blobbox.h.
654 num_repeated_sets_ = num_sets;
◆ set_parallel_line()
void TO_ROW::set_parallel_line |
( |
float |
gradient, |
|
|
float |
new_c, |
|
|
float |
new_error |
|
) |
| |
|
inline |
Definition at line 624 of file blobbox.h.
629 para_error = new_error;
632 y_origin = (float) (new_c / sqrt (1 + gradient * gradient));
static const int kErrorWeight
◆ all_caps
◆ ascrise
◆ baseline
◆ body_size
◆ char_cells
ICOORDELT_LIST TO_ROW::char_cells |
◆ descdrop
◆ fixed_pitch
float TO_ROW::fixed_pitch |
◆ fp_nonsp
◆ fp_space
◆ kern_size
◆ kErrorWeight
const int TO_ROW::kErrorWeight = 3 |
|
static |
◆ max_nonspace
int32_t TO_ROW::max_nonspace |
◆ merged
◆ min_space
int32_t TO_ROW::min_space |
◆ pitch_decision
◆ pr_nonsp
◆ pr_space
◆ projection
◆ projection_left
int16_t TO_ROW::projection_left |
◆ projection_right
int16_t TO_ROW::projection_right |
◆ rep_words
WERD_LIST TO_ROW::rep_words |
◆ space_size
◆ space_threshold
int32_t TO_ROW::space_threshold |
◆ spacing
◆ used_dm_model
bool TO_ROW::used_dm_model |
◆ xheight
◆ xheight_evidence
int TO_ROW::xheight_evidence |
The documentation for this class was generated from the following files:
- /usr/src/tesseract-ocr.master/src/ccstruct/blobbox.h
- /usr/src/tesseract-ocr.master/src/ccstruct/blobbox.cpp