14 #include <sys/types.h>
24 typedef uint32_t Pixcol;
25 #define PSPIXCOL(priscan) priscan##32
28 const char *s; /* valid until next call to ocr() */
29 int l,r; /* column numbers */
30 unsigned ctxmap; /* match context index */
33 typedef const struct OcrCellTypeInfo *OcrCellType;
34 extern const struct OcrCellTypeInfo ocr_celltype_text;
35 extern const struct OcrCellTypeInfo ocr_celltype_number;
37 typedef struct OcrReader OcrReader;
38 OcrReader *ocr_init(int h);
40 OcrResultGlyph *ocr(OcrReader *rd, OcrCellType, int w, Pixcol cols[]);
41 /* return value is array terminated by {0,-1,-1}
42 * array is valid until next call to ocr()
45 void debug_flush(void);
47 #define eassert assert
50 const char *get_vardir(void);
52 CanonImage *file_read_image(FILE *f);
56 #define DEBUG_RECTANGLES