Streaming Video Signals for Motion Analysis
Overview
Video test systems typically use a still frame image for measurements, but analysis of a still frame image cannot test for all possible problems. For example, an algorithm you use for decompression, scaling changes, or other signal processing may exhibit errors only after you have generated several images, which requires moving test patterns. In these tests, streaming video data for later analysis is very useful, but it also presents many challenges. Once you have acquired data, you need to make sure the interface bus you use to transfer the data has sufficient bandwidth for the video signal, which contains a lot of data. In addition, these data intensive video signals often require significant storage. This paper examines how to overcome these challenges.
Table of Contents
Streaming Video Signals
By streaming video signals, you can automate full motion analysis. Traditionally, an operator watches several seconds of a video clip to perform this analysis, which is inefficient and prone to error. While this technique is often undesirable, many manufacturers have continued to use it because the custom solutions for this functionality are expensive, and commercial solutions do not exist.
Because video data usually requires acquisition with a high clock rate (usually 100 to 200 MHz) to accurately capture the data, acquiring a still frame of video data can require several megabytes of onboard device memory. With some sources transmitting high-definition video at 60 fps, you cannot acquire a sufficient length of video for moving video analysis using onboard memory. The only alternative is to continuously transfer the data from the device for the necessary length of time. Most commercial buses do not have the bandwidth to sustain the necessary rates for continuous data transfer. For example, both Ethernet and USB fall well short on this bandwidth requirement. Even the PCI bus, which can sustain approximately 100 MB/s continuous throughput, is not up to this task. However, the next-generation PCI Express offers 1 GB/s theoretical throughput using a x4 lane, which provides the necessary increase. PXI Express instruments, built on PCI Express technology, meet the challenges of this task.
PXI Express Hardware
National Instruments offers PXI Express hardware for streaming both analog and digital video signals. You can use these modules for both still frame and motion analysis because they combine efficient acquisition hardware with the high-bandwidth PXI Express bus and their functionality is user-defined. The NI PXIe-5122 digitizer can acquire data at up to 100 MS/s on two channels. It also offers 14-bit resolution, which provides the necessary accuracy for video signal acquisition. This digitizer can sustain data transfers at the full 100 MS/s on both channels, totaling 400 MB/s. For video generation, the NI PXIe-5442 arbitrary waveform generator can sustain the full 100 MS/s output rate on a single channel to generate much longer test signals than traditional arbitrary waveform generators. For digital video acquisition and generation, the NI PXIe-6537 can sustain the full 50 MHz clock rate on all 32 channels, which translates to 200 MB/s sustained throughput.
Storing the Streamed Signal
Once you have acquired the data, the next bottleneck in most signal acquisition systems is the hard drive. Considering that most standard computer hard drives can sustain rates only up to 60 MB/s after some configuration optimizations, and a single PXI Express instrument may be transferring data at 400 MB/s, the buffer is quickly overrun. You can overcome this bottleneck using a RAID (Redundant Arrays of Independent Disks) configuration. A RAID array allows sustained read or write rates to scale with the number of hard disks present in the array. For example, the NI HDD-8263 four-drive array can sustain 200 MB/s across its full 1 TB capacity, and the NI HDD-8264 twelve-drive array can sustain 600 MB/s across 3 TB. With the combination of PXI Express hardware and RAID systems, both high-throughput acquisition and record and playback systems are possible.
Streaming Software
When data transfers to and from instruments are being sustained at the rates described above, you need to make some software considerations. While most RAID systems are seen as a normal disk through the Windows OS, writing at very fast rates can cause some potential problems because of the caching during memory reads and writes that is normally turned on by default in the operating system. One way to overcome this challenge is by using special calls into the Win32 libraries using the Win32 File I/O Library, which provides a group of functions in NI LabVIEW software to easily read and write customized files. As data is passed at these very high rates, the application architecture can also cause data overflows. A producer/consumer loop architecture can help solve this problem, allowing for more robust streaming of data between the PXI Express modules and the RAID array.
Conclusion
While acquiring multiple data frames for motion video analysis has traditionally been difficult and required expensive custom hardware, new technologies can help you use less expensive, commercial technology to achieve this task. By combining PXI Express instruments and RAID hardware with efficient software, you can continuously sustain high acquisition and generation sample rates, and test systems can meet the needs of motion video tests.
Additional Resources
Video Test Reference Architecture
Webcast: Integrated Video Test Systems Using NI Products
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
