4.6
Programming
Depending on the target application, the user can choose between several ways of accessing and controlling the camera. These can be
divided into two categories: a programmatic approach, through programming code, or an integrated approach, through a supported, GUI
based software package. The programmatic approach is generally used for the development of a custom application or image processing
pipeline. The integrated approach is favored, if the specific toolset of a certain software package is sufficient and the camera serves as an
integrated capture device.
4.6.1
Standard interface
As an alternative to the proprietary API, the camera can be accessed through a set of standard interfaces. These interfaces decouple a
specific hardware design (e.g. physical interface) of a camera from its control in software. Therefore, multiple camera classes and types
can be used in a unified way.
GenICam/GenTL
provides a camera-agnostic transport layer interface to acquire images or other data and to communicate with a device.
Each camera serves as a GenTL Producer which can be accessed in all software packages that are compatible with the GeniCam standard,
as well as through custom developments which implement this standard interface. For more information on programing according the
GenICam standard, please visit the standard’s website at
http://www.emva.org/standards-technology/genicam/
4.6.2
xiAPI
xiAPI stands for XIMEA Application Programming Interface. It is a common interface for all XIMEA cameras.
Architecture
API is a software interface between the camera system driver and application.
•
On Windows: xiAPI is compiled into xiapi32.dll or xiapi64.dll
•
On Linux: xiAPI is compiled into /usr/lib/libm3api.so
Installation
xiAPI is part of all current XIMEA software packages for Windows, Linux and MacOS. For information on the software packages, see
.
xiAPI functions description
The core of xiAPI consists of the following functions, which allow controlling of the camera functionality.
// get the number of discovered devices.
XI_RETURN xiGetNumberDevices(OUT DWORD *pNumberDevices);
// open interface
XI_RETURN xiOpenDevice(IN DWORD DevId, OUT PHANDLE hDevice);
// get parameter
XI_RETURN xiGetParam(IN HANDLE hDevice, const char* prm, void* val,
DWORD * size, XI_PRM_TYPE * type);
// set parameter
XI_RETURN xiSetParam(IN HANDLE hDevice, const char* prm, void* val,
DWORD size, XI_PRM_TYPE type);
XIMEA Technical Manual, Version: v240108
84