X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=pctb%2Focr.h;h=d08ae15ba8b0878a990b0a135e39fbf84cdbb0e9;hp=26bccbc7b83b81bb693b27995063ed7cedbecc1d;hb=8787ee59f6840de63bac432b516a30d0dfe22c84;hpb=24222363faec9b4e3d7074af2df5f39933613c7f diff --git a/pctb/ocr.h b/pctb/ocr.h index 26bccbc..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,16 +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*/