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

19
LINES

< > BotCompany Repo | #1019586 // Screen Lens with rect of changing pixels

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

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

1  
!7
2  
3  
static ScreenLens lens;
4  
static RGBImage lastImage;
5  
static Rect diffRect;
6  
7  
p-noconsole {
8  
  lens = new ScreenLens;
9  
  lens.postProcess = func(BufferedImage img) {
10  
    RGBImage rgb = new(img);
11  
    if (lastImage != null) {
12  
      diffRect = or(rectOfDifferentPixels(lastImage, rgb), diffRect);
13  
      drawBox(img, diffRect, Color.red, 0.8f);
14  
    }
15  
    lastImage = rgb;
16  
    ret img;
17  
  };
18  
  lens.start();
19  
}

Author comment

Began life as a copy of #1006557

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019586
Snippet name: Screen Lens with rect of changing pixels
Eternal ID of this version: #1019586/4
Text MD5: 62bac6d3800755a6513a9ccebbbd2377
Transpilation MD5: 5c4bc02a9cb4456954611d40c0fdee31
Author: stefan
Category: javax / gui / ocr
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-27 23:10:36
Source code size: 419 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 250 / 770
Version history: 3 change(s)
Referenced in: [show references]