crop = otherresults["#324"] if crop == nil then error("need output of #324, please recalc") end local _, _, x1, y1, x2, y2 = string.find(crop, "(%d+),%s*(%d+),%s*(%d+),%s*(%d+)") if x1 == nil then error("output of #324 malformed") end print("x1", x1, "y1", y1, "x2", x2, "y2", y2) -- crop the image local orig = img img = { width = x2-x1, height = y2-y1, getInt = function(x, y) return orig.getInt(x+x1, y+y1) 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
2 comment(s) hidden. show
Recognizer | Recognition Result | Visualize | Recalc |
---|---|---|---|
#308 | javax.imageio.IIOException: Can't get input stream from URL! | [visualize] |
Snippet ID: | #325 |
Snippet name: | Standard crop include |
Eternal ID of this version: | #325/1 |
Text MD5: | 40cef2243264037ad2956092fa6077c6 |
Author: | stefan |
Category: | |
Type: | Lua code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-01-23 01:23:00 |
Source code size: | 446 bytes / 17 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 1286 / 188 |
Referenced in: | [show references] |