tesseract  4.0.0-1-g2a2b
polyaprx.h
Go to the documentation of this file.
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
LIST last(LIST var_list)
Definition: oldlist.cpp:242
TPOINT start
Definition: blobs.h:262
EDGEPT * poly2(EDGEPT *startpt, int area)
Definition: polyaprx.cpp:404
void cutline(EDGEPT *first, EDGEPT *last, int area)
Definition: polyaprx.cpp:502
TESSLINE * ApproximateOutline(bool allow_detailed_fx, C_OUTLINE *c_outline)
Definition: polyaprx.cpp:65
Definition: blobs.h:83
EDGEPT * edgesteps_to_edgepts(C_OUTLINE *c_outline, EDGEPT edgepts[])
Definition: polyaprx.cpp:120
void fix2(EDGEPT *start, int area)
Definition: polyaprx.cpp:219