static float wideBlack_maxBrightness = 0.1f; static Range wideBlack(RGBImage img, int x, int y) { int w = img.w(); int x1 = x, x2 = x; while (x1 > 0 && img.getPixel(x1-1, y).getBrightness() < wideBlack_maxBrightness) --x1; while (x2 < w && img.getPixel(x2, y).getBrightness() < wideBlack_maxBrightness) ++x2; ret new Range(x1, x2); }
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: | #1006382 |
Snippet name: | wideBlack |
Eternal ID of this version: | #1006382/1 |
Text MD5: | 76a827c20dd45512614a50ca9a5a1882 |
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:14:11 |
Source code size: | 352 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 562 / 575 |
Referenced in: | #1006384 - l_wideBlack #1006386 - blackHigh #1006654 - Standard functions list 2 (LIVE, continuation of #761) |