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

11
LINES

< > BotCompany Repo | #1006392 // ocr_highBlack_hsplit

JavaX fragment (include)

static L<Rect> ocr_highBlack_hsplit(RGBImage rgb) {
  int w = rgb.w(), h = rgb.h();
  *float[w] data;
  for x to w:
    data[x] = l_highBlack(rgb, x, h/2);
  float threshold = max(data)/2;
  *bool[w] split;
  for x to w:
    split[x] = data[x] >= threshold;
  ret ocr_hsplit(rgb, split);
}

Author comment

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: 449 / 463
Referenced in: [show references]