Tesseract
3.02
|
#include <alignedblob.h>
Public Member Functions | |
AlignedBlobParams (int vertical_x, int vertical_y, int height, int v_gap_multiple, int min_gutter_width, int resolution, TabAlignment alignment0) | |
AlignedBlobParams (int vertical_x, int vertical_y, int width) | |
void | set_vertical (int vertical_x, int vertical_y) |
Public Attributes | |
double | gutter_fraction |
bool | right_tab |
bool | ragged |
TabAlignment | alignment |
TabType | confirmed_type |
int | max_v_gap |
int | min_gutter |
int | l_align_tolerance |
int | r_align_tolerance |
int | min_points |
int | min_length |
ICOORD | vertical |
Definition at line 44 of file alignedblob.h.
tesseract::AlignedBlobParams::AlignedBlobParams | ( | int | vertical_x, |
int | vertical_y, | ||
int | height, | ||
int | v_gap_multiple, | ||
int | min_gutter_width, | ||
int | resolution, | ||
TabAlignment | alignment0 | ||
) |
Definition at line 94 of file alignedblob.cpp.
: right_tab(align0 == TA_RIGHT_RAGGED || align0 == TA_RIGHT_ALIGNED), ragged(align0 == TA_LEFT_RAGGED || align0 == TA_RIGHT_RAGGED), alignment(align0), confirmed_type(TT_CONFIRMED), min_length(0) { // Set the tolerances according to the type of line sought. // For tab search, these are based on the image resolution for most, or // the height of the starting blob for the maximum vertical gap. max_v_gap = height * v_gap_multiple; if (ragged) { // In the case of a ragged edge, we are much more generous with the // inside alignment fraction, but also require a much bigger gutter. gutter_fraction = kRaggedGapFraction; if (alignment == TA_RIGHT_RAGGED) { l_align_tolerance = static_cast<int>(resolution * kRaggedFraction + 0.5); r_align_tolerance = static_cast<int>(resolution * kAlignedFraction + 0.5); } else { l_align_tolerance = static_cast<int>(resolution * kAlignedFraction + 0.5); r_align_tolerance = static_cast<int>(resolution * kRaggedFraction + 0.5); } min_points = kMinRaggedTabs; } else { gutter_fraction = kAlignedGapFraction; l_align_tolerance = static_cast<int>(resolution * kAlignedFraction + 0.5); r_align_tolerance = static_cast<int>(resolution * kAlignedFraction + 0.5); min_points = kMinAlignedTabs; } min_gutter = static_cast<int>(height * gutter_fraction + 0.5); if (min_gutter < min_gutter_width) min_gutter = min_gutter_width; // Fit the vertical vector into an ICOORD, which is 16 bit. set_vertical(vertical_x, vertical_y); }
tesseract::AlignedBlobParams::AlignedBlobParams | ( | int | vertical_x, |
int | vertical_y, | ||
int | width | ||
) |
Definition at line 135 of file alignedblob.cpp.
: gutter_fraction(0.0), right_tab(false), ragged(false), alignment(TA_SEPARATOR), confirmed_type(TT_VLINE), max_v_gap(kVLineSearchSize), min_gutter(kVLineGutter), min_points(1), min_length(kVLineMinLength) { // Compute threshold for left and right alignment. l_align_tolerance = MAX(kVLineAlignment, width); r_align_tolerance = MAX(kVLineAlignment, width); // Fit the vertical vector into an ICOORD, which is 16 bit. set_vertical(vertical_x, vertical_y); }
void tesseract::AlignedBlobParams::set_vertical | ( | int | vertical_x, |
int | vertical_y | ||
) |
Definition at line 66 of file alignedblob.h.
Definition at line 67 of file alignedblob.h.
Definition at line 63 of file alignedblob.h.
Definition at line 71 of file alignedblob.h.
Definition at line 68 of file alignedblob.h.
Definition at line 69 of file alignedblob.h.
Definition at line 75 of file alignedblob.h.
Definition at line 74 of file alignedblob.h.
Definition at line 72 of file alignedblob.h.
Definition at line 65 of file alignedblob.h.
Definition at line 64 of file alignedblob.h.
Definition at line 77 of file alignedblob.h.