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).

!7

!include once #1025225 // Shared IntegralImage

cmodule SegmentScreenshotStream > DynImageSurface {
  switchable int displayWidth = 400;
  ISegmenter segmenter;
  transient L<Rect> rects;

  start-thread {
    if (segmenter == null)
      setField(segmenter := segmenterFromAGIBlue("Find active internal frame (JTattoo) #1"));
   
    dm_vmBus_onMessage_q newScreenshotInStream(voidfunc(O mod, virtual Screenshot ss) {
      BufferedImage img = cast rget image(ss);
      IntegralImage ii = cast rget integralImage(ss);
      setImage(scaledBufferedImageFromIntegralImage(displayWidth, ii));
      
      rects = segmenter.get(img);
      overlaySelectionsOnImageSurface(imageSurface, 
        scaleRects(rects, doubleRatio(displayWidth, ii.getWidth())));
    });
  }
}

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: 288 / 587
Version history: 2 change(s)
Referenced in: