static float blackHigh_maxBrightness = 0.1f; static Range blackHigh(RGBImage img, int x, int y) { int h = img.h(); int y1 = y, y2 = y; while (y1 > 0 && img.getPixel(x, y1-1).getBrightness() < blackHigh_maxBrightness) --y1; while (y2 < h && img.getPixel(x, y2).getBrightness() < blackHigh_maxBrightness) ++y2; ret new Range(y1, y2); }
Began life as a copy of #1006382
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: | #1006386 |
Snippet name: | blackHigh |
Eternal ID of this version: | #1006386/1 |
Text MD5: | fe2873cc7eb8c18fd46db0069a332add |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-30 00:13:09 |
Source code size: | 352 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 496 / 525 |
Referenced in: | [show references] |