Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1006391 // ocr_wideBlack_vsplit

JavaX fragment (include)

1  
static L<Rect> ocr_wideBlack_vsplit(RGBImage rgb) {
2  
  int w = rgb.w(), h = rgb.h();
3  
  *float[h] data;
4  
  for y to h:
5  
    data[y] = l_wideBlack(rgb, w/2, y);
6  
  float threshold = max(data)/2;
7  
  *bool[h] split;
8  
  for y to h:
9  
    split[y] = data[y] >= threshold;
10  
  ret ocr_vsplit(rgb, split);
11  
}

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: #1006391
Snippet name: ocr_wideBlack_vsplit
Eternal ID of this version: #1006391/1
Text MD5: d4d2557d074d1aad899c9d2118a1a1f3
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-29 23:52:02
Source code size: 301 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 518 / 535
Referenced in: [show references]