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

28
LINES

< > BotCompany Repo | #1019214 // Live Web Cam Face Finder v1 [Dyn Module]

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

Uses 108K of libraries. Click here for Pure Java version (16343L/115K).

1  
!7
2  
3  
module WebCamFaceFinder > DynImageSurface {
4  
  transient BufferedImage lastImage;
5  
  FaceFinderX1 finder;
6  
7  
  start {
8  
    // faceFinderX1_best
9  
    if (finder == null) finder = faceFinderX1_starbucks();
10  
    doEvery(100, rstUpdate()); 
11  
  }
12  
  
13  
  afterVisualize { imageSurface_pixelated(imageSurface); }
14  
  
15  
  void update {
16  
    if (imageSurface == null) ret;
17  
    final BufferedImage img = dm_webCamImage();
18  
    temp tempAfterwards(r { lastImage = img });
19  
    if (img == null || img == lastImage) ret;
20  
    Rect r = cloneRect(finder.get(RGBImage(img)));
21  
    if (r != null) {
22  
      r.y = -1;
23  
      r.h = img.getHeight();
24  
    }
25  
    setSelection(r);
26  
    setImage(img);
27  
  }
28  
}

Author comment

Began life as a copy of #1019105

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: #1019214
Snippet name: Live Web Cam Face Finder v1 [Dyn Module]
Eternal ID of this version: #1019214/7
Text MD5: f9c41245d9b99715af15d00d5f55ea74
Transpilation MD5: bf907569787a51f6d8a5eea56469c7b0
Author: stefan
Category: javax / stefan's os / web cam
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-11 20:56:25
Source code size: 692 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 378 / 825
Version history: 6 change(s)
Referenced in: [show references]