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

20
LINES

< > BotCompany Repo | #1006193 // getLearnedCharacters2 (reads needed clips only)

JavaX fragment (include)

// keys are md5s
static Map<S, BWImage> getLearnedCharacters2() {
  Set<S> md5s = requiredPhraseImageMD5s();

  new HashMap<S, BWImage> md5ToImage;
  int nFound = 0;
  for (S md5, File f : screenClipFilesContainedInMD5Set(md5s)) {
    ++nFound;
      
    BWImage img = loadBWImage(f);
    //md5ToImage.put(md5, img);
    for (BWImage cImg : horizontalAutoSplitToImages(img)) {
      S cMD5 = ocrMD5OfBWImage(cImg);
      md5ToImage.put(cMD5, cImg);
    }
  }
  
  print("Loaded phrase images: " + nFound + "/" + l(md5s));
  ret md5ToImage;
}

Author comment

Began life as a copy of #1006191

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006193
Snippet name: getLearnedCharacters2 (reads needed clips only)
Eternal ID of this version: #1006193/14
Text MD5: fdcc9b9f8295f669c17c90078278683e
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-15 00:11:29
Source code size: 561 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 552 / 566
Version history: 13 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1015230 - getLearnedCharacters2 - OLD
#1015346 - getLearnedCharacters2 v1 (reads all clips)
#1015349 - requiredPhraseImageMD5s