Tesseract
3.02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
* Created: Mon Aug 8 11:14:00 BST 1994
6
*
7
* (C) Copyright 1994, Hewlett-Packard Ltd.
8
** Licensed under the Apache License, Version 2.0 (the "License");
9
** you may not use this file except in compliance with the License.
10
** You may obtain a copy of the License at
11
** http://www.apache.org/licenses/LICENSE-2.0
12
** Unless required by applicable law or agreed to in writing, software
13
** distributed under the License is distributed on an "AS IS" BASIS,
14
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
** See the License for the specific language governing permissions and
16
** limitations under the License.
17
*
18
**********************************************************************/
19
20
#ifndef UNDERLIN_H
21
#define UNDERLIN_H
22
23
#include "
fpchop.h
"
24
#include "
notdll.h
"
25
26
extern
double_VAR_H
(
textord_underline_offset
, 0.1,
27
"Fraction of x to ignore"
);
28
extern
BOOL_VAR_H
(
textord_restore_underlines
,
FALSE
,
29
"Chop underlines & put back"
);
30
void
restore_underlined_blobs
(
//get chop points
31
TO_BLOCK
*block
//block to do
32
);
33
TO_ROW
*
most_overlapping_row
(
//find best row
34
TO_ROW_LIST *rows,
//list of rows
35
BLOBNBOX
*blob
//blob to place
36
);
37
void
find_underlined_blobs
(
//get chop points
38
BLOBNBOX
*u_line,
//underlined unit
39
QSPLINE
*
baseline
,
//actual baseline
40
float
xheight,
//height of line
41
float
baseline_offset,
//amount to shrinke it
42
ICOORDELT_LIST *chop_cells
//places to chop
43
);
44
void
vertical_cunderline_projection
(
//project outlines
45
C_OUTLINE
*outline,
//outline to project
46
QSPLINE
*
baseline
,
//actual baseline
47
float
xheight,
//height of line
48
float
baseline_offset,
//amount to shrinke it
49
STATS
*lower_proj,
//below baseline
50
STATS
*middle_proj,
//centre region
51
STATS
*upper_proj
//top region
52
);
53
#endif
mnt
data
src
tesseract-ocr
textord
underlin.h
Generated on Thu Nov 1 2012 20:19:51 for Tesseract by
1.8.1