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

9
LINES

< > BotCompany Repo | #1020129 // rgbMostSimilarImage

JavaX fragment (include)

static Pair<RGBImage, Float> rgbMostSimilarImage(RGBImage pat, Iterable<RGBImage> images, float similarity) {
  new Best<RGBImage> best;
  for (RGBImage img : unnull(images)) {
    float sim = rgbImageSimilarity(pat, img, similarity);
    if (best.put(img, sim))
      similarity = sim;
  }
  ret pair(best!, (float) best.score());
}

Author comment

Began life as a copy of #1006762

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020129
Snippet name: rgbMostSimilarImage
Eternal ID of this version: #1020129/4
Text MD5: 152bb46af6a5717532fb9e1340880a8c
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-08 22:35:01
Source code size: 341 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 306 / 345
Version history: 3 change(s)
Referenced in: [show references]