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

What is the Maximum Image Size I can Acquire with my Digital Camera?

Primary Software: Driver Software>>NI-IMAQ
Primary Software Version: 3.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Image Acquisition (IMAQ)>>Digital Image Devices>>PCI-1422, Image Acquisition (IMAQ)>>Digital Image Devices>>PXI-1424, Image Acquisition (IMAQ)>>Digital Image Devices>>PXI-1428, Image Acquisition (IMAQ)>>Digital Image Devices>>PCI-1428, Image Acquisition (IMAQ)>>Digital Image Devices>>PXI-1422, Image Acquisition (IMAQ)>>Digital Image Devices>>PCI-1424

Problem: What is the Maximum Image Size I can Acquire with my Digital Camera?

Solution: Previous to NI-IMAQ 3.0, the maximum image size that could be acquired with an IMAQ image acquisition device was limited by the onboard memory of the IMAQ device. With NI-IMAQ 3.0, a new feature was introduced to accommodate cameras that have large image sizes. This new mode treats the onboard memory as a FIFO rather than a full frame buffer. The IMAQ device will automatically use this new feature when it cannot fit the full buffer list of a continuous acquisition in onboard memory. To calculate the amount of memory required by your buffer list use the following equation:

width * height * bits/pixel * number of images = memory required

Note: number of images for a grab is three.

The amount of onboard memory available for your hardware can be determined in Measurement & Automation Explorer (MAX) by going to Device and Interfaces » NI-IMAQ Devices and clicking on your IMAQ Device. The window on the right will display the amount of onboard memory for your device. This new mode allows you to acquire any size image provided that the image's line width fits into onboard memory and your computer has enough memory for the the buffers you need to allocate.

In most cases, there will be no difference when using this mode. One of the important differences though, is that if you do not process the images fast enough the images will get split. This occurs when you extract an image and keep it extracted while the acquisition continues to acquire images. If you have an image extracted and acquire more images than there are allocated buffers, the onboard memory will get overwritten and will produce split images. With previous versions of the driver, you would not be able to acquire images this large. Attached is a sample of what the split frame might look like.

Split frames can occur when acquiring images that don't fit in the onboard memory of the IMAQ device. Split frames typically happen on slower computers, or computers with the video card on the PCI bus instead of the AGP bus. If the user is moving the window around or using the scroll bar excessively this can also cause the problem because the processor doesn't call IMAQ Extract quickly enough. Using highlight execution mode in LabVIEW or debugging can also cause this problem because the extract isn't called quickly enough. Some things to do to help avoid split frames include:
  • Making sure your video card is on a AGP bus, this will help free up the PCI bus for image data.

  • Use a system with a fast processor and lots of RAM to help run your code quickly.

  • Make sure to extract the lastest image and not just extract them sequenctially if your application allows for this.

  • If there are periodic delays that cause the split frames, you can try increasing the number of buffers in the buffer list to allow for more time to catch up before the onboard memory gets overwritten. If your application can't keep up, even with more buffers, reduce the number of buffers in your list or the size of your images so the acquisition doesn't use this mode. In the regular mode, you will just lose frames if you don't extract them quickly enough, and you can check the Lost Frames property to know when you lose frames.

  • Launching dialogs from the same loop/thread as your acquisition will stop the acquisition until the dialog closes (like a file dialog for saving images). Make sure these dialogs are in a different loop/thread than your acqusiition.

  • IMAQ Copy can be used instead of IMAQ Extract. This method is slower since it will copy all of the data to a user image, but the buffer will not be extracted while you process the copied image, so the acquisition can continue without overwriting onboard memory.

  • Use a snap or sequence instead of a continuous acquisition if your application allows for this.


Related Links:

Attachments:


Split Image.jpg


Report Date: 08/25/2004
Last Updated: 09/22/2004
Document ID: 3COD1N8M

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