* This method baseline normalizes a TBLOB in-place. The input row is used * for normalization. The denorm is an optional parameter in which the * normalization-antidote is returned. */
| 2520 | * normalization-antidote is returned. |
| 2521 | */ |
| 2522 | void TessBaseAPI::NormalizeTBLOB(TBLOB *tblob, ROW *row, bool numeric_mode) { |
| 2523 | TBOX box = tblob->bounding_box(); |
| 2524 | float x_center = (box.left() + box.right()) / 2.0f; |
| 2525 | float baseline = row->base_line(x_center); |
| 2526 | float scale = kBlnXHeight / row->x_height(); |
| 2527 | tblob->Normalize(NULL, NULL, NULL, x_center, baseline, scale, scale, |
| 2528 | 0.0f, static_cast<float>(kBlnBaselineOffset), false, NULL); |
| 2529 | } |
| 2530 | |
| 2531 | /** |
| 2532 | * Return a TBLOB * from the whole pix. |
nothing calls this directly
no test coverage detected