68 for (; blob !=
NULL; blob = blob->
next, ++blob_id) {
74 int min_bottom, max_bottom, min_top, max_top;
84 tprintf(
"Class %s is %s with top %d vs limits of %d->%d, +/-%d\n",
86 bad ?
"Misfit" :
"OK", top, min_top, max_top,
100 for (; blob !=
NULL; blob = blob->
next, ++blob_id) {
108 int min_bottom, max_bottom, min_top, max_top;
118 tprintf(
"Class %s: height=%d, bottom=%d,%d top=%d,%d, actual=%d,%d : ",
120 height, min_bottom, max_bottom, min_top, max_top,
127 min_top > kBlnBaselineOffset &&
133 max_top - kBlnBaselineOffset);
134 int max_xht =
DivRounded(height * kBlnXHeight,
135 min_top - kBlnBaselineOffset);
137 tprintf(
" xht range min=%d, max=%d\n",
142 for (
int y = min_xht; y <= max_xht; ++y)
143 top_stats.
add(y, misfit_dist);
153 float new_xht = top_stats.
median();
155 tprintf(
"Median xht=%f\n", new_xht);
156 tprintf(
"Mode20:A: New x-height = %f (norm), %f (orig)\n",