Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 2.73 KB

README.md

File metadata and controls

61 lines (38 loc) · 2.73 KB

Java Webcam Capture

This library allows you to use your build-in or external webcam directly from Java.

Complete documentation, API, examples, tutorials and many more can be found here:

http://webcam-capture.sarxos.pl/

Build Status

How To Use

Basic Example

This is the basic example of how Webcam Capture can be used to get image from PC webcam. Code below will capture image from your PC webcam and save it in test.png file in current directory.

Webcam webcam = Webcam.getDefault();
BufferedImage image = webcam.getImage();
ImageIO.write(image, "PNG", new File("test.png"));

For examples of how to use Webcam Capture with IP cameras please follow to the appropriate subproject.

Maven

Webcam Capture is available in Maven Central, so you can either add Maven (or Ivy or Grandle) dependency to your project or access page above and download complete ZIP package, and then add all JARs into your project's classpath.

<dependency>
	<groupId>com.github.sarxos</groupId>
	<artifactId>webcam-capture</artifactId>
	<version>0.3.3</version>
</dependency>

Required JARs

If you are not using Maven nor any other dependency manager, you can simply download ZIP file containing all required JARs. ZIP for version 0.3.1 is available for download here.

News

License

Copyright (C) 2012 Bartosz Firyn

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.