1 | // ppt = 0.0 to 1.0 |
2 | static bool rgbImageSectionsIdentical_ppt(RGBImage a, Rect r1, RGBImage b, Rect r2, float ppt) { |
3 | assertEquals(r1.w, r2.w); |
4 | assertEquals(r1.h, r2.h); |
5 | int w = r1.w, h = r1.h; |
6 | for (int yy = 0; yy < h; yy++) |
7 | for (int xx = 0; xx < w; xx++) |
8 | if (rgbDiff(a.getInt(r1.x+xx, r1.y+yy), b.getInt(r2.x+xx, r2.y+yy)) > ppt) |
9 | false; |
10 | true; |
11 | } |
Began life as a copy of #1006815
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: | #1006853 |
Snippet name: | rgbImageSectionsIdentical_ppt (PPT = per-pixel tolerance) |
Eternal ID of this version: | #1006853/3 |
Text MD5: | f5b78aaeb78b9c7b342fc27026daa99f |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-09 00:52:23 |
Source code size: | 382 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 435 / 455 |
Version history: | 2 change(s) |
Referenced in: | [show references] |