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

!7

lib 1008985 // webcam
lib 1008987 // bridj
lib 1004016 // slf4j api

import com.github.sarxos.webcam.*;

p-substance-noconsole {
  Webcam webcam = last(Webcam.getWebcams()); // Hope this prefers external webcams
  //webcam.setViewSize(WebcamResolution.VGA.getSize());
  webcam.open(true);
  
  WebcamPanel panel = new WebcamPanel(webcam, false);
  //panel.setPreferredSize(WebcamResolution.VGA.getSize());
  panel.setFPSDisplayed(true);
  //panel.setFPSLimited(true);
  //panel.setFPSLimit(20);
  //panel.setPainter(this);
  panel.start();
  
  showPackedFrame("JavaX Live Webcam", panel)
    .setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

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: 494 / 1121
Version history: 13 change(s)
Referenced in: [show references]