#include "params.h"
#include "elst.h"
Go to the source code of this file.
◆ DOT_BAND
◆ END_OF_WERD_CODE
#define END_OF_WERD_CODE 255 |
◆ MAX_NUM_BANDS
◆ NO_LOWER_LIMIT
#define NO_LOWER_LIMIT -9999 |
◆ NO_UPPER_LIMIT
#define NO_UPPER_LIMIT 9999 |
◆ RANGE_IN_BAND
#define RANGE_IN_BAND |
( |
|
band_max, |
|
|
|
band_min, |
|
|
|
range_max, |
|
|
|
range_min |
|
) |
| (((range_min) >= (band_min)) && ((range_max) < (band_max))) |
◆ RANGE_OVERLAPS_BAND
#define RANGE_OVERLAPS_BAND |
( |
|
band_max, |
|
|
|
band_min, |
|
|
|
range_max, |
|
|
|
range_min |
|
) |
| (((range_max) >= (band_min)) && ((range_min) < (band_max))) |
◆ UNDEFINED_BAND
#define UNDEFINED_BAND 99 |
◆ test_underline()
bool test_underline |
( |
bool |
testing_on, |
|
|
C_BLOB * |
blob, |
|
|
int16_t |
baseline, |
|
|
int16_t |
xheight |
|
) |
| |
test_underline
Check to see if the blob is an underline. Return TRUE if it is.
Definition at line 53 of file blkocc.cpp.
78 (
"Testing underline on blob at (%d,%d)->(%d,%d), base=%d\nOccs:",
83 horizontal_cblob_projection(blob, &projection);
86 if (occ <= blob_box.
top () && projection.
pile_count (occ) > desc_occ)
91 if (occ >= blob_box.
bottom () && occ <= blob_box.
top ()
96 for (occ =
baseline + xheight + 1; occ <= blob_box.
top (); occ++)
100 tprintf (
"%d %d %d\n", desc_occ, x_occ, asc_occ);
102 if (desc_occ == 0 && x_occ == 0 && asc_occ == 0) {
103 tprintf (
"Bottom=%d, top=%d, base=%d, x=%d\n",
107 if (desc_occ > x_occ + x_occ
110 return asc_occ > x_occ + x_occ &&
int32_t pile_count(int32_t value) const
double textord_underline_threshold
bool set_range(int32_t min_bucket_value, int32_t max_bucket_value_plus_1)
DLLSYM void tprintf(const char *format,...)
TBOX bounding_box() const
◆ blockocc_asc_height
int blockocc_asc_height = 255 |
"Ascender height after normalisation"
◆ blockocc_band_count
int blockocc_band_count = 4 |
◆ blockocc_desc_height
int blockocc_desc_height = 0 |
"Descender height after normalisation"
◆ blockocc_show_result
bool blockocc_show_result = FALSE |
"Show intermediate results"
◆ textord_underline_threshold
double textord_underline_threshold = 0.9 |
"Fraction of width occupied"
Definition at line 38 of file blkocc.cpp.