Technical Report NEESgrid-2004-31
www.neesgrid.org
Draft Whitepaper Version:
1.0.2
Last modified: September 9,
2004
Connecting cameras to the Data
Turbine
Paul Hubbard1
1 Argonne National Laboratory
Feedback on this document should be directed to hubbard@mcs.anl.gov
1. Summary...................................................................................................................... 2
2. Revision History.......................................................................................................... 2
3. Introduction – the Role
of the Data Turbine in NEESGrid........................................... 3
4. Video versus image
data: What’s the difference?......................................................... 3
5. What can I do once the
images are in the turbine?........................................................ 3
6. What about audio?....................................................................................................... 4
7. What about
Pan-Tilt-Zoom (PTZ) heads?.................................................................... 4
8. What about shutter
control for jcamera?....................................................................... 4
9. Supported image sources............................................................................................. 4
10. Increasing
the amount of memory for the turbine..................................................... 5
11. Code
Access, Mailing List and Bugzilla Archive...................................................... 5
12. Testing,
Benchmarking and Profiling....................................................................... 6
13. How to Get
Started................................................................................................... 6
This report documents how to interface a digital camera, frame grabber or telepresence system into the Data Turbine, and thence NEESGrid. Also covered are uses of the live data, debugging tools, and interface methods.
Initial release: September 2, 2004.
1.0.1: Added JPG-via-URL.
1.0.2: Added JVM memory, note about Tomcat and WebDAV.
The Data Turbine, sometimes referred to as ‘RBNB’ for Ring-Buffered Network Bus, is a commercial Java-based program that handles data streaming, archiving, synchronization, plugins, and many other features. It’s free for non-commercial use, and we’ve negotiated and OEM redistribution license and some enhancements as well. It’s a replacement for the NSDS in v3.0.
Due to its power and flexibility, is continues to assume a larger role in the NEESGrid code. For example, we now have a program that will assemble video into a DAQ-synchronized Quicktime movie based on DAQ events!
To the data turbine, all data is a discrete series of time-stamped items. In our case, those items (aka datum, plural data) are JPEG images. Since a series of single-frame digital images resembles a video telepresence stream once they’re inside the turbine, this document has to clarify the terminology a bit.
Here, video refers to a series of images, captured at a constant sample rate. For example, a QCIF stream (320x240) at 30 frames per second (fps) would be considered a video stream. A 5megapixel source, capturing every 10-30 seconds, would not.
The distinction is purely semantic. The differences are in the resolution and frame rate. However, once the data is in the turbine, there’s no other difference.
There are a wide variety of things you can do with the image data once its in the turbine. If you find another innovative use, please share it with us!
All of these are documented at http://www.mcs.anl.gov/neesgrid/rbnb-apps.html
One of the items that is being worked on is audio support for the turbine. A previous distribution included demonstration programs for this, but the support was subsequently removed. Part of our contract with Creare includes audio, so its return is only a question of time. Adding audio makes many other applications possible: telepresence, audio capture and recording for experiments, etc.
I have preliminary code that controls a PTZ head connected to any Axis unit; this code is pre-alpha and not ready to release. Keep an eye out for beta releases.
This is trickier, since Jcamera is a first-class NTCP application. To make this work inside a web application, we have to convert the NTCP client into a Java applet. We’re working on the idea, but we don’t yet know if it’s possible to do.
There are several disparate methods for getting JPEGs into the turbine. Here are the ones supported as of 9/2004:
These sources connect to the turbine in a wide variety of ways: PCI bus, TCP/IP, etc.
By default, Java gives 256MB of memory to the virtual machine running the turbine. While more than enough for most java programs, it’s often useful to increase this to allow for more channels and longer time histories. To do so, edit
/usr/local/nees/etc/rc.d/init.d/rbnb
and change
java -jar lib/rbnb.jar &
to
java -Xmx1024M -jar lib/rbnb.jar &
Or whatever you want; this example allocates 1024MB (1GB) to the Turbine. We've used up to 1500MB on a 2GB machine with no problems.
You'll have to restart the turbine for the change to take effect.
CVS access to the NEESgrid code archive is documented at http://www.mcs.anl.gov/neesgrid/cvs.html. A Bugzilla archive for logging and tracking bugs and feature requests is available at http://bugzilla.ncsa.uiuc.edu/neesgrid.
More information about our use of the Data Turbine can be found at http://www.mcs.anl.gov/neesgrid/turbine/ and http://www.mcs.anl.gov/neesgrid/dtpatterns/
a) RBNB Admin is a good way to view what channels are present in the Turbine, show listeners, and so forth.
b) RBNB Plot can also show live server statistics
c) It’s easy to find channel names with Admin, and then test them with rbnbjview.
d) For fast testing, the URL syntax is very useful.
e) On the server running the turbine and/or applications, Unix tools such as top and ps are useful to find CPU usage.
Given the variety of possible image sources, getting started is a matter of budget and priorities. Probably the easiest thing to do is
This gets you into the milieu at zero cost and minimal time. You can then try other image sources, such as Axis or FlexTPSSource, to see how they work.
Next, I’d suggest looking at the thumbnailer to get an idea of the possibilities.
Have fun!