14 #include <sys/types.h>
17 typedef uint32_t Pixcol;
18 #define PSPIXCOL(priscan) priscan##32
21 const char *s; /* valid until next call to ocr() */
22 int l,r; /* column numbers */
23 unsigned ctxmap; /* match context index */
26 typedef const struct OcrCellTypeInfo *OcrCellType;
27 extern const struct OcrCellTypeInfo ocr_celltype_text;
28 extern const struct OcrCellTypeInfo ocr_celltype_number;
30 typedef struct OcrReader OcrReader;
31 OcrReader *ocr_init(int h);
33 OcrResultGlyph *ocr(OcrReader *rd, OcrCellType, int w, Pixcol cols[]);
34 /* return value is array terminated by {0,-1,-1}
35 * array is valid until next call to ocr()
38 void debug_flush(void);
40 #define eassert assert
43 const char *get_vardir(void);
46 /* #define DEBUG_RECTANGLES */
47 /* #define DEBUG_OCR */