1 | static Map<BWImage, S> loadGlyphSheet(S sheetID) { |
2 | L<BWImage> images = unclusterImages(loadBWImage(sheetID)); |
3 | if (images == null) fail("Unclustering failed!?"); |
4 | images = map(func(BWImage i) { removeGrayBorder(i) }, images); |
5 | Map<BWImage, S> map = litorderedmap(); |
6 | for (BWImage img : images) { |
7 | continue if img == null; |
8 | Pair<BWImage, S> p = unsubtitle(img); |
9 | if (p == null) |
10 | print("Unsubtitle failed"); |
11 | else |
12 | map.put(p.a, p.b); |
13 | } |
14 | ret map; |
15 | } |
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: | 597 / 597 |
Referenced in: | [show references] |