1 | static Pair<RGBImage, Float> rgbMostSimilarImage(RGBImage pat, Iterable<RGBImage> images, float similarity) {
|
2 | new Best<RGBImage> best; |
3 | for (RGBImage img : unnull(images)) {
|
4 | float sim = rgbImageSimilarity(pat, img, similarity); |
5 | if (best.put(img, sim)) |
6 | similarity = sim; |
7 | } |
8 | ret pair(best!, (float) best.score()); |
9 | } |
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: | 539 / 585 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |