Libraryless. Click here for Pure Java version (2595L/16K).
static int[] ocr_leftProfile(BWImage img, double stopAtRatio) { int stopAt = min(img.getWidth()-1, iround(img.getWidth()*stopAtRatio)), h = img.getHeight(); int[] out = new int[h]; for y to h: { int x = 0; while (x <= stopAt && img.getPixel(x, y) > 0.5f) ++x; out[y] = x; } ret out; }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1024733 | 
| Snippet name: | ocr_leftProfile | 
| Eternal ID of this version: | #1024733/4 | 
| Text MD5: | ff6e68d4141d20729ff56307fe28f61a | 
| Transpilation MD5: | 5571ed4fafe9d7f729614250d061677c | 
| Author: | stefan | 
| Category: | javax / imaging | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2019-08-24 15:25:20 | 
| Source code size: | 315 bytes / 10 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 417 / 529 | 
| Version history: | 3 change(s) | 
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1024735 - ocr_leftProfile_scaledTo127 |