KhaledBaki /
opencv-face-detector
Real time AI powered object recognition system built using Java and OpenCV. The main goal of the project is to detect and recognize visual features from a live webcam feed using computer vision manipulations.
Loading repository data…
sarxos / repository
The goal of this project is to allow integrated or USB-connected webcams to be accessed directly from Java. Using provided libraries users are able to read camera images and detect motion. Main project consist of several sub projects - the root one, which contains required classes, build-in webcam driver compatible with Windows, Linux and Mac OS, which can stream images as fast as your camera can serve them (up to 50 FPS). Main project can be used standalone, but user is able to replace build-in driver with different one - such as OpenIMAJ, GStreamer, V4L4j, JMF, LTI-CIVIL, FMJ, etc.
This library allows you to use your build-in or external webcam directly from Java. It's designed to abstract commonly used camera features and support various capturing frameworks.
Assume a situation when your code depends on some capturing framework, but suddenly you have to drop it and use a different, maybe newer one (e.g. replace archaic JMF with newest GStreamer). By doing this you will have to rewrite significant piece of your code because these frameworks are completely different and not compatible at all. This is where Webcam Capture API comes to save the world - it was created to remove the burden of such situations so you do not have to rewrite your code ever again, but instead you can simply switch the driver class to different one.
The latest stable version is: 0.3.12
The latest development version is: 0.3.13-SNAPSHOT
(and other ARM devices)
The latest version (0.3.10) does not work on ARM just out of the box. To make it working you need to replace version 0.6.2 of BridJ JAR by the 0.6.3-SNAPSHOT or newer bridj-0.7-20140918. Moreover, lately Jonathon Hare from OpenIMAJ team, found a problem described in bridj #525 which causes problems on armhf architecture.
The latest stable version is available in Maven Central:
<dependency>
<groupId>com.github.sarxos</groupId>
<artifactId>webcam-capture</artifactId>
<version>0.3.12</version>
</dependency>
Snapshot version:
<repository>
<id>Sonatype OSS Snapshot Repository</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<dependency>
<groupId>com.github.sarxos</groupId>
<artifactId>webcam-capture</artifactId>
<version>0.3.13-SNAPSHOT</version>
</dependency>
The newest stable version can be downloaded as separated ZIP binary. This ZIP file contains Webcam Capture API itself and all required dependencies (in libs directory). Click on the below link to download it:
webcam-capture-0.3.12-dist.zip
The latest development version JAR (aka SNAPSHOT) can be downloaded here.
If you have strong will, spare time, knowledge or even some small amount of money you would like to spent for good purpose you can help developing this awesome Webcam Capture API and make it even better! Several kinds of contributions are very welcome:
If you think this project is great, you would like to help, but you don't know how - you can become project's stargazer. By starring you're making project more popular. Visit this link if you would like to learn more about how notifications and stars works on Github.
If you've found a bug or you've came-up with some fantastic feature which can make Webcam Capture a better API to use, don't hesitate to create new issue where you can describe in details what the problem is, or what would you like to improve.
Since Webcam Capture use some part of native code, it's very hard to cover all supported operating systems. I'm always testing it on 64-bit Ubuntu Linux, Windows XP and Vista (both 32-bit), but I have no possibility to test on Raspberry Pi, Mac OS and 32-bit Linux. Please help and test on those systems if you have such possibility.
If you know Java or C++ you can help developing Webcam Capture by forking repository and sending pull requests. Please visit this link if you don't know how to contribute to other's code at Github.
People have expressed a wish to donate a little money. Donating won't get you anything special, other than a warm feeling inside, and possibly urge me to produce more freely available material for Webcam Capture project. You can donate via PayPal, just click donate button available below - it will redirect you to the secured PayPal page where you can provide donation amount (there is no minimal value).
Code below will capture image from your default webcam and save it in hello-world.png file:
Webcam webcam = Webcam.getDefault();
webcam.open();
ImageIO.write(webcam.getImage(), "PNG", new File("hello-world.png"));
Below are the very pretty basic examples demonstrating of how Webcam Capture API can be used in the Java code. All can be found in the project source code. Please note that some of those examples may use the newest API which has not yet been released to maven Central. In such a case please make sure you are using the newest Webcam Capture API SNAPSHOT.
And here are some more advanced examples, few with quite fancy GUI.
WebcamMotionDetector with the JFrame windowWebcamPanel.Painter interface to draw effects on WebcamPanel componentSelected from shared topics, language and repository description—not editorial ratings.
KhaledBaki /
Real time AI powered object recognition system built using Java and OpenCV. The main goal of the project is to detect and recognize visual features from a live webcam feed using computer vision manipulations.