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

7
LINES

< > BotCompany Repo | #1019209 // video_scoreRect_x - only look at x coordinate

JavaX fragment (include)

svoid video_scoreRect_x(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(average(
    abs(rectCenterX(guessed)-rectCenterX(expected)),
    abs(guessed.w-expected.w))/tolerance);
}

Author comment

Began life as a copy of #1018799

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: #1019209
Snippet name: video_scoreRect_x - only look at x coordinate
Eternal ID of this version: #1019209/3
Text MD5: 3df1f5c8699b51b5dbba805eb4448f3c
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-27 21:23:06
Source code size: 351 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 390 / 399
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1019530 - video_scoreRect - look at both coordinates. TODO: call video_scoreRect_score