mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-24 10:12:20 -05:00
9b3694f105
Touches pretty much all the functions in finder.pas, so I expect a lot of functions to break. Tests will have to be written and results will have to be compared with Simba 0.97. Still, I think it's ready for merging to simba-next. Squashed commit of the following: commitef3bfa6410
Merge:d1e3645
5b3e2a8
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Aug 4 00:44:01 2011 +0200 Merge branch 'simba-next' into cts-rework commit5b3e2a864b
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Aug 4 00:41:00 2011 +0200 Merge new CTS/Finder system. Touches pretty much all the functions in finder.pas, so I expect a lot of functions to break. Tests will have to be written and results will have to be compared with Simba 0.97. Still, I think it's ready for merging to simba-next. Squashed commit of the following: commitd1e3645ee5
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 19:08:23 2011 +0200 MML/Finder: Fix all compiler hints + bug. commitf159f20bc2
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 19:05:03 2011 +0200 MML/Finder: Fix FindDTMsRotated. commit1fc33752e4
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 19:04:16 2011 +0200 MML/Finder: FindDTMsRotated rework. commita621a6e8da
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 18:13:36 2011 +0200 MML/Finder: FindDTMs rework done. commit0b592eef86
Merge:56e01c6
aaafd6b
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 16:48:09 2011 +0200 Merge branch 'master' into cts-rework Conflicts: Units/MMLCore/finder.pas commit56e01c67fa
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 16:16:19 2011 +0200 MML/Finder: CTS: Bitmap+Color functions done. Only DTM to go. commit464b90d42b
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 13:58:49 2011 +0200 MMLCore/finder: Small cleanup. commit2414f60c08
Merge:55b0435
a20a31a
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 31 18:12:41 2011 +0200 Merge branch 'master' into cts-rework commit55b0435a4e
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 20:27:54 2011 +0200 Tests: Update BmpBench. commit013daccf07
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 20:09:31 2011 +0200 MML/Core: Cleanup. commit6f32e21291
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 20:08:17 2011 +0200 MML/Core: FindBitmapToleranceIn seems to work. commit3b939443e8
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 19:10:10 2011 +0200 MML/Core: FindBitmapToleranceIn is nearly finished. Speed is nice, results are not accurate yet. I probably missed something when pre-loading the data. commit0422f0eb5a
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 15:53:48 2011 +0200 MML/Core: Fixes for FindBitmapToleranceIn. commit65f4ae16ed
Merge:daff307
353d1f3
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 14:32:46 2011 +0200 Merge branch 'master' into cts-rework commitdaff307f3d
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 13:46:10 2011 +0200 Tests: Add BmpBench. commitcdb89a1802
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 13:12:21 2011 +0200 MMLCore: FindBitmapToleranceIn cts rewrite. commitd0bd81c2e9
Merge:3282636
da0de6e
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 00:15:50 2011 +0200 Merge branch 'master' into cts-rework commit3282636178
Merge:7c86003
a8cdf77
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jul 25 16:50:43 2011 +0200 Merge branch 'master' into cts-rework commit7c8600311c
Merge:153025f
e0767cb
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 24 00:14:53 2011 +0200 Merge branch 'master' into cts-rework Conflicts: Doc/sphinx/conf.py Doc/sphinx/libmml/intro.rst commit153025f080
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 17 19:51:16 2011 +0200 libMML: Changed the indentation. commit8abd502580
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 17 19:37:33 2011 +0200 Documentation: Bump version to 820. commit031654b3d1
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 17 19:36:21 2011 +0200 Documentation: Initial libMML documentation. commitf91c9ffb0e
Merge:f5c9690
989d077
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jul 7 12:00:58 2011 +0200 Merge branch 'master' into cts-rework commitf5c9690bee
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jul 7 11:59:15 2011 +0200 Finder: More rework and cleanups. commit79021409d0
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 21:34:03 2011 +0200 Finder: CTS 2 fix. commitcda571dcb0
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 21:06:17 2011 +0200 Finder: Remote tolerance param. Cleanups. commit733a8cbf32
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 20:39:44 2011 +0200 Finder: More fixes. :-) commite6b005b61f
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 18:34:49 2011 +0200 Finder: CTS-rework fixes. commit6f896b56a2
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 18:15:33 2011 +0200 Finder: Start CTS rework. commita630399148
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 13:01:22 2011 +0200 Small TODO update. commit0e6bf83a5c
Merge:f19fd6b
f2873b1
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 12:59:09 2011 +0200 Merge branch 'master' into cts-rework commitf19fd6bf8d
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 3 20:42:14 2011 +0200 Simba/Doc: Add Raymond to doc. commit451ab89db3
Merge:37183f5
35026bc
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 2 14:48:43 2011 +0200 Merge branch 'master' into cts-rework commit37183f5fd0
Merge:cca7b05
6873e72
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Tue Jun 28 22:10:02 2011 +0200 Merge branch 'master' into cts-rework commitcca7b05213
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 17:03:14 2011 +0200 Add CTS 3 to FindColorsTolerance. Conflicts: Units/MMLCore/finder.pas commitc837d9b960
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 16:33:25 2011 +0200 CTS 3: Fix typo. commit52db461f84
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 6 16:06:17 2011 +0200 CTS 3: Now implement the formula properly. commit7a0db25416
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jun 5 19:44:52 2011 +0200 Add L*a*b CTS (3). commit2e1e786d0e
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 15:11:17 2011 +0200 FindBitmapToleranceIn now works. commit58ea6021cd
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 14:26:20 2011 +0200 CTS work. CTS 2 is still broken for bitmaps. commit91d952d33a
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 12:52:10 2011 +0200 CTS cleanups. commitd9836a251c
Merge:5bf7d8b
bfc3f86
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 20:44:08 2011 +0200 Merge branch 'master' into cts-rework commit5bf7d8beea
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 20:38:00 2011 +0200 Completed first CTS rework. commit7a412d1670
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 20:21:23 2011 +0200 CTS: Cleanups. commit14474a84ab
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 18:16:59 2011 +0200 CTS rework for FindColorsTolerance. commitb87a123701
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 17:44:04 2011 +0200 More cleanups to CTS. commit9415d08100
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 17:41:06 2011 +0200 Finder: Trying a different CTS approach. commitd1e3645ee5
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 19:08:23 2011 +0200 MML/Finder: Fix all compiler hints + bug. commitf159f20bc2
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 19:05:03 2011 +0200 MML/Finder: Fix FindDTMsRotated. commit1fc33752e4
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 19:04:16 2011 +0200 MML/Finder: FindDTMsRotated rework. commita621a6e8da
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 18:13:36 2011 +0200 MML/Finder: FindDTMs rework done. commit0b592eef86
Merge:56e01c6
aaafd6b
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 16:48:09 2011 +0200 Merge branch 'master' into cts-rework Conflicts: Units/MMLCore/finder.pas commit56e01c67fa
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 16:16:19 2011 +0200 MML/Finder: CTS: Bitmap+Color functions done. Only DTM to go. commit464b90d42b
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Aug 1 13:58:49 2011 +0200 MMLCore/finder: Small cleanup. commit2414f60c08
Merge:55b0435
a20a31a
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 31 18:12:41 2011 +0200 Merge branch 'master' into cts-rework commit55b0435a4e
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 20:27:54 2011 +0200 Tests: Update BmpBench. commit013daccf07
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 20:09:31 2011 +0200 MML/Core: Cleanup. commit6f32e21291
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 20:08:17 2011 +0200 MML/Core: FindBitmapToleranceIn seems to work. commit3b939443e8
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 19:10:10 2011 +0200 MML/Core: FindBitmapToleranceIn is nearly finished. Speed is nice, results are not accurate yet. I probably missed something when pre-loading the data. commit0422f0eb5a
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 15:53:48 2011 +0200 MML/Core: Fixes for FindBitmapToleranceIn. commit65f4ae16ed
Merge:daff307
353d1f3
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 14:32:46 2011 +0200 Merge branch 'master' into cts-rework commitdaff307f3d
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 13:46:10 2011 +0200 Tests: Add BmpBench. commitcdb89a1802
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 13:12:21 2011 +0200 MMLCore: FindBitmapToleranceIn cts rewrite. commitd0bd81c2e9
Merge:3282636
da0de6e
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 30 00:15:50 2011 +0200 Merge branch 'master' into cts-rework commit3282636178
Merge:7c86003
a8cdf77
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jul 25 16:50:43 2011 +0200 Merge branch 'master' into cts-rework commit7c8600311c
Merge:153025f
e0767cb
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 24 00:14:53 2011 +0200 Merge branch 'master' into cts-rework Conflicts: Doc/sphinx/conf.py Doc/sphinx/libmml/intro.rst commit153025f080
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 17 19:51:16 2011 +0200 libMML: Changed the indentation. commit8abd502580
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 17 19:37:33 2011 +0200 Documentation: Bump version to 820. commit031654b3d1
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 17 19:36:21 2011 +0200 Documentation: Initial libMML documentation. commitf91c9ffb0e
Merge:f5c9690
989d077
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jul 7 12:00:58 2011 +0200 Merge branch 'master' into cts-rework commitf5c9690bee
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jul 7 11:59:15 2011 +0200 Finder: More rework and cleanups. commit79021409d0
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 21:34:03 2011 +0200 Finder: CTS 2 fix. commitcda571dcb0
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 21:06:17 2011 +0200 Finder: Remote tolerance param. Cleanups. commit733a8cbf32
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 20:39:44 2011 +0200 Finder: More fixes. :-) commite6b005b61f
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 18:34:49 2011 +0200 Finder: CTS-rework fixes. commit6f896b56a2
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 18:15:33 2011 +0200 Finder: Start CTS rework. commita630399148
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 13:01:22 2011 +0200 Small TODO update. commit0e6bf83a5c
Merge:f19fd6b
f2873b1
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Wed Jul 6 12:59:09 2011 +0200 Merge branch 'master' into cts-rework commitf19fd6bf8d
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jul 3 20:42:14 2011 +0200 Simba/Doc: Add Raymond to doc. commit451ab89db3
Merge:37183f5
35026bc
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sat Jul 2 14:48:43 2011 +0200 Merge branch 'master' into cts-rework commit37183f5fd0
Merge:cca7b05
6873e72
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Tue Jun 28 22:10:02 2011 +0200 Merge branch 'master' into cts-rework commitcca7b05213
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 17:03:14 2011 +0200 Add CTS 3 to FindColorsTolerance. Conflicts: Units/MMLCore/finder.pas commitc837d9b960
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 16:33:25 2011 +0200 CTS 3: Fix typo. commit52db461f84
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 6 16:06:17 2011 +0200 CTS 3: Now implement the formula properly. commit7a0db25416
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Sun Jun 5 19:44:52 2011 +0200 Add L*a*b CTS (3). commit2e1e786d0e
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 15:11:17 2011 +0200 FindBitmapToleranceIn now works. commit58ea6021cd
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 14:26:20 2011 +0200 CTS work. CTS 2 is still broken for bitmaps. commit91d952d33a
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Thu Jun 16 12:52:10 2011 +0200 CTS cleanups. commitd9836a251c
Merge:5bf7d8b
bfc3f86
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 20:44:08 2011 +0200 Merge branch 'master' into cts-rework commit5bf7d8beea
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 20:38:00 2011 +0200 Completed first CTS rework. commit7a412d1670
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 20:21:23 2011 +0200 CTS: Cleanups. commit14474a84ab
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 18:16:59 2011 +0200 CTS rework for FindColorsTolerance. commitb87a123701
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 17:44:04 2011 +0200 More cleanups to CTS. commit9415d08100
Author: Merlijn Wajer <merlijn@wizzup.org> Date: Mon Jun 13 17:41:06 2011 +0200 Finder: Trying a different CTS approach.
26 lines
562 B
Plaintext
26 lines
562 B
Plaintext
program new;
|
|
//http://farm4.static.flickr.com/3067/2612399892_7df428d482.jpg
|
|
{Make the above bitmap your target}
|
|
var
|
|
Bmp : integer;
|
|
x,y : integer;
|
|
w,h : integer;
|
|
t, i: integer;
|
|
begin
|
|
Bmp := createBitmap(15, 10);
|
|
FastDrawClear(bmp, clwhite);
|
|
GetClientDimensions(w,h);
|
|
|
|
setcolortolerancespeed(2);
|
|
t:=getsystemtime;
|
|
for i := 0 to 10 do
|
|
FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,500);
|
|
writeln((getsystemtime-t) / 10.0);
|
|
|
|
if FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,500) then
|
|
begin
|
|
writeln('found');
|
|
MoveMouse(x,y);
|
|
end;
|
|
end.
|