68 #define RANGE_IN_BAND(band_max, band_min, range_max, range_min) \ 69 (((range_min) >= (band_min)) && ((range_max) < (band_max))) 87 #define RANGE_OVERLAPS_BAND(band_max, band_min, range_max, range_min) \ 88 (((range_max) >= (band_min)) && ((range_min) < (band_max))) 144 int16_t new_min_min) {
145 max_max = new_max_max;
147 min_max = new_min_max;
148 max_min = new_max_min;
150 min_min = new_min_min;
155 return (y >= max_min) && (y < min_max);
160 return (y >= min) && (y < max);
165 return (y >= min_min) && (y < max_max);
172 return RANGE_OVERLAPS_BAND (min_max, max_min, y1, y2);
174 return RANGE_OVERLAPS_BAND (min_max, max_min, y2, y1);
181 return RANGE_OVERLAPS_BAND (max, min, y1, y2);
183 return RANGE_OVERLAPS_BAND (max, min, y2, y1);
190 return RANGE_OVERLAPS_BAND (max_max, min_min, y1, y2);
192 return RANGE_OVERLAPS_BAND (max_max, min_min, y2, y1);
199 return RANGE_IN_BAND (min_max, max_min, y1, y2);
201 return RANGE_IN_BAND (min_max, max_min, y2, y1);
208 return RANGE_IN_BAND (max, min, y1, y2);
210 return RANGE_IN_BAND (max, min, y2, y1);
217 return RANGE_IN_BAND (max_max, min_min, y1, y2);
219 return RANGE_IN_BAND (max_max, min_min, y2, y1);
225 #define MAX_NUM_BANDS 5 226 #define UNDEFINED_BAND 99 227 #define NO_LOWER_LIMIT -9999 228 #define NO_UPPER_LIMIT 9999 234 #define END_OF_WERD_CODE 255 236 extern BOOL_VAR_H (blockocc_show_result, FALSE,
"Show intermediate results");
237 extern INT_VAR_H (blockocc_desc_height, 0,
238 "Descender height after normalisation");
239 extern INT_VAR_H (blockocc_asc_height, 255,
240 "Ascender height after normalisation");
241 extern INT_VAR_H (blockocc_band_count, 4,
"Number of bands used");
242 extern double_VAR_H (textord_underline_threshold, 0.9,
243 "Fraction of width occupied");
bool range_overlaps_minimal(float y1, float y2)
Definition: blkocc.h:169
bool range_overlaps_maximal(float y1, float y2)
Definition: blkocc.h:187
int16_t max
Definition: blkocc.h:130
bool in_minimal(float y)
Definition: blkocc.h:153
int16_t min
Definition: blkocc.h:133
int16_t max_min
Definition: blkocc.h:132
bool range_in_minimal(float y1, float y2)
Definition: blkocc.h:195
int16_t min_min
Definition: blkocc.h:134
bool range_in_nominal(float y1, float y2)
Definition: blkocc.h:204
bool range_overlaps_nominal(float y1, float y2)
Definition: blkocc.h:178
int16_t max_max
Definition: blkocc.h:129
float max_x
Definition: blkocc.h:52
int16_t min_max
Definition: blkocc.h:131
REGION_OCC(float min, float max, int16_t region)
Definition: blkocc.h:57
bool range_in_maximal(float y1, float y2)
Definition: blkocc.h:213
Definition: stepblob.h:37
bool in_nominal(float y)
Definition: blkocc.h:158
float min_x
Definition: blkocc.h:51
bool in_maximal(float y)
Definition: blkocc.h:163
int16_t region_type
Definition: blkocc.h:53