Libraryless. Click here for Pure Java version (2175L/15K/49K).
1 | !7 |
2 | |
3 | p {
|
4 | RGBImage a = null, b = rgbShootScreen(); |
5 | repeat {
|
6 | sleep(500); |
7 | time {
|
8 | a = b; |
9 | b = rgbShootScreen(); |
10 | |
11 | print("*");
|
12 | compare(a, b); |
13 | } |
14 | } |
15 | } |
16 | |
17 | svoid compare(RGBImage a, RGBImage b) {
|
18 | new HashSet<Pt> deltas; |
19 | for tries to 10: {
|
20 | Rect r = randomScreenRect(50, 50); |
21 | RGBImage clip = a.clip(r); |
22 | if (rgbInnerPrecision(clip) >= 0.5f) {
|
23 | Rect r2 = rgbSearchPrecise(b, clip); |
24 | if (r2 != null) |
25 | deltas.add(new Pt(r2.x-r.x, r2.y-r.y)); |
26 | } |
27 | } |
28 | print("Deltas: " + deltas);
|
29 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1006798 |
| Snippet name: | Find Possible Motion [prelude] |
| Eternal ID of this version: | #1006798/8 |
| Text MD5: | d5ee50848d8700793e9bdae117088f11 |
| Transpilation MD5: | 48df5f722c9e8de46fbb80ea36e5c71d |
| Author: | stefan |
| Category: | javax / ocr |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-02-05 03:34:32 |
| Source code size: | 571 bytes / 29 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 684 / 816 |
| Version history: | 7 change(s) |
| Referenced in: | [show references] |