National Instruments IEEE 1394 用户手册

下载
页码 61
Chapter 3
Advanced Programming with NI-IMAQ for IEEE 1394 Cameras
© National Instruments Corporation
3-3
Next, start the listener(s). On the listening computer, open your camera 
interface with the 64-bit unique identifier of the target camera, which you 
can find in the General tab in MAX. The controller can get a unique ID and 
send it to the listener sessions. Additionally, you must set the listener 
camera control mode parameter. 
At this point, both the controller and listener systems are acquiring the 
same live data from the same camera. When running as a listener, most 
attributes—such as the camera features, video modes, or Format 7 
acquisition parameters—are read-only. No camera feature or control is 
accessible when running as a listener system. Attempts to set these 
attributes result in the following error: Attribute not writable.
There is no synchronization between the controller and the listener host 
computers provided by the low-level driver. The user must start the 
controller before starting the listener. If the camera is not transmitting data 
when the listener initializes, the session returns the following error: No 
acquisition in progress. If the controller stops the video feed of the camera, 
the listener times out.
Scalable Image Size
IEEE 1394 digital cameras support a predefined set of image sizes, which 
you can select through the Video attributes in MAX. Refer to your camera 
documentation for a list of supported formats.
If you are using LabVIEW, the NI-IMAQ for IEEE 1394 Cameras software 
recognizes the predefined formats and automatically allocates enough 
memory to accommodate the image. If you use C or C++ with NI-IMAQ 
for IEEE 1394 Cameras functions, you must know the size of the image for 
the selected format and mode to allocate enough memory to contain the 
image. Obtain the size of the image using the Image Width, Image 
Height
, and BytesPerPixel attributes.
Some IEEE 1394 cameras support Format 7, which allows you to define the 
size of the acquired image. If you use this format, you must input the image 
size using the Rectangle parameter in C and C++. The size and position of 
the sub-image you are acquiring must be a multiple of the attributes Unit 
Width
 and Unit Height, as shown in Figure 3-2, or the driver acquires the 
smallest sub-image that contains the ROI you defined.
The Unit Width and Unit Height values are camera-specific. Refer to the 
camera documentation or query the Unit Width and Unit Height attributes 
to obtain the actual values.