tesseract  5.0.0
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 
24 namespace tesseract {
25 
28 void restore_underlined_blobs( // get chop points
29  TO_BLOCK *block // block to do
30 );
31 TO_ROW *most_overlapping_row( // find best row
32  TO_ROW_LIST *rows, // list of rows
33  BLOBNBOX *blob // blob to place
34 );
35 void 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 );
42 void 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 
52 } // namespace tesseract
53 
54 #endif
double_VAR_H(classify_min_slope)
bool textord_restore_underlines
Definition: underlin.cpp:24
@ baseline
Definition: mfoutline.h:53
void restore_underlined_blobs(TO_BLOCK *block)
Definition: underlin.cpp:32
double textord_underline_offset
Definition: underlin.cpp:23
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:202
BOOL_VAR_H(wordrec_display_splits)
OVERLAP_STATE most_overlapping_row(TO_ROW_IT *row_it, TO_ROW *&best_row, float top, float bottom, float rowsize, bool testing_blob)
Definition: makerow.cpp:2449
void find_underlined_blobs(BLOBNBOX *u_line, QSPLINE *baseline, float xheight, float baseline_offset, ICOORDELT_LIST *chop_cells)
Definition: underlin.cpp:158