tesseract 4.1.1
Loading...
Searching...
No Matches
underlin.h
Go to the documentation of this file.
1/**********************************************************************
2 * File: underlin.h (Formerly undrline.h)
3 * Description: Code to chop blobs apart from underlines.
4 * Author: Ray Smith
5 *
6 * (C) Copyright 1994, Hewlett-Packard Ltd.
7 ** Licensed under the Apache License, Version 2.0 (the "License");
8 ** you may not use this file except in compliance with the License.
9 ** You may obtain a copy of the License at
10 ** http://www.apache.org/licenses/LICENSE-2.0
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 *
17 **********************************************************************/
18
19#ifndef UNDERLIN_H
20#define UNDERLIN_H
21
22#include "fpchop.h"
23
25"Fraction of x to ignore");
27"Chop underlines & put back");
28void restore_underlined_blobs( //get chop points
29 TO_BLOCK *block //block to do
30 );
31TO_ROW *most_overlapping_row( //find best row
32 TO_ROW_LIST *rows, //list of rows
33 BLOBNBOX *blob //blob to place
34 );
35void find_underlined_blobs( //get chop points
36 BLOBNBOX *u_line, //underlined unit
37 QSPLINE *baseline, //actual baseline
38 float xheight, //height of line
39 float baseline_offset, //amount to shrinke it
40 ICOORDELT_LIST *chop_cells //places to chop
41 );
42void vertical_cunderline_projection( //project outlines
43 C_OUTLINE *outline, //outline to project
44 QSPLINE *baseline, //actual baseline
45 float xheight, //height of line
46 float baseline_offset, //amount to shrinke it
47 STATS *lower_proj, //below baseline
48 STATS *middle_proj, //centre region
49 STATS *upper_proj //top region
50 );
51#endif
#define BOOL_VAR_H(name, val, comment)
Definition: params.h:297
#define double_VAR_H(name, val, comment)
Definition: params.h:301
@ baseline
Definition: mfoutline.h:63
void restore_underlined_blobs(TO_BLOCK *block)
Definition: underlin.cpp:30
TO_ROW * most_overlapping_row(TO_ROW_LIST *rows, BLOBNBOX *blob)
Definition: underlin.cpp:107
double textord_underline_offset
Definition: underlin.cpp:21
void vertical_cunderline_projection(C_OUTLINE *outline, QSPLINE *baseline, float xheight, float baseline_offset, STATS *lower_proj, STATS *middle_proj, STATS *upper_proj)
Definition: underlin.cpp:209
bool textord_restore_underlines
Definition: underlin.cpp:22
void find_underlined_blobs(BLOBNBOX *u_line, QSPLINE *baseline, float xheight, float baseline_offset, ICOORDELT_LIST *chop_cells)
Definition: underlin.cpp:164
Definition: statistc.h:31