X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Fstructure.c;h=85b8f86537421215d69e2cbf0155a8a98a346389;hb=ca2598d063219f019ba8e04a4762552f556795ca;hp=e9df7334a73f04cf53c4754a0a14f7a21228180f;hpb=5f9478a284c640fde807ee4a1e18cae8438dca52;p=ypp-sc-tools.web-live.git diff --git a/pctb/structure.c b/pctb/structure.c index e9df733..85b8f86 100644 --- a/pctb/structure.c +++ b/pctb/structure.c @@ -255,7 +255,8 @@ static int commod_selector_matches(Rect search, const char *const *all, (search).TLBR.XY += increm; \ } -void find_structure(CanonImage *im, int *max_relevant_y_r) { +void find_structure(CanonImage *im, int *max_relevant_y_r, + Point *commod_focus_point_r) { cim= im; Rect whole = { {0,0}, {cim->w-1,cim->h-1} }; @@ -365,6 +366,12 @@ void find_structure(CanonImage *im, int *max_relevant_y_r) { if (max_relevant_y_r) SET_ONCE(*max_relevant_y_r, mainr.br.y + 10); + if (commod_focus_point_r) { + *commod_focus_point_r= mainr.tl; + commod_focus_point_r->x += 10; + commod_focus_point_r->y += comminty/3; + } + MUST( text_h <= OCR_MAX_H, MI(text_h) ); } @@ -632,7 +639,7 @@ void analyse(FILE *tsv_output) { int page, tryrect, colno; for (page=0; pagergb->w, page_images[0]->rgb->h);