Tesseract  3.02
 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
int x
Definition: scanedg.h:33
CRACKEDGE ** free_cracks
Definition: scanedg.h:32
void free_crackedges(CRACKEDGE *start)
Definition: scanedg.cpp:398
rectangle iterator
Definition: pdblock.h:166
void make_margins(PDBLK *block, BLOCK_LINE_IT *line_it, uinT8 *pixels, uinT8 margin, inT16 left, inT16 right, inT16 y)
Definition: scanedg.cpp:87
int y
Definition: scanedg.h:34
void whiteout_block(IMAGE *t_image, PDBLK *block)
Definition: scanedg.cpp:145
CRACKEDGE * v_edge(int sign, CRACKEDGE *join, CrackPos *pos)
Definition: scanedg.cpp:313
short inT16
Definition: host.h:100
LIST join(LIST list1, LIST list2)
Definition: oldlist.cpp:264
unsigned char uinT8
Definition: host.h:99
void join_edges(CRACKEDGE *edge1, CRACKEDGE *edge2, CRACKEDGE **free_cracks, C_OUTLINE_IT *outline_it)
Definition: scanedg.cpp:365
Definition: img.h:51
void line_edges(inT16 x, inT16 y, inT16 xext, uinT8 uppercolour, uinT8 *bwpos, CRACKEDGE **prevline, CRACKEDGE **free_cracks, C_OUTLINE_IT *outline_it)
Definition: scanedg.cpp:178
CRACKEDGE * h_edge(int sign, CRACKEDGE *join, CrackPos *pos)
Definition: scanedg.cpp:262
void block_edges(IMAGE *t_image, PDBLK *block, C_OUTLINE_IT *outline_it)
Definition: scanedg.cpp:35
page block
Definition: pdblock.h:35