1 | // TODO: test class renaming during unstructure |
2 | concept Result { |
3 | BWImage inputImage; |
4 | float horizontalSplitThreshold; |
5 | L<BWImage> characters; |
6 | S text; |
7 | } |
8 | |
9 | static MultiMap<BWImage, S> getLearnedChars_fullImages() { |
10 | Concepts in = new Concepts("#1005726").load(); |
11 | new MultiMap<BWImage, S> imageToChar; |
12 | for (Result r : in.list(Result)) { |
13 | //imageToChar.setPut(autoCroppedBWImage(r.inputImage), r.text); |
14 | S text = contains(r.text, "[") ? "" : r.text; |
15 | for (int i = 0; i < l(r.characters); i++) { |
16 | BWImage clip = autoCroppedBWImage(r.characters.get(i)); |
17 | S c = substring(text, i, i+1); |
18 | if (nempty(c)) |
19 | imageToChar.setPut(clip, c); |
20 | } |
21 | } |
22 | ret imageToChar; |
23 | } |
Began life as a copy of #1006094
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: | #1006095 |
Snippet name: | getLearnedChars_fullImages (from #1005726) |
Eternal ID of this version: | #1006095/1 |
Text MD5: | d8831a0adab86eb3102258c1ea6cdbe8 |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-18 01:29:18 |
Source code size: | 719 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 598 / 583 |
Referenced in: | [show references] |