Skip to content

Commit

Permalink
Update pages project to generate website from README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sarxos committed Jan 12, 2015
1 parent ef57d24 commit 6c47868
Show file tree
Hide file tree
Showing 45 changed files with 370 additions and 1,422 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ target
pom.xml~
.project
.classpath
README.md~

128 changes: 38 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,30 @@ This library allows you to use your build-in or external webcam directly from Ja

## Features

* Simple, thread-safe and non-blocking API,
* No additional software required,
* Supports multiple platforms (Windows, Linux, Mac OS, etc) and various architectures (32-bit, 64-bit, ARM),
* Get images from build-in or USB-connected PC webcams,
* Get images from IP / network cameras (as MJPEG or JPEG),
* Offers ready to use motion detector,
* All required JARs Available in Maven Central,
* Offers possibility to expose images as MJPEG stream,
* It is available as Maven dependency or standalone ZIP binary (with all dependencies included),
* Swing component to display video feed from camera,
* Swing component to choose camera (drop down),
* Multiple capturing frameworks are supported:
* [OpenIMAJ](http://www.openimaj.org/),
* [LTI CIVIL](http://sourceforge.net/projects/lti-civil/),
* [Java Media Framework (JMF)](http://www.oracle.com/technetwork/java/javase/tech/index-jsp-140239.html),
* [Freedom for Media in Java (FMJ)](http://fmj-sf.net/),
* [OpenCV](http://opencv.org/) via [JavaCV](https://github.com/bytedeco/javacv),
* [VLC](http://www.videolan.org/vlc/) via [vlcj](http://www.capricasoftware.co.uk/projects/vlcj/index.html),
* [GStreamer](http://gstreamer.freedesktop.org/) via [gstreamer-java](https://code.google.com/p/gstreamer-java/)
* MJPEG IP Cameras,

## Raspberry PI (and other ARM devices)
1. Simple, thread-safe and non-blocking API,
2. No additional software required,
3. Supports multiple platforms (Windows, Linux, Mac OS, etc) and various architectures (32-bit, 64-bit, ARM),
4. Get images from build-in or USB-connected PC webcams,
5. Get images from IP / network cameras (as MJPEG or JPEG),
6. Offers ready to use motion detector,
7. All required JARs Available in Maven Central,
8. Offers possibility to expose images as MJPEG stream,
9. It is available as Maven dependency or standalone ZIP binary (with all dependencies included),
10. Swing component to display video feed from camera,
11. Swing component to choose camera (drop down),
12. Multiple capturing frameworks are supported:
* [OpenIMAJ](http://www.openimaj.org/),
* [LTI CIVIL](http://sourceforge.net/projects/lti-civil/),
* [Java Media Framework (JMF)](http://www.oracle.com/technetwork/java/javase/tech/index-jsp-140239.html),
* [Freedom for Media in Java (FMJ)](http://fmj-sf.net/),
* [OpenCV](http://opencv.org/) via [JavaCV](https://github.com/bytedeco/javacv),
* [VLC](http://www.videolan.org/vlc/) via [vlcj](http://www.capricasoftware.co.uk/projects/vlcj/index.html),
* [GStreamer](http://gstreamer.freedesktop.org/) via [gstreamer-java](https://code.google.com/p/gstreamer-java/)
* MJPEG IP Cameras,

## Raspberry PI

_(and other ARM devices)_

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.

Expand Down Expand Up @@ -57,7 +59,6 @@ Snapshot version:
<artifactId>webcam-capture</artifactId>
<version>0.3.11-SNAPSHOT</version>
</dependency>

```

## Download
Expand All @@ -70,55 +71,30 @@ The latest development version JAR (aka SNAPSHOT) can be downloaded [here](https

## Contribution

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:
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:

##### Star Project

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.
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.

##### Report Bug or Feature

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.
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.

##### Perform Tests

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.
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.

##### Write Code

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.
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.

##### Donate

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).
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).

[![Donate via PayPal](https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UYMENK76CSYZU)


## Hello World

Code below will capture image from your default webcam and save it in ```hello-world.png``` file:
Expand All @@ -131,10 +107,7 @@ ImageIO.write(webcam.getImage(), "PNG", new File("hello-world.png"));

## More Examples!

Below is the list of pretty basic examples. All can be found in the
project source code. Please note that some of those examples are using
the newest API which possibly has not yet been released. In such a case
please make sure you are using the newest Webcam Capture SNAPSHOT version.
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.

* [How to detect webcam](https://github.com/sarxos/webcam-capture/blob/master/webcam-capture/src/example/java/DetectWebcamExample.java)
* [How to take picture and save to file](https://github.com/sarxos/webcam-capture/blob/master/webcam-capture/src/example/java/TakePictureExample.java)
Expand Down Expand Up @@ -164,25 +137,11 @@ And here are some more advanced examples, few with quite fancy GUI.

## Capture Drivers

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.

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.

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).
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.

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.

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).

List of additional capture drivers includes:

Expand Down Expand Up @@ -224,22 +183,11 @@ List of additional capture drivers includes:

## History

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.
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.

## License

Copyright (C) 2012 - 2013 Bartosz Firyn
Copyright (C) 2012 - 2015 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:

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
<connection>scm:git:git@github.com:sarxos/${project.repoid}.git</connection>
<developerConnection>scm:git:git@github.com:sarxos/${project.repoid}.git</developerConnection>
<url>git@github.com:sarxos/${project.repoid}.git</url>
<tag>HEAD</tag>
</scm>
<tag>HEAD</tag>
</scm>

<issueManagement>
<system>GitHub Issues Manager</system>
<url>https://github.com/sarxos/${project.repoid}/issues</url>
Expand Down
19 changes: 19 additions & 0 deletions webcam-capture-pages/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Webcam Capture Pages

This project is to generate the website.

### Update Site From README.md

To regenerate HTML from ```README.md``` file the following must be done:

```plain
$ cd webcam-capture-pages
$ mvn clean process-sources
```

After the Maven completed all its tasks, the newest website code is available in ```src/main/resources/html```.

### Upload File via FTP/SCP

Just use your tool of choice to deploy the site to the server.

49 changes: 49 additions & 0 deletions webcam-capture-pages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,56 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.ruleoftech</groupId>
<artifactId>markdown-page-generator-plugin</artifactId>
<version>0.4</version>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<inputDirectory>${project.basedir}/..</inputDirectory>
<outputDirectory>${project.basedir}/src/main/resources/html</outputDirectory>
<headerHtmlFile>${project.basedir}/src/main/resources/md/header.html</headerHtmlFile>
<footerHtmlFile>${project.basedir}/src/main/resources/md/footer.html</footerHtmlFile>
<pegdownExtensions>HARDWRAPS,AUTOLINKS,TABLES,FENCED_CODE_BLOCKS</pegdownExtensions>
</configuration>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.ruleoftech</groupId>
<artifactId>markdown-page-generator-plugin</artifactId>
<versionRange>[0.4,)</versionRange>
<goals>
<goal>generate</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Loading

0 comments on commit 6c47868

Please sign in to comment.