1 | i, j, x1, y1, x2, y2 = string.find(result, "(%d+),%s*(%d+),%s*(%d+),%s*(%d+)") |
2 | |
3 | -- copy part of image |
4 | |
5 | w, h = x2-x1, y2-y1 |
6 | pixels = {}
|
7 | |
8 | for y = 0, h-1 do |
9 | for x = 0, w-1 do |
10 | pixels[y*w+x+1] = img.getInt(x1+x, y1+y) |
11 | end |
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
| ID | Author/Program | Comment | Date | |
|---|---|---|---|---|
| 722 | #1000610 | Edit suggestion: !636 !629 main { static Object androidContext; static String programID; public static void main(String[] args) throws Exception { i, j, x1, y1, x2, y2 = string.find(result, "(%d+),%s*(%d+),%s*(%d+),%s*(%d+)") -- copy part of image w, h = x2-x1, y2-y1 pixels = {} for y = 0, h-1 do for x = 0, w-1 do pixels[y*w+x+1] = img.getInt(x1+x, y1+y) end end }} | 2015-08-19 11:20:15 | delete |
| 720 | #1000604 (pitcher) | 2015-08-18 00:07:22 |
| Recognizer | Recognition Result | Visualize | Recalc |
|---|---|---|---|
| #308 | 237 | [visualize] |
| Snippet ID: | #316 |
| Snippet name: | Actual Crop Executer |
| Eternal ID of this version: | #316/1 |
| Text MD5: | add7c861ff3edf7a7192c19e5b07194b |
| Author: | meetup1 |
| Category: | ir result visualizers |
| Type: | Lua code - Visualizer |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-02-03 21:22:12 |
| Source code size: | 239 bytes / 12 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 1816 / 271 |
| Referenced in: | [show references] |