X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=pctb%2Focr.h;h=d08ae15ba8b0878a990b0a135e39fbf84cdbb0e9;hp=0824404579f753ca9ba65dd4d224258f188fdb5f;hb=8787ee59f6840de63bac432b516a30d0dfe22c84;hpb=ad09cd7cce6584c63c275d7ed1106e66959b3f9d diff --git a/pctb/ocr.h b/pctb/ocr.h index 0824404..d08ae15 100644 --- a/pctb/ocr.h +++ b/pctb/ocr.h @@ -1,12 +1,15 @@ #ifndef OCR_H #define OCR_H +#define _GNU_SOURCE + #include #include #include #include #include #include +#include #include #include @@ -19,14 +22,23 @@ typedef struct { int ctx; /* match context index */ } OcrResultGlyph; -OcrResultGlyph *ocr(int w, int h, Pixcol cols[]); +typedef const struct OcrGlyphContextDeveloperInfo *OcrCellContext; +extern const struct OcrGlyphContextDeveloperInfo *ocr_celltype_text; +extern const struct OcrGlyphContextDeveloperInfo *ocr_celltype_number; + +typedef struct OcrReader OcrReader; +OcrReader *ocr_init(int h); + +OcrResultGlyph *ocr(OcrReader *rd, int w, Pixcol cols[]); /* return value is array terminated by {0,-1,-1} * array is valid until next call to ocr() */ -void ocr_init(void); +void debug_flush(void); #define eassert assert #define debug stdout +const char *get_vardir(void); + #endif /*OCR_H*/