2 * ocr.c forms a mostly-self-contained bit
3 * so we put its declarations in this separate file
10 // #define DEBUG_RECTANGLES
26 #include <sys/types.h>
35 typedef uint32_t Pixcol;
36 #define PSPIXCOL(priscan) priscan##32
39 const char *s; /* valid until next call to ocr() */
40 int l,r; /* column numbers */
41 unsigned ctxmap; /* match context index */
45 typedef const struct OcrCellTypeInfo *OcrCellType;
46 extern const struct OcrCellTypeInfo ocr_celltype_text;
47 extern const struct OcrCellTypeInfo ocr_celltype_number;
50 typedef struct OcrReader OcrReader;
51 OcrReader *ocr_init(int h);
53 OcrResultGlyph *ocr(OcrReader *rd, OcrCellType, int w, Pixcol cols[]);
54 /* return value is array terminated by {0,-1,-1}
55 * array is valid until next call to ocr()
59 /*----- debugging arrangements, rather contingent -----*/
61 void debug_flush(void);
63 #define eassert assert
66 const char *get_vardir(void);