IMAQ Video Stream Benchmark on NI CompactDAQ Controllers

Publish Date: Apr 13, 2017 | 1 Ratings | 3.00 out of 5 | Print

Overview

This document summarizes the results of the performance benchmark for acquiring images with the high-performance NI cDAQ-9138 and NI cDAQ-9139 controllers. Specifically, this document shows what data acquisition sampling rates can be achieved while acquiring images at a specified frame rate. The benchmarking was done with three different image storage devices: CFast, USB hard drive, and USB thumb drive.

Table of Contents

Setup

The hardware and software used for the benchmarking is listed below.

Hardware

  • NI cDAQ-9139 NI CompactDAQ controller
  • NI 9401 Digital I/O Module—With 32 bits on the port and eight channels per port, this yielded four bytes per sample.
  • AVT Manta G 032C GigE Camera—The resolution of this camera is 656x492 Bayer 8 color. Each image takes up approximately 315 kB on disk.
  • Seagate Free Agent Go Flex—500 GB USB hard drive
  • Lexar JDFF4GB—4 GB USB thumb drive

Software

LabVIEW Code

Figure 1. Block diagram of the code that acquires the image and writes it to a binary file

Results

Image Logging to CFast

Figure 2 shows that when logging the images to CFast, the maximum frame rate of 80 frames per second (FPS) was achieved while still acquiring data at 30.5 MB/s.

Figure 2. FPS versus sample rate when storing the image files to CFast

Image logging to USB Hard Drive

Figure 3 shows a curve that specifies the maximum acquisition rate that can be achieved for a given frame rate when logging the images to a USB hard drive. Anything under the curve (blue) is an achievable acquisition rate for a given frame rate. Anything outside of the curve (white) is not possible.

Figure 3. FPS versus sample rate when storing the image files to a USB hard drive

Image Logging to USB Thumb Drive

Figure 4 shows a curve that specifies the maximum acquisition rate that can be achieved for a given frame rate when logging the images to a USB thumb drive. Anything under the curve (blue) is an achievable acquisition rate for a given frame rate. Anything outside of the curve (white) is not possible.

Figure 4. FPS versus sample rate when storing the image files to a USB thumb drive

Example Program

The code used to store the images to a binary file and then convert the file into colored images is attached. Use Stream binary video to disk.vi to acquire the images and save them to a binary file. Use Read binary video from disk.vi to open the binary files, convert them into colored images, and save the images. Be aware of the following when using the code:

  • The camera must be configured to Bayer 8.
  • Depending on the camera, the Bayer decoding may need to be changed to properly convert the file into a color image.
  • When opening Stream binary video to disk.vi, LabVIEW may not be able to locate CalculateFPS.vi. It is located at <Program Files>\National Instruments\LabVIEW 2012\examples\IMAQ\IMAQdx Examples.

Summary

  • Logging the data to the internal CFast storage gives the best performance though the total memory is limited to 32 GB.
  • The USB hard drive is good for acquisitions that span a long period of time due to the large amount of memory available. This write speed is limited by the speed of the USB hard drive and is generally around 35 to 40 MB/s.
  • The USB thumb drive had very low performance with a maximum frame rate of 3 FPS. It is possible to get a higher frame rate if a higher performance thumb drive is used.

Related Resources

Read the tutorial: Image Streaming to Binary File (With Backlog)

Download NI Vision Acquisition Software

See pricing and specs for stand-alone NI CompactDAQ

Back to Top

Bookmark & Share


Downloads


Ratings

Rate this document

Answered Your Question?
Yes No

Submit