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
scanedg.h
Go to the documentation of this file.
1 /**********************************************************************
2 * File: scanedg.h (Formerly scanedge.h)
3 * Description: Raster scanning crack based edge extractor.
4 * Author: Ray Smith
5 * Created: Fri Mar 22 16:11:50 GMT 1991
6 *
7 * (C) Copyright 1991, 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 SCANEDG_H
21 #define SCANEDG_H
22
23 #include "params.h"
24 #include "scrollview.h"
25 #include "img.h"
26 #include "pdblock.h"
27 #include "crakedge.h"
28
29 class C_OUTLINE_IT;
30
31 struct CrackPos {
32 CRACKEDGE** free_cracks; // Freelist for fast allocation.
33 int x; // Position of new edge.
34 int y;
35 };
36
37 void block_edges(IMAGE *t_image, // thresholded image
38 PDBLK *block, // block in image
39 C_OUTLINE_IT* outline_it);
40 void make_margins(PDBLK *block, // block in image
41 BLOCK_LINE_IT *line_it, // for old style
42 uinT8 *pixels, // pixels to strip
43 uinT8 margin, // white-out pixel
44 inT16 left, // block edges
45 inT16 right,
46 inT16 y); // line coord );
47 void whiteout_block(IMAGE *t_image, // thresholded image
48 PDBLK *block); // block in image
49 void line_edges(inT16 x, // coord of line start
50 inT16 y, // coord of line
51 inT16 xext, // width of line
52 uinT8 uppercolour, // start of prev line
53 uinT8 * bwpos, // thresholded line
54 CRACKEDGE ** prevline, // edges in progress
55 CRACKEDGE **free_cracks,
56 C_OUTLINE_IT* outline_it);
57 CRACKEDGE *h_edge(int sign, // sign of edge
58 CRACKEDGE * join, // edge to join to
59 CrackPos* pos);
60 CRACKEDGE *v_edge(int sign, // sign of edge
61 CRACKEDGE * join, // edge to join to
62 CrackPos* pos);
63 void join_edges(CRACKEDGE *edge1, // edges to join
64 CRACKEDGE *edge2, // no specific order
65 CRACKEDGE **free_cracks,
66 C_OUTLINE_IT* outline_it);
67 void free_crackedges(CRACKEDGE *start);
68
69 #endif