Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #366 // Magic Wand All

Lua code

get("#363") -- Magic Wand
get("#349") -- table functions

function recttostring(r)
  return r.x..", "..r.y..", "..r.x+r.width..", "..r.y+r.height
end

allrects = {}

for y = 0, img.height-1, 2 do
  for x = 0, img.width-1, 2 do
    r = magicWand(img, x, y)
    
    if r then
      allrects[recttostring(r)] = true
    end
  end
end

result = table.concat(keystolist(allrects), "|")
return "Magic Wand All: "..result

Author comment

Began life as a copy of #364

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

Comments [hide]

ID Author/Program Comment Date
884 #1000604 (pitcher) 2015-08-18 00:07:22
883 #1000610 Edit suggestion:
!636
!629

main {
static Object androidContext;
static String programID;

public static void main(String[] args) throws Exception {
get("#363") -- Magic Wand
get("#349") -- table functions

function recttostring(r)
return r.x..", "..r.y..", "..r.x+r.width..", "..r.y+r.height
end

allrects = {}

for y = 0, img.height-1, 2 do
for x = 0, img.width-1, 2 do
r = magicWand(img, x, y)

if r then
allrects[recttostring(r)] = true
end
end
end

result = table.concat(keystolist(allrects), "|")
return "Magic Wand All: "..result

}}
2015-08-19 23:12:14  delete 

add comment

Image recognition results

show nils
Image Result Result calculated
#1000063 Magic Wand All: 30, 21, 76, 65|30, 21, 77, 65|30, 21, 76, 67|30, 20, 76, 65|28, 21, 76, 65 2016-08-03 09:16:39
Lua instructions: 39652k

[raw result]
[visualize]
#1000015 Magic Wand All: 90, 6, 95, 14|90, 7, 102, 14|34, 4, 46, 15|90, 7, 95, 15|111, 5, 123, 14|174, 4, 179... 2016-08-02 22:43:57
Lua instructions: 10380k

[raw result]
[visualize]
#1000072 Magic Wand All: 36, 26, 78, 75|36, 26, 79, 75 2016-08-02 16:45:53
Lua instructions: 46224k

[raw result]
[visualize]
#1000010 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:07

[raw result]
[visualize]
#1000003 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#201 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#183 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#182 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#178 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#145 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#141 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#115 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#113 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#112 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#100 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#98 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#93 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#92 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#91 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#90 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#87 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#85 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#84 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#49 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#48 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:46:07

[raw result]
[visualize]
#1000013 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:06

[raw result]
[visualize]
#1000012 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:06

[raw result]
[visualize]
#1000017 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:05

[raw result]
[visualize]
#1000014 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:05

[raw result]
[visualize]
#1000026 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:04

[raw result]
[visualize]
#1000025 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:04

[raw result]
[visualize]
#1000024 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:04

[raw result]
[visualize]
#1000022 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:04

[raw result]
[visualize]
#1000021 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:04

[raw result]
[visualize]
#1000020 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:04

[raw result]
[visualize]
#1000019 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:04

[raw result]
[visualize]
#1000018 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:04

[raw result]
[visualize]
#1000034 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:03

[raw result]
[visualize]
#1000033 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:03

[raw result]
[visualize]
#1000032 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:03

[raw result]
[visualize]
#1000031 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:03

[raw result]
[visualize]
#1000030 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:03

[raw result]
[visualize]
#1000029 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:03

[raw result]
[visualize]
#1000028 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:03

[raw result]
[visualize]
#1000027 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:03

[raw result]
[visualize]
#1000035 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:02

[raw result]
[visualize]
#1000044 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:01

[raw result]
[visualize]
#1000043 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:01

[raw result]
[visualize]
#1000042 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:01

[raw result]
[visualize]
#1000041 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:01

[raw result]
[visualize]
#1000040 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:01

[raw result]
[visualize]
#1000039 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:01

[raw result]
[visualize]
#1000038 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:01

[raw result]
[visualize]
#1000036 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:01

[raw result]
[visualize]
#1000049 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:00

[raw result]
[visualize]
#1000048 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:00

[raw result]
[visualize]
#1000047 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:00

[raw result]
[visualize]
#1000046 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:00

[raw result]
[visualize]
#1000045 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:46:00

[raw result]
[visualize]
#1000088 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000087 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000086 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000085 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000084 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000083 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000082 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000081 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000080 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000079 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000078 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000077 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000076 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000075 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000074 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000073 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000064 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000062 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000061 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000056 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000055 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000054 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000053 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:45:59

[raw result]
[visualize]
#309 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000052 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000051 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000050 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:59

[raw result]
[visualize]
#1000096 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:58

[raw result]
[visualize]
#1000095 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:58

[raw result]
[visualize]
#362 java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operat... 2016-07-31 19:45:58

[raw result]
[visualize]
#1000093 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:58

[raw result]
[visualize]
#1000092 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:58

[raw result]
[visualize]
#1000091 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:58

[raw result]
[visualize]
#1000090 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:58

[raw result]
[visualize]
#1000089 LuaError: #366:2 vm error: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientCon... 2016-07-31 19:45:58

[raw result]
[visualize]

Snippet ID: #366
Snippet name: Magic Wand All
Eternal ID of this version: #366/1
Text MD5: ec65e3122403549e0ff80416d683e715
Author: stefan
Category: image recognition
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-01-31 00:09:14
Source code size: 437 bytes / 21 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 2221 / 186
Referenced in: [show references]