Acquisition Flow

NI-IMAQdx

Acquisition Flow

This section describes the basic steps of performing an acquisition with the NI-IMAQdx software. The basic steps are initialization, configuration, and acquisition.

Opening a Camera Session

To acquire images using the high-level or low-level functions, you first must open a camera session. A camera session is a process-safe handle to a camera. A process-safe handle is a handle that allows only one process to access a camera at any given time. The driver uses a camera session to identify the camera to which further NI-IMAQdx functions apply. You can simultaneously open as many camera sessions as there are cameras connected to your system.

When opening the camera session, you need to specify two parameters: camera name and camera control mode.

Camera Name

NI-IMAQdx references all camera sessions by a name. The driver creates default names for each camera in your system in the order that the cameras are connected. The names observe the convention shown in the following table.

Camera Name Camera Installed
cam0 Device 0
cam1 Device 1
... ...
camn Device n

Every camera has an .iid interface file and an .icd camera file.

  • Interface files—Interface files store information about which physical camera is associated with a camera name. Each interface file can be used by only a single camera.
  • Camera files—Camera files store all the configurable attributes. Camera files can be shared between identical cameras. Use MAX to configure the default state of a particular camera.

Camera Control Mode

The camera control mode parameter has two options: controller and listener. The default option—controller—controls the camera and receives video data. The listener only receives video data. Use the listener option in broadcasting applications.

Refer to Broadcasting in Advanced Programming with NI-IMAQdx for more information about broadcasting.

When an application is finished with the camera, call the Close Camera function to close the camera session.