You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Java Media Framework (JMF)](http://www.oracle.com/technetwork/java/javase/tech/index-jsp-140239.html),
24
-
*[Freedom for Media in Java (FMJ)](http://fmj-sf.net/),
25
-
*[OpenCV](http://opencv.org/) via [JavaCV](https://github.com/bytedeco/javacv),
26
-
*[VLC](http://www.videolan.org/vlc/) via [vlcj](http://www.capricasoftware.co.uk/projects/vlcj/index.html),
27
-
*[GStreamer](http://gstreamer.freedesktop.org/) via [gstreamer-java](https://code.google.com/p/gstreamer-java/)
28
-
* MJPEG IP Cameras,
29
-
30
-
## Raspberry PI (and other ARM devices)
9
+
1. Simple, thread-safe and non-blocking API,
10
+
2. No additional software required,
11
+
3. Supports multiple platforms (Windows, Linux, Mac OS, etc) and various architectures (32-bit, 64-bit, ARM),
12
+
4. Get images from build-in or USB-connected PC webcams,
13
+
5. Get images from IP / network cameras (as MJPEG or JPEG),
14
+
6. Offers ready to use motion detector,
15
+
7. All required JARs Available in Maven Central,
16
+
8. Offers possibility to expose images as MJPEG stream,
17
+
9. It is available as Maven dependency or standalone ZIP binary (with all dependencies included),
18
+
10. Swing component to display video feed from camera,
*[Java Media Framework (JMF)](http://www.oracle.com/technetwork/java/javase/tech/index-jsp-140239.html),
24
+
*[Freedom for Media in Java (FMJ)](http://fmj-sf.net/),
25
+
*[OpenCV](http://opencv.org/) via [JavaCV](https://github.com/bytedeco/javacv),
26
+
*[VLC](http://www.videolan.org/vlc/) via [vlcj](http://www.capricasoftware.co.uk/projects/vlcj/index.html),
27
+
*[GStreamer](http://gstreamer.freedesktop.org/) via [gstreamer-java](https://code.google.com/p/gstreamer-java/)
28
+
* MJPEG IP Cameras,
29
+
30
+
## Raspberry PI
31
+
32
+
_(and other ARM devices)_
31
33
32
34
The lates 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-SNAPHOST](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.nativelibs4java&a=bridj&v=0.6.3-SNAPSHOT) or newer [bridj-0.7-20140918](http://maven.ecs.soton.ac.uk/content/groups/maven.openimaj.org/com/nativelibs4java/bridj/0.7-20140918/bridj-0.7-20140918.jar). Moreover, lately Jonathon Hare from OpenIMAJ team, found a problem described in [bridj #525](https://github.com/ochafik/nativelibs4java/issues/525) which causes problems on armhf architecture.
33
35
@@ -57,7 +59,6 @@ Snapshot version:
57
59
<artifactId>webcam-capture</artifactId>
58
60
<version>0.3.11-SNAPSHOT</version>
59
61
</dependency>
60
-
61
62
```
62
63
63
64
## Download
@@ -70,55 +71,30 @@ The latest development version JAR (aka SNAPSHOT) can be downloaded [here](https
70
71
71
72
## Contribution
72
73
73
-
If you have strong will, spare time, knownledge or even some small amount of
74
-
money you would like to spent for good purpose you can help developing this
75
-
awesome Webcam Capture API and make it even better! Several kinds of
76
-
contributions are very welcome:
74
+
If you have strong will, spare time, knownledge 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:
77
75
78
76
##### Star Project
79
77
80
-
If you think this project is great, you would like
81
-
to help, but you don't know how - you can become project's stargazer.
82
-
By starring you're making project more popular. Visit [this](https://github.com/blog/1204-notifications-stars)
83
-
link if you would like to learn more about how notifications and stars
84
-
works on Github.
78
+
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](https://github.com/blog/1204-notifications-stars) link if you would like to learn more about how notifications and stars works on Github.
85
79
86
80
##### Report Bug or Feature
87
81
88
-
If you've found a bug or you've came-up with some fantastic feature which
89
-
can make Webcam Capture a better API to use, don't hesitate to
90
-
[create new issue](https://github.com/sarxos/webcam-capture/issues/new)
91
-
where you can describe in details what the problem is, or what would you
92
-
like to improve.
82
+
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](https://github.com/sarxos/webcam-capture/issues/new) where you can describe in details what the problem is, or what would you like to improve.
93
83
94
84
##### Perform Tests
95
85
96
-
Since Webcam Capture use some part of native code, it's very
97
-
hard to cover all supported operating systems. I'm always testing it
98
-
on 64-bit Ubuntu Linux, Windows XP and Vista (both 32-bit), but I
99
-
have no possibility to test on Raspberry Pi, Mac OS and 32-bit Linux.
100
-
Please help and test on those systems if you have such possibility.
86
+
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.
101
87
102
88
##### Write Code
103
89
104
-
If you know Java or C++ you can help developing Webcam Capture by
105
-
forking repository and sending pull requests. Please visit [this](http://stackoverflow.com/questions/4384776/how-do-i-contribute-to-others-code-in-github)
106
-
link if you don't know how to contribute to other's code at Github.
90
+
If you know Java or C++ you can help developing Webcam Capture by forking repository and sending pull requests. Please visit [this](http://stackoverflow.com/questions/4384776/how-do-i-contribute-to-others-code-in-github) link if you don't know how to contribute to other's code at Github.
107
91
108
92
##### Donate
109
93
110
-
People have expressed a wish to donate a little money. Donating won't
111
-
get you anything special, other than a warm feeling inside, and possibly
112
-
urge me to produce more freely available material for Webcam Capture
113
-
project. You can donate via [PayPal](https://www.paypal.com), just click
button available below - it will redirect you to the secured
116
-
PayPal page where you can provide donation amount (there is no minimal
117
-
value).
94
+
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](https://www.paypal.com), just click [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UYMENK76CSYZU) button available below - it will redirect you to the secured PayPal page where you can provide donation amount (there is no minimal value).
118
95
119
96
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UYMENK76CSYZU)
120
97
121
-
122
98
## Hello World
123
99
124
100
Code below will capture image from your default webcam and save it in ```hello-world.png``` file:
@@ -131,10 +107,7 @@ ImageIO.write(webcam.getImage(), "PNG", new File("hello-world.png"));
131
107
132
108
## More Examples!
133
109
134
-
Below is the list of pretty basic examples. All can be found in the
135
-
project source code. Please note that some of those examples are using
136
-
the newest API which possibly has not yet been released. In such a case
137
-
please make sure you are using the newest Webcam Capture SNAPSHOT version.
110
+
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.
138
111
139
112
*[How to detect webcam](https://github.com/sarxos/webcam-capture/blob/master/webcam-capture/src/example/java/DetectWebcamExample.java)
140
113
*[How to take picture and save to file](https://github.com/sarxos/webcam-capture/blob/master/webcam-capture/src/example/java/TakePictureExample.java)
@@ -164,25 +137,11 @@ And here are some more advanced examples, few with quite fancy GUI.
164
137
165
138
## Capture Drivers
166
139
167
-
Imagine situation when you depend on some framework, but suddenly have to
168
-
drop it and use different one (e.g. replace archaic JMF with newest GStreamer).
169
-
By doing this one have to rewrite significant piece of code because new framework is
170
-
completely incompatible with previous one. Here Webcam Capture API comes to help
171
-
you! This library has been created to remove the burden of situation when you
172
-
would like to write your application with intention to replace capturing framework
173
-
somewhere in the future.
174
-
175
-
Webcam Capture API defined ```WebcamDriver``` interface which has been already
176
-
implemented in several _capturing drivers_ build on top of well-known frameworks
177
-
used to work with multimedia and cameras. Complete list can be found below.
178
-
179
-
By default, Webcam Capture library uses default driver which consists of small,
180
-
refined part of awesome [OpenIMAJ](http://sourceforge.net/p/openimaj/home/OpenIMAJ/)
181
-
framework wrapped in thread-safe container which allows it to be used in
182
-
multithreaded applications.
183
-
However there are more ready-to-use drivers which can be used as a replacement
184
-
or addition to the default one. By utilizing those drivers Webcam Capture can
185
-
be extended with various new features (e.g. IP camera support).
140
+
Imagine situation when you depend on some framework, but suddenly have to drop it and use different one (e.g. replace archaic JMF with newest GStreamer). By doing this one have to rewrite significant piece of code because new framework is completely incompatible with previous one. Here Webcam Capture API comes to help you! This library has been created to remove the burden of situation when you would like to write your application with intention to replace capturing framework somewhere in the future.
141
+
142
+
Webcam Capture API defined ```WebcamDriver``` interface which has been already implemented in several _capturing drivers_ build on top of well-known frameworks used to work with multimedia and cameras. Complete list can be found below.
143
+
144
+
By default, Webcam Capture library uses default driver which consists of small, refined part of awesome [OpenIMAJ](http://sourceforge.net/p/openimaj/home/OpenIMAJ/) framework wrapped in thread-safe container which allows it to be used in multithreaded applications. However there are more ready-to-use drivers which can be used as a replacement or addition to the default one. By utilizing those drivers Webcam Capture can be extended with various new features (e.g. IP camera support).
186
145
187
146
List of additional capture drivers includes:
188
147
@@ -224,22 +183,11 @@ List of additional capture drivers includes:
224
183
225
184
## History
226
185
227
-
I initially started working on Webcam Capture as a simple proof-of-concept after
228
-
I read [Andrew Davison](http://fivedots.coe.psu.ac.th/~ad/)'s fantastic book entitled
229
-
[Killer Game Programming](http://www.amazon.com/Killer-Game-Programming-Andrew-Davison/dp/0596007302/ref=sr_1_1?s=books&ie=UTF8&qid=1360352393&sr=1-1&keywords=killer+game+programming)
230
-
(which is also available [online](http://fivedots.coe.psu.ac.th/~ad/jg/)). Thank you Andrew!
231
-
Later I found that there is a complete mess in Java APIs allowing you to capture images
232
-
from webcams. Once you choose specific API you cannot change it without modifying
233
-
large parts of the code. I decided to change this situation and write general purpose
234
-
wrapper for various different APIs (like JMF, OpenCV, OpenIMAJ, LTI-CIVIL, VLC).
235
-
In such a way, Webcam Capture as we know it today, was brought to life. Today you
236
-
can change underlying frameworks just by replacing webcam driver (one line code
237
-
change). If there is no driver for particular framework, it's very easy to write it
238
-
yourself.
186
+
I initially started working on Webcam Capture as a simple proof-of-concept after I read [Andrew Davison](http://fivedots.coe.psu.ac.th/~ad/)'s fantastic book entitled [Killer Game Programming](http://www.amazon.com/Killer-Game-Programming-Andrew-Davison/dp/0596007302/ref=sr_1_1?s=books&ie=UTF8&qid=1360352393&sr=1-1&keywords=killer+game+programming) (which is also available [online](http://fivedots.coe.psu.ac.th/~ad/jg/)). Thank you Andrew! Later I found that there is a complete mess in Java APIs allowing you to capture images from webcams. Once you choose specific API you cannot change it without modifying large parts of the code. I decided to change this situation and write general purpose wrapper for various different APIs (like JMF, OpenCV, OpenIMAJ, LTI-CIVIL, VLC). In such a way, Webcam Capture as we know it today, was brought to life. Today you can change underlying frameworks just by replacing webcam driver (one line code change). If there is no driver for particular framework, it's very easy to write it yourself.
239
187
240
188
## License
241
189
242
-
Copyright (C) 2012 - 2013 Bartosz Firyn
190
+
Copyright (C) 2012 - 2015 Bartosz Firyn
243
191
244
192
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:
0 commit comments