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

24
LINES

< > BotCompany Repo | #1009110 // JavaX Live Webcam - Show live webcam image in frame [WORKS]

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

Download Jar. Uses 6469K of libraries. Click here for Pure Java version (2390L/16K).

1  
!7
2  
3  
lib 1008985 // webcam
4  
lib 1008987 // bridj
5  
lib 1004016 // slf4j api
6  
7  
import com.github.sarxos.webcam.*;
8  
9  
p-substance-noconsole {
10  
  Webcam webcam = last(Webcam.getWebcams()); // Hope this prefers external webcams
11  
  //webcam.setViewSize(WebcamResolution.VGA.getSize());
12  
  webcam.open(true);
13  
  
14  
  WebcamPanel panel = new WebcamPanel(webcam, false);
15  
  //panel.setPreferredSize(WebcamResolution.VGA.getSize());
16  
  panel.setFPSDisplayed(true);
17  
  //panel.setFPSLimited(true);
18  
  //panel.setFPSLimit(20);
19  
  //panel.setPainter(this);
20  
  panel.start();
21  
  
22  
  showPackedFrame("JavaX Live Webcam", panel)
23  
    .setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
24  
}

Author comment

Began life as a copy of #1009013

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009110
Snippet name: JavaX Live Webcam - Show live webcam image in frame [WORKS]
Eternal ID of this version: #1009110/14
Text MD5: e33a286adb61e3528af7c75f25835ee2
Transpilation MD5: aa9af2b9509677cd1aca8704a5fb1f35
Author: stefan
Category: javax / desktop / camera
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-03 00:13:24
Source code size: 672 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 495 / 1122
Version history: 13 change(s)
Referenced in: [show references]