// similarity = e.g. 0.99f static L<FoundImg> rgbRawImageSearch_quick(RGBImage big, RGBImage pat, float similarity, int maxEntries) { new L<FoundImg> found; int wp = pat.getWidth(), hp = pat.getHeight(); int w = big.getWidth(), h = big.getHeight(); float maxError = (1f-similarity)*wp*hp; for (int y = 0; y < h-hp; y++) for (int x = 0; x < w-wp; x++) { float diff = rgbImageSectionsSimilarity(big, pat, x, y, maxError); if (diff <= maxError) { float sim = 1-diff/(wp*hp); Rect r = new Rect(x, y, wp, hp); found.add(new FoundImg(r, sim)); ping(); if (l(found) >= maxEntries) ret found; x += wp-1; } } ret found; }
Began life as a copy of #1005893
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006802 |
Snippet name: | rgbRawImageSearch_quick |
Eternal ID of this version: | #1006802/1 |
Text MD5: | 89392029c0f1eea89fc0560cd3f2bb24 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-05 01:19:43 |
Source code size: | 717 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 549 / 560 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1006804 - rgbSearchPrecise #1006885 - rgbFindMostSimilarClip #1006913 - rgbRawImageSearch_searchHereFirst #1019524 - rgbRawSingleImageSearch_multiplePatterns |