From 0194a1b55cd5da38a04df23ece8c605edc603198 Mon Sep 17 00:00:00 2001 From: Wizzup? Date: Thu, 17 Dec 2009 14:57:53 +0000 Subject: [PATCH] Seems like the abs(r-g) isn't ok if there's a very bright red/green/blue background for the white text. :) (see uptext7.png) git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@283 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- Projects/MufasaTests/project1.lpi | 32 +++++++++++++++---------------- Projects/MufasaTests/project1.lpr | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Projects/MufasaTests/project1.lpi b/Projects/MufasaTests/project1.lpi index ed3117e..8d63b7f 100644 --- a/Projects/MufasaTests/project1.lpi +++ b/Projects/MufasaTests/project1.lpi @@ -35,10 +35,10 @@ - - + + - + @@ -54,7 +54,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -88,7 +88,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -106,7 +106,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -144,7 +144,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -197,7 +197,7 @@ - + @@ -206,7 +206,7 @@ - + @@ -215,7 +215,7 @@ - + diff --git a/Projects/MufasaTests/project1.lpr b/Projects/MufasaTests/project1.lpr index b81d131..1e998f2 100644 --- a/Projects/MufasaTests/project1.lpr +++ b/Projects/MufasaTests/project1.lpr @@ -91,7 +91,7 @@ begin bmprs := TMufasaBitmap.Create; - bmprs.LoadFromFile('/home/merlijn/Programs/mufasa/pics/uptext6.bmp'); + bmprs.LoadFromFile('/home/merlijn/Programs/mufasa/pics/uptext7.png'); C := TClient.Create; C.MWindow.SetTarget(bmprs); C.MWindow.GetDimensions(w, h); @@ -106,7 +106,7 @@ begin begin colortorgb(bmp.fastgetpixel(x,y),r,g,b); // the abs(g-b) < 15 seems to help heaps when taking out crap points - if (r > ocr_Limit_High) and (g > ocr_Limit_High) and (b > ocr_Limit_High) and (abs(g-b) < 15) then + if (r > ocr_Limit_High) and (g > ocr_Limit_High) and (b > ocr_Limit_High){ and (abs(g-b) < 15)} then begin bmp.fastsetpixel(x,y,clwhite); continue;