chiark / gitweb /
merge changes made accidentally to wrong copy
[ypp-sc-tools.web-live.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 void debug_flush(void);
30
31 #define eassert assert
32 #define debug stdout
33
34 #endif /*OCR_H*/