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

15
LINES

< > BotCompany Repo | #1015483 // unixTerminalDollarFinder2

JavaX fragment (include)

1  
static L<Rect> unixTerminalDollarFinder2(BufferedImage screenshot) {
2  
  S clipID = #1101259;
3  
  RGBImage clip = loadRGBImage(clipID);
4  
  RGBImage img = new RGBImage(screenshot);
5  
  L<FoundImg> l = findImageAll2(new BWImage(img), clipID, 0.91f);
6  
  //pnl(l);
7  
  L<Rect> rects = collect('r, l);
8  
  new L<Rect> rects2;
9  
  for (Rect r : rects) {
10  
    float sim = 1-rgbDistance(img.clip(r), clip);
11  
    //print(r + " => " + toIntPercent(sim) + "%");
12  
    if (sim >= 0.85) rects2.add(r);
13  
  }
14  
  ret rects2;
15  
}

Author comment

Began life as a copy of #1015477

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1015483
Snippet name: unixTerminalDollarFinder2
Eternal ID of this version: #1015483/1
Text MD5: e61f45c5843d146d00dc095c327cc6b3
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-15 01:34:25
Source code size: 504 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 358 / 385
Referenced in: [show references]