Archived: Variable Height Acquisition with Line Scan Cameras

Publish Date: Jan 07, 2019 | 8 Ratings | 4.25 out of 5 | Print | 1 Customer Review | Submit your review

Overview

This document has been archived and is no longer updated by National Instruments.

Table of Contents

  1. Description
  2. Common Applications
  3. What To Expect

1. Description

This document discusses how to acquire a variable number of lines from a line scan camera in LabVIEW and C. Examples are available in both LabVIEW and LabWindows/CVI.

When performing a line scan application, the exact size of the object being imaged is sometimes unknown. A good example is a conveyer belt application that requires continuous acquisition of objects of varying sizes. For such applications, the triggered acquisition mode on National Instruments' digital image acquisition (IMAQ) devices allows you to acquire a variable number of lines in a multiple-buffered application.

In this mode, the trigger you supply the PCI-1424 or PXI/PCI-1422 is asserted when you want to begin capture. The IMAQ device continues to acquire lines until the trigger is unasserted. Once the acquisition is complete, the driver returns the number of lines acquired. Using the variable line mode, you acquire only the amount of data you need, which greatly enhances performance by minimizing the total amount of data to process and store.

Setup for Acquiring a Variable Number of Lines
To set up your system for acquiring a variable number of lines, first determine the size of the largest possible object to image. The NI-IMAQ driver software defines image dimensions by width and height. Width is the number of pixels per line, and height is the number of lines in the image.

NI-IMAQ uses the height information to allocate buffers where each image will reside. This allocation occurs before the acquisition begins to ensure that memory is available on the system.

After determining the maximum possible object size for your application, enter the height (in lines) into Measurement & Automation Explorer (MAX) as follows:

  1. Launch MAX.
  2. Go to Devices and Interfaces»PCI-142x and select your camera.
  3. Click the Properties button.
  4. In the Height control, enter the maximum possible number of lines.
  5. Click OK.


Implementing Code
Implementing the code for acquiring a variable number of lines varies depending on whether you use LabVIEW or C, but the concept is the same for both. Perform the following general steps:

  1. Enable the Variable Height Acquisition attribute or property.
  2. Configure your buffers.
  3. Set up your trigger to Trigger Each Buffer.
  4. Begin acquisition.
  5. Check actual height for each buffer during the acquisition.


  • In LabVIEW
    To acquire a variable number of lines from a line scan camera in LabVIEW, you must have NI-IMAQ 2.5 or higher.

    Once these files are in place, run the LL VHA Ring.vi example program to see an example of a continuous variable height acquisition.
  • In CVI
    To perform VHA in CVI or any C compiler, you must have NI-IMAQ 2.2.1 or higher.

    Once these files are in place, run the VHA Ring.prj project to see an example of a continuous variable height acquisition.

    Back to Top

    2. Common Applications

A common application is a conveyor belt on which objects to be imaged are of variable or unknown dimensions.

Back to Top

3. What To Expect


The result is one image for each object passing an inspection point. These images contain only the objects, and not the space between objects.

Back to Top

Customer Reviews
1 Review | Submit your review

  - Jun 1, 2010

Is there a ImaqDX version of this example in the example library ?

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit