From cc74811fe7dc57e312ab53c9527078e9518dc7d1 Mon Sep 17 00:00:00 2001 From: Wizzup? Date: Wed, 27 Jan 2010 00:37:48 +0000 Subject: [PATCH] OCRData -> max_width, max_height. git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@485 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- trunk/Units/MMLCore/ocr.pas | 3 ++- trunk/Units/MMLCore/ocrutil.pas | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/trunk/Units/MMLCore/ocr.pas b/trunk/Units/MMLCore/ocr.pas index b665f6c..f887db6 100644 --- a/trunk/Units/MMLCore/ocr.pas +++ b/trunk/Units/MMLCore/ocr.pas @@ -712,8 +712,9 @@ var begin fD := Fonts.GetFont(font); + writeln(format('W, H: %d, %d', [fD.max_width, fd.max_height])); SetLength(TPA, 0); - TClient(Client).MFinder.FindColorsTolerance(TPA, color, atX, atY, {fuck}0, {fuck}0, tol); + //TClient(Client).MFinder.FindColorsTolerance(TPA, color, atX, atY, {fuck}0, {fuck}0, tol); end; diff --git a/trunk/Units/MMLCore/ocrutil.pas b/trunk/Units/MMLCore/ocrutil.pas index a568e6c..2031ce8 100644 --- a/trunk/Units/MMLCore/ocrutil.pas +++ b/trunk/Units/MMLCore/ocrutil.pas @@ -28,7 +28,7 @@ type neg: array of array of integer; neg_adj: array of real; map: array of char; - width,height: integer; + width,height, max_width, max_height: integer; inputs,outputs: integer; end; @@ -209,6 +209,8 @@ begin len:= Length(masks); result.width:= w; result.height:= h; + result.max_width:=0; + result.max_height:=0; size:= w * h; SetLength(result.pos,len,size); SetLength(result.pos_adj,len); @@ -247,6 +249,8 @@ begin result.ascii[ord(ascii)].yoff:= masks[i].t; result.ascii[ord(ascii)].width:= masks[i].width; result.ascii[ord(ascii)].height:= masks[i].height; + result.max_width := max(result.max_width, masks[i].width); + result.max_height := max(result.max_height, masks[i].height); end; result.inputs:= size; result.outputs:= len;