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)

get("#501") -- triangleness (optimized)
get("#495") -- docrop2

function calc()
  return triangleness(docrop2(lastimg1)) > triangleness(docrop2(lastimg2))
end

return function()
  if mod == nil and solution then
    mod = calc() == solution
  end
  lastimg1, lastimg2 = img1, img2
  return calc() == mod
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: 480 / 129
Referenced in: #3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)