static float img_averageWidth(BWImage image) { ret img_averageWidth(image, 0, image.getHeight()); } static float img_averageWidth(BWImage image, int y1, int y2) { float sum = 0; for (int y = y1; y < y2; y++) { sum += img_width(image, y); } return sum/(y2-y1); }
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: | 707 / 768 |
| Referenced in: | #1005861 - img_averageWidthDividedByHeight #1006654 - Standard functions list 2 (LIVE, continuation of #761) |