tesseract
v4.0.0-17-g361f3264
Open Source OCR Engine
polyaprx.h
1
/**********************************************************************
2
* File: polyaprx.h (Formerly polygon.h)
3
* Description: Code for polygonal approximation from old edgeprog.
4
* Author: Ray Smith
5
* Created: Thu Nov 25 11:42:04 GMT 1993
6
*
7
* (C) Copyright 1993, 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 POLYAPRX_H
21
#define POLYAPRX_H
22
23
class
C_OUTLINE
;
24
struct
EDGEPT
;
25
struct
TESSLINE
;
26
27
// convert a chain-coded input to the old OUTLINE approximation
28
TESSLINE
* ApproximateOutline(
bool
allow_detailed_fx,
C_OUTLINE
*c_outline);
29
EDGEPT
*edgesteps_to_edgepts (
//convert outline
30
C_OUTLINE
* c_outline,
//input
31
EDGEPT
edgepts[]
//output is array
32
);
33
void
fix2(
//polygonal approx
34
EDGEPT
*
start
,
/*loop to approimate */
35
int
area);
36
EDGEPT
*poly2(
//second poly
37
EDGEPT
*startpt,
/*start of loop */
38
int
area
/*area of blob box */
39
);
40
void
cutline(
//recursive refine
41
EDGEPT
*first,
/*ends of line */
42
EDGEPT
*last,
43
int
area
/*area of object */
44
);
45
#endif
EDGEPT
Definition:
blobs.h:83
TESSLINE::start
TPOINT start
Definition:
blobs.h:262
TESSLINE
Definition:
blobs.h:187
C_OUTLINE
Definition:
coutln.h:72
src
tesseract
src
ccstruct
polyaprx.h
Generated on Wed Nov 7 2018 13:45:43 for tesseract by
1.8.13