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

8
LINES

< > BotCompany Repo | #1019530 // video_scoreRect - look at both coordinates. TODO: call video_scoreRect_score

JavaX fragment (include)

svoid video_scoreRect(Scorer scorer, Rect expected, Rect guessed, double tolerance) {
  if ((guessed == null) != (expected == null)) ret with scorer.addError();
  if (expected == null) ret with scorer.addOK();
  scorer.addZeroToOneError(doubleAverage(
    ptDistance(rectCenter(guessed), rectCenter(expected)),
    abs(guessed.w-expected.w),
    abs(guessed.h-expected.h))/tolerance);
}

Author comment

Began life as a copy of #1019209

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019530
Snippet name: video_scoreRect - look at both coordinates. TODO: call video_scoreRect_score
Eternal ID of this version: #1019530/4
Text MD5: 8200ef80906ad1f7555a55c4e5eb2545
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-05 19:34:22
Source code size: 393 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 261 / 304
Version history: 3 change(s)
Referenced in: [show references]