Libraryless. Click here for Pure Java version (6746L/39K).
1 | meta-for IIntegralImage in IIntegralImage, IntegralImage { |
2 | static double ii_averageBrightnessOfArea(IIntegralImage img, int x1, int y1, int x2, int y2) { |
3 | ret doubleRatio(img.rectSum(x1, y1, x2, y2), (x2-x1)*(y2-y1)*3); |
4 | } |
5 | |
6 | static double ii_averageBrightnessOfArea(IIntegralImage img, int x1, int y1, int x2, int y2, int channel) { |
7 | ret doubleRatio(img.rectSum(x1, y1, x2, y2, channel), (x2-x1)*(y2-y1)); |
8 | } |
9 | |
10 | static double ii_averageBrightnessOfArea(IIntegralImage img, Rect r) { |
11 | ret ii_averageBrightnessOfArea(img, r.x, r.y, r.x2(), r.y2()); |
12 | } |
13 | |
14 | static double ii_averageBrightnessOfArea(IIntegralImage img, Rect r, int channel) { |
15 | ret ii_averageBrightnessOfArea(img, r.x, r.y, r.x2(), r.y2(), channel); |
16 | } |
17 | } |
Began life as a copy of #1019591
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: | #1025228 |
Snippet name: | ii_averageBrightnessOfArea |
Eternal ID of this version: | #1025228/9 |
Text MD5: | 9dd10790ebd281843a0e7fea32cb401b |
Transpilation MD5: | f75a30de55a5c673745b09c896530f1b |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-05 22:58:03 |
Source code size: | 755 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 306 / 393 |
Version history: | 8 change(s) |
Referenced in: | [show references] |