#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.
- Parameters
-
testing_on | drawing blob |
blob | blob to test |
baseline | coords of baseline |
xheight | height of line |
Definition at line 48 of file blkocc.cpp.
73 (
"Testing underline on blob at (%d,%d)->(%d,%d), base=%d\nOccs:",
78 horizontal_cblob_projection(blob, &projection);
81 if (occ <= blob_box.
top () && projection.
pile_count (occ) > desc_occ)
86 if (occ >= blob_box.
bottom () && occ <= blob_box.
top ()
91 for (occ =
baseline + xheight + 1; occ <= blob_box.
top (); occ++)
95 tprintf (
"%d %d %d\n", desc_occ, x_occ, asc_occ);
97 if (desc_occ == 0 && x_occ == 0 && asc_occ == 0) {
98 tprintf (
"Bottom=%d, top=%d, base=%d, x=%d\n",
102 if (desc_occ > x_occ + x_occ
105 return asc_occ > x_occ + x_occ &&
◆ 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 33 of file blkocc.cpp.