tesseract 4.1.1
Loading...
Searching...
No Matches
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
23class C_OUTLINE;
24struct EDGEPT;
25struct TESSLINE;
26
27// convert a chain-coded input to the old OUTLINE approximation
28TESSLINE* ApproximateOutline(bool allow_detailed_fx, C_OUTLINE *c_outline);
29EDGEPT *edgesteps_to_edgepts ( //convert outline
30C_OUTLINE * c_outline, //input
31EDGEPT edgepts[] //output is array
32);
33void fix2( //polygonal approx
34 EDGEPT *start, /*loop to approimate */
35 int area);
36EDGEPT *poly2( //second poly
37 EDGEPT *startpt, /*start of loop */
38 int area /*area of blob box */
39 );
40void cutline( //recursive refine
41 EDGEPT *first, /*ends of line */
42 EDGEPT *last,
43 int area /*area of object */
44 );
45#endif
TESSLINE * ApproximateOutline(bool allow_detailed_fx, C_OUTLINE *c_outline)
Definition: polyaprx.cpp:61
void fix2(EDGEPT *start, int area)
Definition: polyaprx.cpp:215
void cutline(EDGEPT *first, EDGEPT *last, int area)
Definition: polyaprx.cpp:498
EDGEPT * poly2(EDGEPT *startpt, int area)
Definition: polyaprx.cpp:400
EDGEPT * edgesteps_to_edgepts(C_OUTLINE *c_outline, EDGEPT edgepts[])
Definition: polyaprx.cpp:116
LIST last(LIST var_list)
Definition: oldlist.cpp:190
Definition: blobs.h:99
TPOINT start
Definition: blobs.h:278