1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-22 01:02:17 -05:00

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
This commit is contained in:
Wizzup? 2009-12-17 14:57:53 +00:00
parent 1c025af420
commit 0194a1b55c
2 changed files with 18 additions and 18 deletions

View File

@ -35,10 +35,10 @@
<Filename Value="project1.lpr"/> <Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="project1"/> <UnitName Value="project1"/>
<CursorPos X="34" Y="143"/> <CursorPos X="102" Y="109"/>
<TopLine Value="118"/> <TopLine Value="82"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="96"/> <UsageCount Value="98"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
@ -54,7 +54,7 @@
<CursorPos X="28" Y="50"/> <CursorPos X="28" Y="50"/>
<TopLine Value="30"/> <TopLine Value="30"/>
<EditorIndex Value="9"/> <EditorIndex Value="9"/>
<UsageCount Value="42"/> <UsageCount Value="43"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
@ -70,7 +70,7 @@
<CursorPos X="55" Y="251"/> <CursorPos X="55" Y="251"/>
<TopLine Value="236"/> <TopLine Value="236"/>
<EditorIndex Value="12"/> <EditorIndex Value="12"/>
<UsageCount Value="41"/> <UsageCount Value="42"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
@ -79,7 +79,7 @@
<CursorPos X="18" Y="346"/> <CursorPos X="18" Y="346"/>
<TopLine Value="307"/> <TopLine Value="307"/>
<EditorIndex Value="4"/> <EditorIndex Value="4"/>
<UsageCount Value="22"/> <UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
@ -88,7 +88,7 @@
<CursorPos X="1" Y="1728"/> <CursorPos X="1" Y="1728"/>
<TopLine Value="1701"/> <TopLine Value="1701"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<UsageCount Value="45"/> <UsageCount Value="46"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
@ -97,7 +97,7 @@
<CursorPos X="72" Y="47"/> <CursorPos X="72" Y="47"/>
<TopLine Value="36"/> <TopLine Value="36"/>
<EditorIndex Value="8"/> <EditorIndex Value="8"/>
<UsageCount Value="41"/> <UsageCount Value="42"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
@ -106,7 +106,7 @@
<CursorPos X="98" Y="92"/> <CursorPos X="98" Y="92"/>
<TopLine Value="76"/> <TopLine Value="76"/>
<EditorIndex Value="13"/> <EditorIndex Value="13"/>
<UsageCount Value="43"/> <UsageCount Value="44"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
@ -115,7 +115,7 @@
<CursorPos X="69" Y="116"/> <CursorPos X="69" Y="116"/>
<TopLine Value="84"/> <TopLine Value="84"/>
<EditorIndex Value="10"/> <EditorIndex Value="10"/>
<UsageCount Value="42"/> <UsageCount Value="43"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
@ -144,7 +144,7 @@
<CursorPos X="34" Y="768"/> <CursorPos X="34" Y="768"/>
<TopLine Value="749"/> <TopLine Value="749"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="40"/> <UsageCount Value="41"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
@ -179,7 +179,7 @@
<CursorPos X="20" Y="5"/> <CursorPos X="20" Y="5"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="11"/> <EditorIndex Value="11"/>
<UsageCount Value="38"/> <UsageCount Value="39"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
@ -188,7 +188,7 @@
<CursorPos X="92" Y="287"/> <CursorPos X="92" Y="287"/>
<TopLine Value="99"/> <TopLine Value="99"/>
<EditorIndex Value="6"/> <EditorIndex Value="6"/>
<UsageCount Value="38"/> <UsageCount Value="39"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit19> </Unit19>
<Unit20> <Unit20>
@ -197,7 +197,7 @@
<CursorPos X="43" Y="218"/> <CursorPos X="43" Y="218"/>
<TopLine Value="49"/> <TopLine Value="49"/>
<EditorIndex Value="5"/> <EditorIndex Value="5"/>
<UsageCount Value="34"/> <UsageCount Value="35"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
@ -206,7 +206,7 @@
<CursorPos X="43" Y="287"/> <CursorPos X="43" Y="287"/>
<TopLine Value="274"/> <TopLine Value="274"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="14"/> <UsageCount Value="15"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit21> </Unit21>
<Unit22> <Unit22>
@ -215,7 +215,7 @@
<CursorPos X="22" Y="470"/> <CursorPos X="22" Y="470"/>
<TopLine Value="445"/> <TopLine Value="445"/>
<EditorIndex Value="7"/> <EditorIndex Value="7"/>
<UsageCount Value="22"/> <UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit22> </Unit22>
<Unit23> <Unit23>

View File

@ -91,7 +91,7 @@ begin
bmprs := TMufasaBitmap.Create; 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 := TClient.Create;
C.MWindow.SetTarget(bmprs); C.MWindow.SetTarget(bmprs);
C.MWindow.GetDimensions(w, h); C.MWindow.GetDimensions(w, h);
@ -106,7 +106,7 @@ begin
begin begin
colortorgb(bmp.fastgetpixel(x,y),r,g,b); colortorgb(bmp.fastgetpixel(x,y),r,g,b);
// the abs(g-b) < 15 seems to help heaps when taking out crap points // 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 begin
bmp.fastsetpixel(x,y,clwhite); bmp.fastsetpixel(x,y,clwhite);
continue; continue;