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

41
LINES

< > BotCompany Repo | #1004985 // Recognize Full-Screen Programs From Screen Corners

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

Libraryless. Click here for Pure Java version (4321L/28K/95K).

!752

static int w = 45, h = 45;

!include #1004681 // Concepts

sconcept Corner {
  bool left;
  RGBImage image;
  S md5;
}

sconcept Program {}

sconcept Chrome extends Program {}
sconcept Desktop extends Program {}
sconcept Other extends Program {}
sconcept Unknown extends Program {}

p {
  loadAndAutoSaveConcepts();
  RGBImage left = shootTopLeftCorner(w, h);
  RGBImage right = shootTopRightCorner(w, h);
  Corner cleft = getCorner(true, left);
  Corner cright = getCorner(false, right);
  //showImage(left);
  //showImage(right);
}

static Corner getCorner(bool left, RGBImage image) {
  S md5 = md5OfRGBImage(image);
  Corner c = findWhere(list(Corner.class), "left", left, "md5", md5);
  if (c == null) {
    c = new Corner;
    c.left = left;
    c.image = image;
    c.md5 = md5;
    change();
  }
  ret c;
}

Author comment

Began life as a copy of #1004983

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

-
Snippet ID: #1004985
Snippet name: Recognize Full-Screen Programs From Screen Corners
Eternal ID of this version: #1004985/1
Text MD5: b92c8a9a6e37cfe7f045787b7f80ff50
Transpilation MD5: c62f84cb24c2e9f2a1aa1a9bda5f0393
Author: stefan
Category: javax / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-09-21 19:58:46
Source code size: 860 bytes / 41 lines
Pitched / IR pitched: No / No
Views / Downloads: 622 / 691
Referenced in: