Libraryless. Click here for Pure Java version (5485L/36K).
1 | // returns value from 0 to 1 |
2 | static double ii_twoByTwoVariation(IntegralImage ii, DoubleRect r) { |
3 | RGB col = ii_averageColorOfArea(ii, r); |
4 | double sum = 0; |
5 | for (RGB col2 : pairsB(ii_scanGrid(ii, 2, 2))) |
6 | sum += rgbDiff(col, col2); |
7 | ret sum/4; |
8 | } |
9 | |
10 | static double ii_twoByTwoVariation(IntegralImage ii) { |
11 | ret ii_twoByTwoVariation(ii, doubleRect(ii.getWidth(), ii.getHeight())); |
12 | } |
Began life as a copy of #1025258
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025466 |
Snippet name: | ii_twoByTwoVariation - average color distance of 2x2 subcells to whole section |
Eternal ID of this version: | #1025466/4 |
Text MD5: | 83521c77f93d5ac3b65fdf91d64d1599 |
Transpilation MD5: | abbbbf10a9af24f0b364775fee592e4c |
Author: | stefan |
Category: | javax / image recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-29 14:57:03 |
Source code size: | 396 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 216 / 302 |
Version history: | 3 change(s) |
Referenced in: | [show references] |