1 | // similarity = e.g. 0.99f |
2 | static FoundImg rgbRawImageSearch_searchHereFirst(RGBImage big, RGBImage pat, float similarity, Pt searchHereFirst) { |
3 | int wp = pat.getWidth(), hp = pat.getHeight(); |
4 | int w = big.getWidth(), h = big.getHeight(); |
5 | float maxError = (1f-similarity)*wp*hp; |
6 | if (searchHereFirst != null) { |
7 | float diff = rgbImageSectionsSimilarity(big, pat, searchHereFirst.x, searchHereFirst.y, maxError); |
8 | if (diff <= maxError) { |
9 | float sim = 1-diff/(wp*hp); |
10 | ret new FoundImg(new Rect(searchHereFirst.x, searchHereFirst.y, wp, hp), sim); |
11 | } |
12 | } |
13 | |
14 | ret first(rgbRawImageSearch_quick(big, pat, similarity, 1)); |
15 | } |
Began life as a copy of #1006802
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: | #1006913 |
Snippet name: | rgbRawImageSearch_searchHereFirst |
Eternal ID of this version: | #1006913/3 |
Text MD5: | 2c77fc3bf84a5eafdf52a4c38cb0ac23 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-15 05:57:03 |
Source code size: | 657 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 529 / 505 |
Version history: | 2 change(s) |
Referenced in: | [show references] |