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

24
LINES

< > BotCompany Repo | #1025308 // Segment screenshot stream [dev.]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 974K of libraries. Click here for Pure Java version (9334L/51K).

1  
!7
2  
3  
!include once #1025225 // Shared IntegralImage
4  
5  
cmodule SegmentScreenshotStream > DynImageSurface {
6  
  switchable int displayWidth = 400;
7  
  ISegmenter segmenter;
8  
  transient L<Rect> rects;
9  
10  
  start-thread {
11  
    if (segmenter == null)
12  
      setField(segmenter := segmenterFromAGIBlue("Find active internal frame (JTattoo) #1"));
13  
   
14  
    dm_vmBus_onMessage_q newScreenshotInStream(voidfunc(O mod, virtual Screenshot ss) {
15  
      BufferedImage img = cast rget image(ss);
16  
      IntegralImage ii = cast rget integralImage(ss);
17  
      setImage(scaledBufferedImageFromIntegralImage(displayWidth, ii));
18  
      
19  
      rects = segmenter.get(img);
20  
      overlaySelectionsOnImageSurface(imageSurface, 
21  
        scaleRects(rects, doubleRatio(displayWidth, ii.getWidth())));
22  
    });
23  
  }
24  
}

Author comment

Began life as a copy of #1025283

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025308
Snippet name: Segment screenshot stream [dev.]
Eternal ID of this version: #1025308/3
Text MD5: 4466b9378030afe1cbfa96db9dacd614
Transpilation MD5: db9efb1b45fe7d2bf115b97cd6cecec4
Author: stefan
Category: javax / screen recognition
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-20 18:10:47
Source code size: 796 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 289 / 589
Version history: 2 change(s)
Referenced in: [show references]