Package com.github.sarxos.webcam

Examples of com.github.sarxos.webcam.Webcam


  public LowResVisualSensor() {
  }
 
  @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>();
   
    for (int x = 0; x < res_w; x++) {
      for (int y = 0; y < res_h; y++) {
        double[] d = r.getPixel(x, y, new double[3]);
View Full Code Here


*/
public class CamTest {

    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"));
    }
View Full Code Here

TOP

Related Classes of com.github.sarxos.webcam.Webcam

Copyright © 2018 www.massapicom. 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.