chiark / gitweb /
0824404579f753ca9ba65dd4d224258f188fdb5f
[ypp-sc-tools.main.git] / pctb / ocr.h
1 #ifndef OCR_H
2 #define OCR_H
3
4 #include <pam.h>
5 #include <stdint.h>
6 #include <inttypes.h>
7 #include <assert.h>
8 #include <string.h>
9 #include <stdlib.h>
10 #include <sys/types.h>
11 #include <sys/wait.h>
12
13 typedef uint32_t Pixcol;
14 #define PSPIXCOL(priscan) priscan##32
15
16 typedef struct {
17   const char *s; /* valid until next call to ocr() */
18   int l,r; /* column numbers */
19   int ctx; /* match context index */
20 } OcrResultGlyph;
21
22 OcrResultGlyph *ocr(int w, int h, Pixcol cols[]);
23   /* return value is array terminated by {0,-1,-1}
24    * array is valid until next call to ocr()
25    */
26
27 void ocr_init(void);
28
29 #define eassert assert
30 #define debug stdout
31
32 #endif /*OCR_H*/