1 | static L<Rect> ocr_highBlack_hsplit(RGBImage rgb) {
|
2 | int w = rgb.w(), h = rgb.h(); |
3 | *float[w] data; |
4 | for x to w: |
5 | data[x] = l_highBlack(rgb, x, h/2); |
6 | float threshold = max(data)/2; |
7 | *bool[w] split; |
8 | for x to w: |
9 | split[x] = data[x] >= threshold; |
10 | ret ocr_hsplit(rgb, split); |
11 | } |
Began life as a copy of #1006391
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: | #1006392 |
| Snippet name: | ocr_highBlack_hsplit |
| Eternal ID of this version: | #1006392/1 |
| Text MD5: | 0ae52c05929c67816a96b527d4836475 |
| 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:18:32 |
| Source code size: | 301 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 704 / 740 |
| Referenced in: | [show references] |