Leptonica
1.82.0
Image processing and image analysis suite
recog.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_RECOG_H
28
#define LEPTONICA_RECOG_H
29
114
#define RECOG_VERSION_NUMBER 2
115
116
struct
L_Recog
{
117
l_int32
scalew
;
119
l_int32
scaleh
;
121
l_int32
linew
;
123
l_int32
templ_use
;
126
l_int32
maxarraysize
;
127
l_int32
setsize
;
128
l_int32
threshold
;
129
l_int32
maxyshift
;
131
l_int32
charset_type
;
132
l_int32
charset_size
;
133
l_int32
min_nopad
;
134
l_int32
num_samples
;
135
l_int32
minwidth_u
;
136
l_int32
maxwidth_u
;
137
l_int32
minheight_u
;
138
l_int32
maxheight_u
;
139
l_int32
minwidth
;
140
l_int32
maxwidth
;
141
l_int32
ave_done
;
142
l_int32
train_done
;
144
l_float32
max_wh_ratio
;
145
l_float32
max_ht_ratio
;
146
l_int32
min_splitw
;
147
l_int32
max_splith
;
148
struct
Sarray
*
sa_text
;
149
struct
L_Dna
*
dna_tochar
;
150
l_int32 *
centtab
;
151
l_int32 *
sumtab
;
152
struct
Pixaa
*
pixaa_u
;
153
struct
Ptaa
*
ptaa_u
;
154
struct
Numaa
*
naasum_u
;
155
struct
Pixaa
*
pixaa
;
156
struct
Ptaa
*
ptaa
;
157
struct
Numaa
*
naasum
;
158
struct
Pixa
*
pixa_u
;
159
struct
Pta
*
pta_u
;
160
struct
Numa
*
nasum_u
;
161
struct
Pixa
*
pixa
;
162
struct
Pta
*
pta
;
163
struct
Numa
*
nasum
;
164
struct
Pixa
*
pixa_tr
;
165
struct
Pixa
*
pixadb_ave
;
166
struct
Pixa
*
pixa_id
;
167
struct
Pix
*
pixdb_ave
;
168
struct
Pix
*
pixdb_range
;
169
struct
Pixa
*
pixadb_boot
;
170
struct
Pixa
*
pixadb_split
;
171
struct
L_Bmf
*
bmf
;
172
l_int32
bmf_size
;
173
struct
L_Rdid
*
did
;
174
struct
L_Rch
*
rch
;
175
struct
L_Rcha
*
rcha
;
176
};
177
typedef
struct
L_Recog
L_RECOG
;
178
182
struct
L_Rch
{
183
l_int32
index
;
184
l_float32
score
;
185
char
*
text
;
186
l_int32
sample
;
188
l_int32
xloc
;
189
l_int32
yloc
;
190
l_int32
width
;
191
};
192
typedef
struct
L_Rch
L_RCH
;
193
197
struct
L_Rcha
{
198
struct
Numa
*
naindex
;
199
struct
Numa
*
nascore
;
200
struct
Sarray
*
satext
;
201
struct
Numa
*
nasample
;
202
struct
Numa
*
naxloc
;
203
struct
Numa
*
nayloc
;
204
struct
Numa
*
nawidth
;
205
};
206
typedef
struct
L_Rcha
L_RCHA
;
207
211
struct
L_Rdid
{
212
struct
Pix
*
pixs
;
213
l_int32 **
counta
;
214
l_int32 **
delya
;
215
l_int32
narray
;
216
l_int32
size
;
217
l_int32 *
setwidth
;
218
struct
Numa
*
nasum
;
219
struct
Numa
*
namoment
;
220
l_int32
fullarrays
;
221
l_float32 *
beta
;
222
l_float32 *
gamma
;
223
l_float32 *
trellisscore
;
224
l_int32 *
trellistempl
;
225
struct
Numa
*
natempl
;
226
struct
Numa
*
naxloc
;
227
struct
Numa
*
nadely
;
228
struct
Numa
*
nawidth
;
229
struct
Boxa
*
boxa
;
230
struct
Numa
*
nascore
;
231
struct
Numa
*
natempl_r
;
232
struct
Numa
*
nasample_r
;
233
struct
Numa
*
naxloc_r
;
234
struct
Numa
*
nadely_r
;
235
struct
Numa
*
nawidth_r
;
236
struct
Numa
*
nascore_r
;
237
};
238
typedef
struct
L_Rdid
L_RDID
;
239
240
241
/*-------------------------------------------------------------------------*
242
* Flags for describing limited character sets *
243
*-------------------------------------------------------------------------*/
245
enum
{
246
L_UNKNOWN
= 0,
247
L_ARABIC_NUMERALS
= 1,
248
L_LC_ROMAN_NUMERALS
= 2,
249
L_UC_ROMAN_NUMERALS
= 3,
250
L_LC_ALPHA
= 4,
251
L_UC_ALPHA
= 5
252
};
253
254
/*-------------------------------------------------------------------------*
255
* Flags for selecting between using average and all templates: *
256
* recog->templ_use *
257
*-------------------------------------------------------------------------*/
259
enum
{
260
L_USE_ALL_TEMPLATES
= 0,
261
L_USE_AVERAGE_TEMPLATES
= 1
262
};
263
264
#endif
/* LEPTONICA_RECOG_H */
L_USE_AVERAGE_TEMPLATES
@ L_USE_AVERAGE_TEMPLATES
Definition:
recog.h:261
L_USE_ALL_TEMPLATES
@ L_USE_ALL_TEMPLATES
Definition:
recog.h:260
L_LC_ALPHA
@ L_LC_ALPHA
Definition:
recog.h:250
L_ARABIC_NUMERALS
@ L_ARABIC_NUMERALS
Definition:
recog.h:247
L_UC_ALPHA
@ L_UC_ALPHA
Definition:
recog.h:251
L_LC_ROMAN_NUMERALS
@ L_LC_ROMAN_NUMERALS
Definition:
recog.h:248
L_UNKNOWN
@ L_UNKNOWN
Definition:
recog.h:246
L_UC_ROMAN_NUMERALS
@ L_UC_ROMAN_NUMERALS
Definition:
recog.h:249
Boxa
Definition:
pix.h:492
L_Bmf
Definition:
bmf.h:47
L_Dna
Definition:
array.h:95
L_Rch
Definition:
recog.h:182
L_Rch::sample
l_int32 sample
Definition:
recog.h:186
L_Rch::yloc
l_int32 yloc
Definition:
recog.h:189
L_Rch::score
l_float32 score
Definition:
recog.h:184
L_Rch::text
char * text
Definition:
recog.h:185
L_Rch::index
l_int32 index
Definition:
recog.h:183
L_Rch::xloc
l_int32 xloc
Definition:
recog.h:188
L_Rch::width
l_int32 width
Definition:
recog.h:190
L_Rcha
Definition:
recog.h:197
L_Rcha::nasample
struct Numa * nasample
Definition:
recog.h:201
L_Rcha::satext
struct Sarray * satext
Definition:
recog.h:200
L_Rcha::nascore
struct Numa * nascore
Definition:
recog.h:199
L_Rcha::nawidth
struct Numa * nawidth
Definition:
recog.h:204
L_Rcha::naxloc
struct Numa * naxloc
Definition:
recog.h:202
L_Rcha::naindex
struct Numa * naindex
Definition:
recog.h:198
L_Rcha::nayloc
struct Numa * nayloc
Definition:
recog.h:203
L_Rdid
Definition:
recog.h:211
L_Rdid::naxloc
struct Numa * naxloc
Definition:
recog.h:226
L_Rdid::naxloc_r
struct Numa * naxloc_r
Definition:
recog.h:233
L_Rdid::nawidth
struct Numa * nawidth
Definition:
recog.h:228
L_Rdid::natempl_r
struct Numa * natempl_r
Definition:
recog.h:231
L_Rdid::setwidth
l_int32 * setwidth
Definition:
recog.h:217
L_Rdid::namoment
struct Numa * namoment
Definition:
recog.h:219
L_Rdid::nawidth_r
struct Numa * nawidth_r
Definition:
recog.h:235
L_Rdid::narray
l_int32 narray
Definition:
recog.h:215
L_Rdid::trellisscore
l_float32 * trellisscore
Definition:
recog.h:223
L_Rdid::size
l_int32 size
Definition:
recog.h:216
L_Rdid::natempl
struct Numa * natempl
Definition:
recog.h:225
L_Rdid::trellistempl
l_int32 * trellistempl
Definition:
recog.h:224
L_Rdid::nasum
struct Numa * nasum
Definition:
recog.h:218
L_Rdid::boxa
struct Boxa * boxa
Definition:
recog.h:229
L_Rdid::fullarrays
l_int32 fullarrays
Definition:
recog.h:220
L_Rdid::counta
l_int32 ** counta
Definition:
recog.h:213
L_Rdid::nadely_r
struct Numa * nadely_r
Definition:
recog.h:234
L_Rdid::nascore_r
struct Numa * nascore_r
Definition:
recog.h:236
L_Rdid::nasample_r
struct Numa * nasample_r
Definition:
recog.h:232
L_Rdid::gamma
l_float32 * gamma
Definition:
recog.h:222
L_Rdid::nascore
struct Numa * nascore
Definition:
recog.h:230
L_Rdid::delya
l_int32 ** delya
Definition:
recog.h:214
L_Rdid::pixs
struct Pix * pixs
Definition:
recog.h:212
L_Rdid::nadely
struct Numa * nadely
Definition:
recog.h:227
L_Rdid::beta
l_float32 * beta
Definition:
recog.h:221
L_Recog
Definition:
recog.h:116
L_Recog::charset_size
l_int32 charset_size
Definition:
recog.h:132
L_Recog::nasum
struct Numa * nasum
Definition:
recog.h:163
L_Recog::dna_tochar
struct L_Dna * dna_tochar
Definition:
recog.h:149
L_Recog::ave_done
l_int32 ave_done
Definition:
recog.h:141
L_Recog::templ_use
l_int32 templ_use
Definition:
recog.h:123
L_Recog::maxwidth
l_int32 maxwidth
Definition:
recog.h:140
L_Recog::num_samples
l_int32 num_samples
Definition:
recog.h:134
L_Recog::centtab
l_int32 * centtab
Definition:
recog.h:150
L_Recog::min_nopad
l_int32 min_nopad
Definition:
recog.h:133
L_Recog::rch
struct L_Rch * rch
Definition:
recog.h:174
L_Recog::pixa_u
struct Pixa * pixa_u
Definition:
recog.h:158
L_Recog::train_done
l_int32 train_done
Definition:
recog.h:142
L_Recog::maxwidth_u
l_int32 maxwidth_u
Definition:
recog.h:136
L_Recog::pta_u
struct Pta * pta_u
Definition:
recog.h:159
L_Recog::ptaa_u
struct Ptaa * ptaa_u
Definition:
recog.h:153
L_Recog::maxyshift
l_int32 maxyshift
Definition:
recog.h:129
L_Recog::linew
l_int32 linew
Definition:
recog.h:121
L_Recog::naasum_u
struct Numaa * naasum_u
Definition:
recog.h:154
L_Recog::scalew
l_int32 scalew
Definition:
recog.h:117
L_Recog::ptaa
struct Ptaa * ptaa
Definition:
recog.h:156
L_Recog::maxheight_u
l_int32 maxheight_u
Definition:
recog.h:138
L_Recog::min_splitw
l_int32 min_splitw
Definition:
recog.h:146
L_Recog::max_ht_ratio
l_float32 max_ht_ratio
Definition:
recog.h:145
L_Recog::bmf_size
l_int32 bmf_size
Definition:
recog.h:172
L_Recog::pixadb_ave
struct Pixa * pixadb_ave
Definition:
recog.h:165
L_Recog::minwidth
l_int32 minwidth
Definition:
recog.h:139
L_Recog::minheight_u
l_int32 minheight_u
Definition:
recog.h:137
L_Recog::pixa_tr
struct Pixa * pixa_tr
Definition:
recog.h:164
L_Recog::threshold
l_int32 threshold
Definition:
recog.h:128
L_Recog::nasum_u
struct Numa * nasum_u
Definition:
recog.h:160
L_Recog::rcha
struct L_Rcha * rcha
Definition:
recog.h:175
L_Recog::pixa_id
struct Pixa * pixa_id
Definition:
recog.h:166
L_Recog::scaleh
l_int32 scaleh
Definition:
recog.h:119
L_Recog::max_splith
l_int32 max_splith
Definition:
recog.h:147
L_Recog::pixdb_range
struct Pix * pixdb_range
Definition:
recog.h:168
L_Recog::sumtab
l_int32 * sumtab
Definition:
recog.h:151
L_Recog::pixdb_ave
struct Pix * pixdb_ave
Definition:
recog.h:167
L_Recog::pixadb_split
struct Pixa * pixadb_split
Definition:
recog.h:170
L_Recog::pta
struct Pta * pta
Definition:
recog.h:162
L_Recog::minwidth_u
l_int32 minwidth_u
Definition:
recog.h:135
L_Recog::charset_type
l_int32 charset_type
Definition:
recog.h:131
L_Recog::naasum
struct Numaa * naasum
Definition:
recog.h:157
L_Recog::max_wh_ratio
l_float32 max_wh_ratio
Definition:
recog.h:144
L_Recog::pixaa_u
struct Pixaa * pixaa_u
Definition:
recog.h:152
L_Recog::setsize
l_int32 setsize
Definition:
recog.h:127
L_Recog::sa_text
struct Sarray * sa_text
Definition:
recog.h:148
L_Recog::bmf
struct L_Bmf * bmf
Definition:
recog.h:171
L_Recog::pixadb_boot
struct Pixa * pixadb_boot
Definition:
recog.h:169
L_Recog::did
struct L_Rdid * did
Definition:
recog.h:173
L_Recog::pixaa
struct Pixaa * pixaa
Definition:
recog.h:155
L_Recog::pixa
struct Pixa * pixa
Definition:
recog.h:161
L_Recog::maxarraysize
l_int32 maxarraysize
Definition:
recog.h:126
Numa
Definition:
array.h:71
Numaa
Definition:
array.h:83
Pix
Definition:
pix.h:139
Pixa
Definition:
pix.h:456
Pixaa
Definition:
pix.h:467
Pta
Definition:
pix.h:517
Ptaa
Definition:
pix.h:531
Sarray
Definition:
array.h:127
src
recog.h
Generated by
1.9.1