Skip to content

Commit d081180

Browse files
committed
Update SimpleOCR with failed Test.
1 parent b55ab82 commit d081180

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

tester/images/multiline6.png

56.7 KB
Loading

tester/tester.lpr

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,37 @@ procedure Test_MultiLine5;
194194
Assert(Lines[6] = 'Rewards potential: 0%');
195195
end;
196196

197+
198+
199+
procedure Test_MultiLine6;
200+
const
201+
Filter: TOCRFilter = (
202+
FilterType: EOCRFilterType.COLOR;
203+
AnyColorFilter: ();
204+
ColorRule: (Colors: ((Color: 0; Tolerance: 0), (Color: 0; Tolerance: 0)); Invert: False);
205+
ThresholdRule: ();
206+
ShadowRule: ();
207+
MinCharacterMatch: #0;
208+
);
209+
var
210+
Lines: TStringArray;
211+
begin
212+
Lines := SimpleOCR.RecognizeLines(LoadMatrix('images/multiline6.png'), Filter, FONT_QUILL_8);
213+
214+
Assert(Length(Lines) = 4);
215+
Assert(Lines[0] = 'Al Kharid PvP Arena.');
216+
Assert(Lines[1] = 'Castle Wars Arena.');
217+
Assert(Lines[2] = 'Ferox Enclave.');
218+
Assert(Lines[3] = 'Nowhere.');
219+
end;
220+
221+
222+
223+
224+
225+
226+
227+
197228
procedure Test_UpText1;
198229
const
199230
Filter: TOCRFilter = (
@@ -365,6 +396,7 @@ procedure Test(Proc: TProcedure; Name: String);
365396
Test(@Test_MultiLine3, 'MultiLine3');
366397
Test(@Test_MultiLine4, 'MultiLine4');
367398
Test(@Test_MultiLine5, 'MultiLine5');
399+
Test(@Test_MultiLine6, 'MultiLine6');
368400
Test(@Test_UpText1, 'UpText1');
369401
Test(@Test_UpText2, 'UpText2');
370402
Test(@Test_Shadow, 'Shadow');

0 commit comments

Comments
 (0)