#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 &)=delete |
| |
| void | operator= (const ELIST2_LINK &) |
| |
Definition at line 555 of file blobbox.h.
◆ TO_ROW() [1/2]
| tesseract::TO_ROW::TO_ROW |
( |
| ) |
|
|
inline |
◆ TO_ROW() [2/2]
| tesseract::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;
705 diff = top - bottom - row_size;
711 else if ((top - bottom) * 3 < row_size) {
712 diff = row_size / 3 + bottom - top;
◆ add_blob()
| void tesseract::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;
745 allowed = row_size + y_min - y_max;
747 available = top > y_max ? top - y_max : 0;
748 if (bottom < y_min) {
750 available += y_min - bottom;
753 available += available;
754 if (available < allowed) {
757 if (bottom < y_min) {
758 y_min -= (y_min - bottom) * allowed / available;
761 y_max += (top - y_max) * allowed / available;
◆ believability()
| float tesseract::TO_ROW::believability |
( |
| ) |
const |
|
inline |
◆ blob_list()
| BLOBNBOX_LIST* tesseract::TO_ROW::blob_list |
( |
| ) |
|
|
inline |
◆ clear_rep_chars_marked()
| void tesseract::TO_ROW::clear_rep_chars_marked |
( |
| ) |
|
|
inline |
Definition at line 640 of file blobbox.h.
641 num_repeated_sets_ = -1;
◆ compute_vertical_projection()
| void tesseract::TO_ROW::compute_vertical_projection |
( |
| ) |
|
Definition at line 799 of file blobbox.cpp.
805 if (blob_it.empty()) {
808 row_box = blob_it.data()->bounding_box();
809 for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
810 row_box += blob_it.data()->bounding_box();
816 for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
817 blob = blob_it.data();
818 if (blob->cblob() !=
nullptr) {
#define PROJECTION_MARGIN
void vertical_cblob_projection(C_BLOB *blob, STATS *stats)
BLOBNBOX_LIST * blob_list()
bool set_range(int32_t min_bucket_value, int32_t max_bucket_value_plus_1)
◆ initial_min_y()
| float tesseract::TO_ROW::initial_min_y |
( |
| ) |
const |
|
inline |
Definition at line 577 of file blobbox.h.
578 return initial_y_min;
◆ insert_blob()
| void tesseract::TO_ROW::insert_blob |
( |
BLOBNBOX * |
blob | ) |
|
Definition at line 773 of file blobbox.cpp.
776 BLOBNBOX_IT it = &blobs;
779 it.add_before_then_move(blob);
782 while (!it.cycled_list() && it.data()->bounding_box().left() <= blob->bounding_box().left()) {
785 if (it.cycled_list()) {
788 it.add_before_stay_put(blob);
◆ intercept()
| float tesseract::TO_ROW::intercept |
( |
| ) |
const |
|
inline |
◆ line_c()
| float tesseract::TO_ROW::line_c |
( |
| ) |
const |
|
inline |
◆ line_error()
| float tesseract::TO_ROW::line_error |
( |
| ) |
const |
|
inline |
◆ line_m()
| float tesseract::TO_ROW::line_m |
( |
| ) |
const |
|
inline |
◆ max_y()
| float tesseract::TO_ROW::max_y |
( |
| ) |
const |
|
inline |
◆ mean_y()
| float tesseract::TO_ROW::mean_y |
( |
| ) |
const |
|
inline |
Definition at line 574 of file blobbox.h.
575 return (y_min + y_max) / 2.0f;
◆ min_y()
| float tesseract::TO_ROW::min_y |
( |
| ) |
const |
|
inline |
◆ num_repeated_sets()
| int tesseract::TO_ROW::num_repeated_sets |
( |
| ) |
const |
|
inline |
Definition at line 643 of file blobbox.h.
644 return num_repeated_sets_;
◆ parallel_c()
| float tesseract::TO_ROW::parallel_c |
( |
| ) |
const |
|
inline |
◆ parallel_error()
| float tesseract::TO_ROW::parallel_error |
( |
| ) |
const |
|
inline |
◆ print()
| void tesseract::TO_ROW::print |
( |
| ) |
const |
Definition at line 718 of file blobbox.cpp.
720 "pitch=%d, fp=%g, fps=%g, fpns=%g, prs=%g, prns=%g,"
721 " spacing=%g xh=%g y_origin=%g xev=%d, asc=%g, desc=%g,"
722 " body=%g, minsp=%d maxnsp=%d, thr=%d kern=%g sp=%g\n",
void tprintf(const char *format,...)
PITCH_TYPE pitch_decision
◆ rep_chars_marked()
| bool tesseract::TO_ROW::rep_chars_marked |
( |
| ) |
const |
|
inline |
Definition at line 637 of file blobbox.h.
638 return num_repeated_sets_ != -1;
◆ set_limits()
| void tesseract::TO_ROW::set_limits |
( |
float |
new_min, |
|
|
float |
new_max |
|
) |
| |
|
inline |
◆ set_line()
| void tesseract::TO_ROW::set_line |
( |
float |
new_m, |
|
|
float |
new_c, |
|
|
float |
new_error |
|
) |
| |
|
inline |
◆ set_num_repeated_sets()
| void tesseract::TO_ROW::set_num_repeated_sets |
( |
int |
num_sets | ) |
|
|
inline |
Definition at line 646 of file blobbox.h.
647 num_repeated_sets_ = num_sets;
◆ set_parallel_line()
| void tesseract::TO_ROW::set_parallel_line |
( |
float |
gradient, |
|
|
float |
new_c, |
|
|
float |
new_error |
|
) |
| |
|
inline |
Definition at line 619 of file blobbox.h.
623 para_error = new_error;
624 credibility = blobs.length() -
kErrorWeight * new_error;
625 y_origin = new_c / std::sqrt(1 + gradient * gradient);
static const int kErrorWeight
◆ all_caps
| bool tesseract::TO_ROW::all_caps |
◆ ascrise
| float tesseract::TO_ROW::ascrise |
◆ baseline
| QSPLINE tesseract::TO_ROW::baseline |
◆ body_size
| float tesseract::TO_ROW::body_size |
◆ char_cells
| ICOORDELT_LIST tesseract::TO_ROW::char_cells |
◆ descdrop
| float tesseract::TO_ROW::descdrop |
◆ fixed_pitch
| float tesseract::TO_ROW::fixed_pitch |
◆ fp_nonsp
| float tesseract::TO_ROW::fp_nonsp |
◆ fp_space
| float tesseract::TO_ROW::fp_space |
◆ kern_size
| float tesseract::TO_ROW::kern_size |
◆ kErrorWeight
| const int tesseract::TO_ROW::kErrorWeight = 3 |
|
static |
◆ max_nonspace
| int32_t tesseract::TO_ROW::max_nonspace |
◆ merged
| bool tesseract::TO_ROW::merged = false |
◆ min_space
| int32_t tesseract::TO_ROW::min_space |
◆ pitch_decision
◆ pr_nonsp
| float tesseract::TO_ROW::pr_nonsp |
◆ pr_space
| float tesseract::TO_ROW::pr_space |
◆ projection
| STATS tesseract::TO_ROW::projection |
◆ projection_left
| int16_t tesseract::TO_ROW::projection_left |
◆ projection_right
| int16_t tesseract::TO_ROW::projection_right |
◆ rep_words
| WERD_LIST tesseract::TO_ROW::rep_words |
◆ space_size
| float tesseract::TO_ROW::space_size |
◆ space_threshold
| int32_t tesseract::TO_ROW::space_threshold |
◆ spacing
| float tesseract::TO_ROW::spacing |
◆ used_dm_model
| bool tesseract::TO_ROW::used_dm_model |
◆ xheight
| float tesseract::TO_ROW::xheight |
◆ xheight_evidence
| int tesseract::TO_ROW::xheight_evidence |
The documentation for this class was generated from the following files: