1 | static double[] bwImage_averageBrightnessPerRow(BWImage img) {
|
2 | int w = img.getWidth(), h = img.getHeight(); |
3 | double[] l = new[h]; |
4 | for y to h: {
|
5 | double sum = 0; |
6 | for x to w: sum += img.getFloatPixel(x, y); |
7 | l[y] = sum/w; |
8 | } |
9 | ret l; |
10 | } |
Began life as a copy of #1026921
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1026922 |
| Snippet name: | bwImage_averageBrightnessPerRow |
| Eternal ID of this version: | #1026922/1 |
| Text MD5: | 26e2ce9bd5401746b06a19a880c99107 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-02-02 20:11:27 |
| Source code size: | 258 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 448 / 469 |
| Referenced in: | [show references] |