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

17
LINES

< > BotCompany Repo | #1015481 // Find blue terminal $ on screen using simple scan

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (9673L/66K).

1  
!7
2  
3  
p-experiment {
4  
  S clipID = #1101260;
5  
  RGBImage clip = loadRGBImage(clipID);
6  
  RGBImage img = loadRGBImage(/*#1101257*/#1101258);
7  
  L<FoundImg> l = findImageAll2(new BWImage(img), clipID, 0.85f);
8  
  pnl(l);
9  
  L<Rect> rects = collect('r, l);
10  
  new L<Rect> rects2;
11  
  for (Rect r : rects) {
12  
    float sim = 1-rgbDistance(img.clip(r), clip);
13  
    print(r + " => " + toIntPercent(sim) + "%");
14  
    if (sim >= 0.85) rects2.add(r);
15  
  }
16  
  showImageWithSelections(img, rects);
17  
}

Author comment

Began life as a copy of #1015466

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: #1015481
Snippet name: Find blue terminal $ on screen using simple scan
Eternal ID of this version: #1015481/11
Text MD5: b34c94f7bf26437b8ed09c03568bbacc
Transpilation MD5: f69adb13c3b6b515b95ec3beccdee5a6
Author: stefan
Category: javax / ocr
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-15 01:40:29
Source code size: 487 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 474 / 1149
Version history: 10 change(s)
Referenced in: [show references]