1 | get("#479") -- getcrop2
|
2 | |
3 | function docrop2(img) |
4 | local x1, y1, x2, y2 = getcrop2(img) |
5 | return {
|
6 | width = x2-x1, |
7 | height = y2-y1, |
8 | getInt = function(x, y) |
9 | return img.getInt(x+x1, y+y1) |
10 | end |
11 | } |
12 | end |
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #495 |
| Snippet name: | docrop2 (based on getcrop2) |
| Eternal ID of this version: | #495/1 |
| Text MD5: | 6e5ff6193e22eb6f8d417a7815cea023 |
| Author: | stefan |
| Category: | image recognition |
| Type: | Lua code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-03-08 20:39:05 |
| Source code size: | 226 bytes / 12 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 935 / 212 |
| Referenced in: | [show references] |