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

14
LINES

< > BotCompany Repo | #502 // Triangles vs something else distinguisher (optimized)

Lua code - Image distinction (learner)

1  
get("#501") -- triangleness (optimized)
2  
get("#495") -- docrop2
3  
4  
function calc()
5  
  return triangleness(docrop2(lastimg1)) > triangleness(docrop2(lastimg2))
6  
end
7  
8  
return function()
9  
  if mod == nil and solution then
10  
    mod = calc() == solution
11  
  end
12  
  lastimg1, lastimg2 = img1, img2
13  
  return calc() == mod
14  
end

Author comment

Began life as a copy of #498

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: #502
Snippet name: Triangles vs something else distinguisher (optimized)
Eternal ID of this version: #502/1
Text MD5: 4dc2443e7286ae776bcabc23bef9b506
Author: stefan
Category: image recognition
Type: Lua code - Image distinction (learner)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-03-09 00:13:07
Source code size: 320 bytes / 14 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 479 / 128
Referenced in: [show references]