16 #include <sys/types.h>
27 typedef uint32_t Pixcol;
28 #define PSPIXCOL(priscan) priscan##32
31 const char *s; /* valid until next call to ocr() */
32 int l,r; /* column numbers */
33 unsigned ctxmap; /* match context index */
36 typedef const struct OcrCellTypeInfo *OcrCellType;
37 extern const struct OcrCellTypeInfo ocr_celltype_text;
38 extern const struct OcrCellTypeInfo ocr_celltype_number;
40 typedef struct OcrReader OcrReader;
41 OcrReader *ocr_init(int h);
43 OcrResultGlyph *ocr(OcrReader *rd, OcrCellType, int w, Pixcol cols[]);
44 /* return value is array terminated by {0,-1,-1}
45 * array is valid until next call to ocr()
48 void debug_flush(void);
50 #define eassert assert
53 const char *get_vardir(void);
55 CanonImage *file_read_image(FILE *f);
59 extern CanonImage *page_images[MAX_PAGES];
63 #define DEBUG_RECTANGLES