Description
provides a Producer service that polls images captured from a WebCam (by using JMF).
For simplicity, a simple service to grab a image from the webcam without dealing with the Wire Admin complexity
For more details on how to use this bundle, refer to the /doc/readme.html file embedded in the bundle jarfile.
Contributors
Didier Donsez (Didier.Donsez@ieee.org)
License
Library GNU Public License
Services
org.osgi.service.wireadmin.Producer
fr.imag.adele.bundle.webcamproducer.ImageGrabber
(this service is suceptible to disappear in the future versions !)
Properties
Requirements
Download
Build
config.properties setting
You must set the device-name property with the right name (and a supported resolution)
example: vfw:Logitech USB Video Camera:0, vfw:Microsoft WDM Image Capture (Win32):0)
The right device name for your WebCam can be found by installing JMF (http://java.sun.com/products/java-media/jmf/) for your operation system
and launching JMStudio (File>Preferences>tab Capture Devices>button Detect Capture Device)
Run the demo
To run the demo of this bundle, enter the following commands in the OSCAR shell
obr -s Http Service obr -s Service Binder start http://www-adele.imag.fr/~donsez/dev/osgi/osgi3spec/osgi3spec.jar start http://www-adele.imag.fr/~donsez/dev/osgi/wireadmin/wireadmin.jar start http://www-adele.imag.fr/~donsez/dev/osgi/wireadmincmd/wireadmincmd.jar start http://www-adele.imag.fr/~donsez/dev/osgi/consumerservlet/consumerservlet.jar start http://www-adele.imag.fr/~donsez/dev/osgi/webcamproducer/webcamproducer.jar start http://www-adele.imag.fr/~donsez/dev/osgi/dateproducer/dateproducer.jarWait for this trace "Capture thread starting..."
wa wa -lp wa -lcEnter the following commands to create
wa -c fr.imag.adele.osgi.util.webcam fr.imag.adele.osgi.util.consumerservlet wa -c fr.imag.adele.osgi.util.clock fr.imag.adele.osgi.util.consumerservlet wa -wThen browse this URL http://localhost/wa/poll and click on "Image"
stop 12Then browse again (refresh) this URL http://localhost/wa/poll
Typical Usages
Tested gateways
Tested WebCam
TODO (contributions are welcome)
Links
Notice
I get the source from these JMF articles
Mobility BSD License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistribution in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Sun Microsystems, Inc. or the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You acknowledge that this software is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility.