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
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: | 1424 / 213 |
Referenced in: | #529 - Extraction task solver (on example task: #2000060) #1000225 - Calculated image #1000227 - Calculated image #2000064 - An image generation expression for #2000060 #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |