Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
3 ratings:
 2.66 out of 5     Rate this Document

Why Am I Not Acquiring Images at the Expected Frame Rate of My Camera?

Primary Software: Driver Software>>Vision Acquisition Software
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I can't acquire images at the full frame rate of my camera. What might be causing this?

Solution:
The following are situations in which you may not be acquiring at the full frame rate of your camera:

Acquisition across MXI-3
Consider a setup using two PXI-1422 Image Acquisition devices connected to using MXI-3 where neither board will acquire at the full frame rate of the cameras. The system delay is found in the DMA link process. This occurs after each frame is acquired and must finish before the next frame begins. These DMA links are processed before each frame to configure the IMAQ board for the next image. When using MXI-3, these DMA links take longer to fetch across the PCI bus from the computer to the IMAQ board, so there needs be a longer period between frames. With high speed cameras, there isn't enough time between frames to fetch and process these links, so we miss every other frame. To avoid missing every other frame, you can decrease the frame height to make the blanking period between images longer.

If you do not need continuous acquisition, then you can configure the framegrabber to save the frames to the onboard memory buffer rather than immediately transferring the frames to computer memory with DMA. Using the onboard memory the framegrabber could grab a finite number of 640 X 480 frames at the full frame rate to its onboard memory. Then you could download the frames at a slower rate to the PC memory and hard drive. When using the onboard memory buffer, the framegrabber uses interrupts to transfer data instead of DMA, so the transfer from PC memory to the hard drive is slower, but this will eliminate the DMA transfer problem. The NI PXI-1422 has an onboard memory of 16MB, which will allow you to save approximately 50 images from a camera sending frames that are 640x480. This is equivalent to approximately 0.4 seconds worth of images.

Parallel Digital Camera Acquisition
If, for example, you are using a digital camera that outputs at 120 Hz and has a short blanking period but are only obtaining 60 frames per second, your camera is missing every other frame because of the short blanking period. You can set a camera file attribute, FastRearm(Yes), which allows the camera to start preparing for the next frame after the ROI falls instead of the FVAL (frame valid signal), therefore increasing the time for preparation. (The ROI should be set a few lines shorter then the full height.)

Note: There is a negative side to setting this attribute that should be noted. When a camera requires a frame readout pulse from a control line the FastRearm attribute may cause this to happen to early, causing a timeout.

If acquiring images from the same digital cameras using different IMAQ 1424 boards, some of the cards may acquire at the full frame rate, while others appear to only acquire continuously at a lower rate.

If you are experiencing different performance among several of the same model parallel digital IMAQ cards, be sure to check that voltage level of the board matches you camera. National Instruments offers versions of the parallel digital IMAQ boards for both TTL/RS-422 and TTL/LVDS. Also, verify that you have the latest version of the NI-IMAQ driver, which is contained within the Vision Acquisition Software pack. A download link is provided in the Related Links section below.

If you are still experiencing discrepancies in performance among the boards, please contact National Instruments support engineers for assistance.

IEEE-1394 (FireWire) Camera Acquisition
High frame rates may not be achieved because the camera is not sending all of the frames. To achieve the maximum frame rates specified for these cameras, the shutter speed must be increased so that each frame can be completed in time. This is an attribute that can be adjusted in Measurement and Automation Explorer (MAX). Also, make sure that the camera is in the appropriate video mode. Many times for a camera to reach its specified maximum frame rate it must be in Format 7 mode.

Sometimes while acquiring images from an IEEE-1394 (FireWire) camera on a laptop, it is only possible to acquire 15 frames per second. This can be fixed by using a National Instruments PCI-based image acquisition cards with a PCI-PCMCIA adapter.

A slower frame rate can also be the result of upgrading to Windows XP Service Pack 2 or 3. After upgrading, the frame rate is limited by the OS to 100Mbps. Prosilica has provided a utility that corrects this behavior and lets 1394a/b devices work at their highest possible speeds; see the Related Links section below regarding slower frame rates.

Analog Acquisition
When acquiring from multiple cameras that are not synchronized on a multi-channel vision acquisition device, slower frame rates will be visible. This is because the board needs to be reconfigured between each acquisition to switch cameras or channels. See the Related Links section below on multi-camera acquisition.

Triggered Acquisition
Low-level Triggered Acquisition with IMAQ is only about half of what the expected triggered frame rate should be. For example, a camera is capable of acquiring 15 frames per second and is using the rising edge of a 15 Hz pulse train to trigger each image buffer will result is not 15 frames per second, but only 7.5 frames per second.

This behavior is due to the fact that in normal operation mode, the camera will continuously send frames out at a given rate (camera dependent). When the IMAQ board receives an external trigger, it will capture the next valid frame available. In other words, if the camera is in the process of sending an image when the trigger is received, the IMAQ board must wait until the next full frame is available before it can be acquired.

However, if the IMAQ board receives a trigger while an image acquisition is in progress, that trigger will be ignored. Additionally, if the IMAQ board receives the next trigger after the camera has started sending the next frame, it will again have to wait to capture the next full frame. If the trigger frequency is close to the frame rate, there is a chance that the triggers could be offset enough that the next trigger occurs during the acquisition of a previous frame, resulting in every other trigger is ignored. Thus, unless the IMAQ board receives each trigger at the exact instant when the current acquired frame is complete and immediately before the camera begins to output a new frame, you will only be able to acquire externally triggered images at roughly 1/2 the rate the camera is outputting frames.

If the camera supports asynchronous reset mode it can be used to assure that an image will be acquired when each trigger is received (assuming the trigger frequency is within the limits of the camera). In asynchronous reset mode, the camera will begin outputting a new frame when an asynchronous reset pulse is received. That way, every time the IMAQ board receives a trigger, the camera will start sending a new frame rather than finishing the current frame it is outputting.

For more information on using asynchronous reset mode, refer to your camera's documentation and the items linked below.

Related Links:
Drivers and Updates: Vision Acquisition Software
Developer Zone Tutorial: Advanced Analog Triggering and Synchronization Techniques
Developer Zone Tutorial: Factors to Consider when Triggering
Developer Zone Tutorial: Asynchronous Reset with the IMAQ PCI/PXI-1408
Developer Zone Tutorial: Multi-Camera Acquisition
Developer Zone Example: Asynchronous Reset with the IMAQ PCI-1424
Support: NI Vision Acquisition Support
KnowledgeBase 3J0A446W: NI-IMAQ for 1394: Slower Frame Rate After Upgrading to Windows XP Service Pack 2 or Later

Attachments:





Report Date: 01/05/2005
Last Updated: 02/05/2009
Document ID: 3H49K1L6

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit