Leptonica  1.82.0
Image processing and image analysis suite
jbclass.h
Go to the documentation of this file.
1 /*====================================================================*
2  - Copyright (C) 2001 Leptonica. All rights reserved.
3  -
4  - Redistribution and use in source and binary forms, with or without
5  - modification, are permitted provided that the following conditions
6  - are met:
7  - 1. Redistributions of source code must retain the above copyright
8  - notice, this list of conditions and the following disclaimer.
9  - 2. Redistributions in binary form must reproduce the above
10  - copyright notice, this list of conditions and the following
11  - disclaimer in the documentation and/or other materials
12  - provided with the distribution.
13  -
14  - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15  - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16  - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17  - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
18  - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21  - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22  - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23  - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24  - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  *====================================================================*/
26 
27 #ifndef LEPTONICA_JBCLASS_H
28 #define LEPTONICA_JBCLASS_H
29 
47 struct JbClasser
48 {
49  struct Sarray *safiles;
50  l_int32 method;
51  l_int32 components;
53  l_int32 maxwidth;
54  l_int32 maxheight;
55  l_int32 npages;
56  l_int32 baseindex;
58  struct Numa *nacomps;
59  l_int32 sizehaus;
60  l_float32 rankhaus;
61  l_float32 thresh;
62  l_float32 weightfactor;
64  struct Numa *naarea;
66  l_int32 w;
67  l_int32 h;
68  l_int32 nclass;
69  l_int32 keep_pixaa;
70  struct Pixaa *pixaa;
71  struct Pixa *pixat;
73  struct Pixa *pixatd;
75  struct L_DnaHash *dahash;
76  struct Numa *nafgt;
78  struct Pta *ptac;
79  struct Pta *ptact;
80  struct Numa *naclass;
81  struct Numa *napage;
82  struct Pta *ptaul;
85  struct Pta *ptall;
86 };
87 typedef struct JbClasser JBCLASSER;
88 
89 
104 struct JbData
105 {
106  struct Pix *pix;
107  l_int32 npages;
108  l_int32 w;
109  l_int32 h;
110  l_int32 nclass;
111  l_int32 latticew;
112  l_int32 latticeh;
113  struct Numa *naclass;
114  struct Numa *napage;
115  struct Pta *ptaul;
118 };
119 typedef struct JbData JBDATA;
120 
121 
123 enum {
124  JB_RANKHAUS = 0,
125  JB_CORRELATION = 1
126 };
127 
130 enum {
131  JB_CONN_COMPS = 0,
132  JB_CHARACTERS = 1,
133  JB_WORDS = 2
134 };
135 
138 #define JB_TEMPLATE_EXT ".templates.png"
139 #define JB_DATA_EXT ".data"
140 
141 
142 #endif /* LEPTONICA_JBCLASS_H */
struct Pixa * pixat
Definition: jbclass.h:71
l_float32 thresh
Definition: jbclass.h:61
struct Pta * ptac
Definition: jbclass.h:78
l_int32 h
Definition: jbclass.h:67
struct Sarray * safiles
Definition: jbclass.h:49
struct Numa * naarea
Definition: jbclass.h:64
l_int32 npages
Definition: jbclass.h:55
l_float32 rankhaus
Definition: jbclass.h:60
struct Pta * ptall
Definition: jbclass.h:85
struct Numa * napage
Definition: jbclass.h:81
struct Numa * naclass
Definition: jbclass.h:80
l_int32 nclass
Definition: jbclass.h:68
struct Pta * ptaul
Definition: jbclass.h:82
l_int32 maxwidth
Definition: jbclass.h:53
l_float32 weightfactor
Definition: jbclass.h:62
struct Numa * nafgt
Definition: jbclass.h:76
struct Pixaa * pixaa
Definition: jbclass.h:70
l_int32 keep_pixaa
Definition: jbclass.h:69
struct L_DnaHash * dahash
Definition: jbclass.h:75
l_int32 sizehaus
Definition: jbclass.h:59
l_int32 w
Definition: jbclass.h:66
struct Numa * nacomps
Definition: jbclass.h:58
l_int32 components
Definition: jbclass.h:51
struct Pta * ptact
Definition: jbclass.h:79
l_int32 method
Definition: jbclass.h:50
l_int32 maxheight
Definition: jbclass.h:54
l_int32 baseindex
Definition: jbclass.h:56
struct Pixa * pixatd
Definition: jbclass.h:73
l_int32 latticew
Definition: jbclass.h:111
struct Numa * napage
Definition: jbclass.h:114
l_int32 latticeh
Definition: jbclass.h:112
l_int32 npages
Definition: jbclass.h:107
struct Numa * naclass
Definition: jbclass.h:113
l_int32 nclass
Definition: jbclass.h:110
struct Pix * pix
Definition: jbclass.h:106
struct Pta * ptaul
Definition: jbclass.h:115
l_int32 h
Definition: jbclass.h:109
l_int32 w
Definition: jbclass.h:108
Definition: array.h:71
Definition: pix.h:139
Definition: pix.h:456
Definition: pix.h:467
Definition: pix.h:517
Definition: array.h:127