NEESgrid logo

Inexpensive Image & Video Capture with LabVIEW

As part of the System Integration effort, we are working on two related problems:
  1. Video as data
  2. Synchronizing frame capture with other experimental data

Telepresence

The telepresence system captures video that is designed for remote viewers to feel 'present' during an experiment. It isn't designed to provide data-grade frame or video capture. However, several sites have expressed a desire to better integrate image and video data into the NEESgrid system.

Firewire

One candidate solution is a commodity interface called 'Firewire', 'iLink' or 'IEEE-1394'. It's a 400 (or 800) MBit/sec serial interface, with well-defined protocols for storage, video and so forth. It is commonly found on digital video cameras, external hard drives, MP3 players, Macintoshes and some PC laptops. Add-in cards (PCI or PCMCIA) are under forty dollars as of Jan 2003, and Windows 2k & XP support it nicely.

Software and Hardware

National Instruments has a toolkit for Firewire image/video capture that integrates easily into your code. It's called 'NI-IMAQ for IEEE 1394' and costs $595 USD. We've tested with the following ('webcam') cameras:
  1. Orange Micro iBot, about $100. This has problems and is not recommended. The initial oversaturation limits frame grabbing significantly; I've confirmed the problem with NI's tech support. More details at this page.

    Code to grab single frames from the iBot is at this link. As noted, the frame rate is quite limited.

  2. Pyro 1394 Webcam (API-203), $90. This works if you set 'Ignore first frame' in Measurement and Exploration / Devices and Interfaces / cam0 / Properties / Video Parameters.

    For code, use the 'Snap in Picture Control' example that ships with the IMAQ toolkit.

  3. Sony DVMC-DA2 'Media Converter'. This is a box that digitizes NTSC or PAL video into DV format. This does not work with the NI-IMAQ drivers.
  4. Canon ZR-50 DV Camcorder. Also does not work with NI-IMAQ.

For a camera to be supported, the host adapter must be OHCI compliant, and the camera must support the IEEE-1394 DCAM specification. See this NI page for more details on camera support.

The IMAQ 1394 software is presently Windows-only. As the current NEESgrid DAQ spec calls for Windows, this is a non-issue for most sites.

Streaming Captured Video / Frame Data Using the NSDS

Since the pictorial data is already digitized by the time LabVIEW sees it, we can easily stream its data along with the conventional experimental data using the SI code. I will work with the Metadata team at NCSA to determine an appropriate ASCII format, and can write code if there is interest from the equipment sites.

DAQ Synchronization

One concern is how closely the frames can be synchronized to the experimental data. The IMAQ toolkit has triggering features that we have not yet explored; I would estimate that sync on the order of 1-50 milliseconds should be feasible.

Recommendations

The IMAQ toolkit is a good and reasonably priced solution for simply integrating commodity video capture into your DAQ code. Further exploration is needed in synchonization with DAQ data and support for other cameras.

Please send your comments and results to the System Integration mailing list.

Navigation links

  • Back to MCS NEESGrid page
  • 'NI-IMAQ for IEEE 1394' toolkit
  • Support

    This work was supported primarily by the George E. Brown, Jr. Network for Earthquake Engineering Simulation (NEES) Program of the National Science Foundation under Award Number CMS-0117853.