Notation, Libraries and Other Useful Info
Controlling a PixeLINK camera with the PixeLINK API, from connection of the camera until disconnection, follows this basic strategy:
- Select and initialize a camera
- Determine and set camera features
- Retrieve image data for processing as required
- Uninitialize the camera
Note: A camera cannot be controlled by more than one application at once. See the PixeLINK Camera Specifications for limitations on the number of cameras that can be connected or operated at a time.
Selecting and Initializing the Camera
The API functions allow an application to control multiple cameras simultaneously.
- Use the PxLGetNumberCameras or PxLGetNumberCamerasEx function to determine the number of the cameras connected to the system and the serial number of each camera.
- For cameras with GigE interfaces that do not have a IP Address, use the PxLSetCameraIPAddress to set the IP address. Then call PxLGetNumberCameras again to get the serial number information.
- Use the PxLInitialize function to initialize and access a specific camera, identified by its serial number. The PxLInitialize function returns a “handle” for the camera, which is used to identify it in other function calls. Repeat for the desired number of cameras.
Determining, Setting, and Getting Camera Features
Each camera supports a subset of the list of available camera features. The specific features supported by the camera are encoded in the camera hardware and listed in the Programmable Features section of this Knowledge Base.
The PxLGetCameraFeatures function allows the application to enumerate the list of features applicable to the camera and the range of values appropriate for each feature.
Camera features and their properties are passed as parameters in two generic functions, PxLSetFeature and PxLGetFeature. These functions access the camera to set and get the camera feature properties.
- Use the PxLGetCameraFeatures function to enumerate the features of a specified camera. PxLGetCameraFeatures also returns the ranges of these features.
- Use the PxLSetFeature and PxLGetFeature functions to set and get settings and properties of specific functions on the camera.
The following features can only be set if the stream state is turned off (STOP_STREAM) or paused (PAUSED_STREAM). See PxLSetStreamState.
Applying and Managing Sets of Camera Feature Properties
Feature properties stored in non-volatile memory
Sets of feature properties returned during image acquisition
In addition to the image data, PixeLINK API’s the image acquisition process returns the set of camera feature properties applied to each frame and stores them in a buffer or in the PixeLINK data stream file. This set of properties, called a descriptor, can be passed from function to function for informative purposes.
Applying sets of feature properties automatically on a frame-by-frame basis
Using advanced features in the API, user-defined descriptors can be created and loaded into the camera. Multiple descriptors can be defined and applied automatically on a frame-by-frame basis.
Uninitializing the Camera
Call PxLUninitialize to uninitialize the camera.
While a camera is uninitialized, it is in a standby state. It draws power, but it does not collect image data or act on function calls except for PxLGetNumberCameras, PxLGetNumberCamerasEX and PxLInitialize.