#define START_MAIN {200,200}
#define MIN_COLUMNS 6
#define INTERESTING_COLUMNS 6
+#define TEXT_COLUMNS 2
#define MAX_COLUMNS 7
static Rect mainr = { START_MAIN,START_MAIN };
debug_flush();
}
-static void ocr_rectangle(Rect r) {
+static void ocr_rectangle(Rect r, const OcrCellType ct) {
OcrResultGlyph *results, *res;
int w= r.br.x - r.tl.x + 1;
}
cols[w]= 0;
- results= ocr(rd,w,cols);
+ results= ocr(rd,ct,w,cols);
printf("YES! \"");
for (res=results; res->s; res++)
printf("%s",res->s);
for (colno=0; colno<MIN_COLUMNS; colno++) {
find_table_entry(thisr,colno,&entryr);
- ocr_rectangle(entryr);
+ ocr_rectangle(entryr,
+ colno<TEXT_COLUMNS
+ ? &ocr_celltype_text
+ : &ocr_celltype_number);
}
}
return 0;