1 | static float img_averageWidth(BWImage image) { |
2 | ret img_averageWidth(image, 0, image.getHeight()); |
3 | } |
4 | |
5 | static float img_averageWidth(BWImage image, int y1, int y2) { |
6 | float sum = 0; |
7 | for (int y = y1; y < y2; y++) { |
8 | sum += img_width(image, y); |
9 | } |
10 | return sum/(y2-y1); |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005856 |
Snippet name: | img_averageWidth |
Eternal ID of this version: | #1005856/1 |
Text MD5: | 78715bdc657caee3886988d101142e9b |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-11 08:10:08 |
Source code size: | 286 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 499 / 555 |
Referenced in: | [show references] |