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

15
LINES

< > BotCompany Repo | #1004650 // loadGlyphSheet

JavaX fragment (include)

static Map<BWImage, S> loadGlyphSheet(S sheetID) {
  L<BWImage> images = unclusterImages(loadBWImage(sheetID));
  if (images == null) fail("Unclustering failed!?");
  images = map(func(BWImage i) { removeGrayBorder(i) }, images);
  Map<BWImage, S> map = litorderedmap();
  for (BWImage img : images) {
    continue if img == null;
    Pair<BWImage, S> p = unsubtitle(img);
    if (p == null)
      print("Unsubtitle failed");
    else
      map.put(p.a, p.b);
  }
  ret map;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004650
Snippet name: loadGlyphSheet
Eternal ID of this version: #1004650/1
Text MD5: b99437cd8616da7533093382c0d94da1
Author: stefan
Category: javax / advanced image recognition
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-24 21:32:18
Source code size: 490 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 595 / 595
Referenced in: [show references]