Libraryless. Click here for Pure Java version (7138L/42K).
1 | svoid test_ImageSimilarityAtScale_equalImages() { |
2 | var img = randomImage(50, 20); |
3 | var ii = IntegralImage(img); |
4 | ImageSimilarityAtScale algo = new(ii, ii, 4); |
5 | algo.run(); |
6 | int i = 1; |
7 | for (i = 1; i <= 254; i++) { |
8 | assertTrue(str(i), algo.step()); |
9 | assertEquals(0.0, algo.diff()); |
10 | } |
11 | assertFalse(str(i), algo.step()); |
12 | } |
Began life as a copy of #1032164
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032166 |
Snippet name: | test_ImageSimilarityAtScale_equalImages |
Eternal ID of this version: | #1032166/5 |
Text MD5: | 0ee77b2cc4c556694586b3826240132d |
Transpilation MD5: | d47a3d96919189c91bba6da1cb934f55 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-16 22:37:35 |
Source code size: | 345 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 180 / 246 |
Version history: | 4 change(s) |
Referenced in: | [show references] |