// ppt = 0.0 to 1.0 static bool rgbImageSectionsIdentical_ppt(RGBImage a, Rect r1, RGBImage b, Rect r2, float ppt) { assertEquals(r1.w, r2.w); assertEquals(r1.h, r2.h); int w = r1.w, h = r1.h; for (int yy = 0; yy < h; yy++) for (int xx = 0; xx < w; xx++) if (rgbDiff(a.getInt(r1.x+xx, r1.y+yy), b.getInt(r2.x+xx, r2.y+yy)) > ppt) false; true; }
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: | 434 / 454 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |