All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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 "pdblock.h"
26 #include "crakedge.h"
27 
28 class C_OUTLINE_IT;
29 
30 struct CrackPos {
31  CRACKEDGE** free_cracks; // Freelist for fast allocation.
32  int x; // Position of new edge.
33  int y;
34 };
35 
36 struct Pix;
37 
38 void block_edges(Pix *t_image, // thresholded image
39  PDBLK *block, // block in image
40  C_OUTLINE_IT* outline_it);
41 void make_margins(PDBLK *block, // block in image
42  BLOCK_LINE_IT *line_it, // for old style
43  uinT8 *pixels, // pixels to strip
44  uinT8 margin, // white-out pixel
45  inT16 left, // block edges
46  inT16 right,
47  inT16 y); // line coord );
48 void line_edges(inT16 x, // coord of line start
49  inT16 y, // coord of line
50  inT16 xext, // width of line
51  uinT8 uppercolour, // start of prev line
52  uinT8 * bwpos, // thresholded line
53  CRACKEDGE ** prevline, // edges in progress
54  CRACKEDGE **free_cracks,
55  C_OUTLINE_IT* outline_it);
56 CRACKEDGE *h_edge(int sign, // sign of edge
57  CRACKEDGE * join, // edge to join to
58  CrackPos* pos);
59 CRACKEDGE *v_edge(int sign, // sign of edge
60  CRACKEDGE * join, // edge to join to
61  CrackPos* pos);
62 void join_edges(CRACKEDGE *edge1, // edges to join
63  CRACKEDGE *edge2, // no specific order
64  CRACKEDGE **free_cracks,
65  C_OUTLINE_IT* outline_it);
66 void free_crackedges(CRACKEDGE *start);
67 
68 #endif
void make_margins(PDBLK *block, BLOCK_LINE_IT *line_it, uinT8 *pixels, uinT8 margin, inT16 left, inT16 right, inT16 y)
Definition: scanedg.cpp:86
void block_edges(Pix *t_image, PDBLK *block, C_OUTLINE_IT *outline_it)
Definition: scanedg.cpp:36
CRACKEDGE ** free_cracks
Definition: scanedg.h:31
LIST join(LIST list1, LIST list2)
Definition: oldlist.cpp:264
int y
Definition: scanedg.h:33
rectangle iterator
Definition: pdblock.h:160
void free_crackedges(CRACKEDGE *start)
Definition: scanedg.cpp:364
int x
Definition: scanedg.h:32
void join_edges(CRACKEDGE *edge1, CRACKEDGE *edge2, CRACKEDGE **free_cracks, C_OUTLINE_IT *outline_it)
Definition: scanedg.cpp:331
CRACKEDGE * v_edge(int sign, CRACKEDGE *join, CrackPos *pos)
Definition: scanedg.cpp:279
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:144
CRACKEDGE * h_edge(int sign, CRACKEDGE *join, CrackPos *pos)
Definition: scanedg.cpp:228
page block
Definition: pdblock.h:32
short inT16
Definition: host.h:100
unsigned char uinT8
Definition: host.h:99