Libraryless. Click here for Pure Java version (5485L/36K).
// returns value from 0 to 1 static double ii_twoByTwoVariation(IntegralImage ii, DoubleRect r) { RGB col = ii_averageColorOfArea(ii, r); double sum = 0; for (RGB col2 : pairsB(ii_scanGrid(ii, 2, 2))) sum += rgbDiff(col, col2); ret sum/4; } static double ii_twoByTwoVariation(IntegralImage ii) { ret ii_twoByTwoVariation(ii, doubleRect(ii.getWidth(), ii.getHeight())); }
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: | 215 / 301 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |