Package com.github.sarxos.webcam

Examples of com.github.sarxos.webcam.Webcam.open()


 
  @Override
  public ArrayList<RGBData> getData() {
    Webcam webcam = Webcam.getDefault();
    webcam.setViewSize(new Dimension(res_w, res_h));
    webcam.open();
    BufferedImage image = webcam.getImage();
    Raster r = image.getData();
    webcam.close();
    ArrayList<RGBData> data = new ArrayList<RGBData>();
   
View Full Code Here


    public static void main(String[] args) throws IOException {
        System.out.println(Webcam.getDriver().getDevices());
        Webcam webcam = Webcam.getDefault();
        setMaxResolution(webcam);
        webcam.open();
        BufferedImage image = webcam.getImage();
        ImageIO.write(image, "PNG", new File("test.png"));
    }

    private static void setMaxResolution(Webcam webcam) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.