Support Support Home » APIs » XiAPI » XiApi Manual

xiAPI Manual

Table of Contents

Writing Applications with xiAPI

Default parameters

After camera is opened by xiOpenDevice the default camera parameters are set by API. The default parameters might be different in different API versions. In order to ensure that your application will have camera in expected state with any API version - please set all parameters expected by your application to required value.


xiAPI Functions

xiOpenDevice

Description:
This function initializes the device and returns a device handle.

Parameters:
  • DevId - index of the device
  • hDevice - handle to device

C Prototype:

XI_RETURN xiOpenDevice(IN DWORD DevId, OUT PHANDLE * hDevice);

Note: First call of this function enumerates all connected cameras. When the number of cameras is changing during the execution of a program, we recommend you to call xiGetNumberDevices function each time you call additional xiOpenDevice.

xiOpenDeviceBy

Description:
This function initializes the device and returns a device handle. Device is selected according to used enumerator.

Parameters:
  • sel - select method to be used for camera selection
  • prm - string to identify device
  • hDevice - handle to device

C Prototype:

XI_RETURN __cdecl xiOpenDeviceBy(IN XI_OPEN_BY sel, IN const char* prm, OUT PHANDLE hDevice);

Corresponding Enumerator XI_OPEN_BY

type representing value result
XI_OPEN_BY_INST_PATH 0 Open camera by its hardware path
XI_OPEN_BY_SN 1 Open camera by its serial number
XI_OPEN_BY_USER_ID 2 Open camera by its custom user ID
XI_OPEN_BY_LOC_PATH 3 Open camera by its hardware location path

Note1: When the value of the parameter XI_PRM_DEVICE_USER_ID is changed and we want to open the camera with function xiOpenDeviceBy with the value XI_OPEN_BY_USER_ID, it is necessary to do a power cycle on this camera beforehand. This affects only cameras with USB data interface.

Note2: First call of this function enumerates all connected cameras. When the number of cameras is changing during the execution of a program, we recommend you to call xiGetNumberDevices function each time you call additional xiOpenDeviceBy.

xiCloseDevice

Description:
This function will un-initialize the specified device, closes its handle and releases allocated resources.

Parameters:
  • hDevice - handle to device

C Prototype:

XI_RETURN xiCloseDevice(IN HANDLE hDevice);

xiGetNumberDevices

Description: This function enumerates all devices connected and returns the number of discovered devices. It is needed to be called before any other function of API is called by application.

Parameters:
  • pNumberDevices - number of discovered devices

C Protopype:

XI_RETURN xiGetNumberDevices(OUT DWORD *pNumberDevices);

xiStartAcquisition

Description:
This function starts the data acquisition on the devices specified by the handle.

Parameters:
  • hDevice - handle to device

C Prototype:

XI_RETURN xiStartAcquisition(IN HANDLE hDevice);

xiStopAcquisition

Description:
Ends the work cycle of the camera, stops data acquisition and deallocates internal image buffers.

Parameters:
  • hDevice - handle to device

C Prototype:

XI_RETURN xiStopAcquisition(IN HANDLE hDevice);

xiGetImage

Description:
This function waits for next image is available at transport buffer. If available - it does all required image processing (unpack, sensor-defect-correction, demosaic) and fills image information to structure at img parameter. Note: Image processing is not done if XI_FRM_TRANSPORT_DATA is selected. In this case the function just set pointer to transport-buffer without any processing.

Parameters:
  • hDevice - handle to device
  • TimeOut - time interval required to wait for the image (in milliseconds).
  • img - Pointer to image info structure

Note: Allocation of buffers is influenced by buffering policy. See details of behavior at parameter XI_PRM_BUFFER_POLICY.

C Prototype:

XI_RETURN xiGetImage(IN HANDLE hDevice, IN DWORD TimeOut, 
                     INOUT XI_IMG * img);

The image structure XI_IMG description:

bytes field name description
4 size Size of current structure on application side. When xiGetImage is called and size>=SIZE_XI_IMG_V2 then GPI_level, tsSec and tsUSec are filled.
ptr bp Pointer to data. (see Note5*)
4 bp_size Filled buffer size. (see Note6*)
4 frm Format of image data get from GetImage.
4 width width of incoming image.
4 height height of incoming image.
4 nframe Frame number. On some cameras it is reset by exposure, gain, downsampling change, auto exposure (AEAG).
4 tsSec Seconds part of timestamp delivered by camera (at start of read-out phase). Typical range: 0-4294 sec. (See Note1*)
4 tsUSec Micro-seconds part of timestamp delivered by camera (at start of read-out phase). Range 0-999999 us. (See Note1*)
4 GPI_level Levels of digital inputs/outputs of the camera at time of exposure start/end (sample time and bits are specific for each camera model)
4 black_level Black level of image (ONLY for MONO and RAW formats). (See Note2*)
4 padding_x Number of extra bytes provided at the end of each line to facilitate image alignment in buffers.
4 AbsoluteOffsetX Horizontal offset of origin of sensor and buffer image first pixel.
4 AbsoluteOffsetY Vertical offset of origin of sensor and buffer image first pixel.
4 transport_frm Current format of pixels on transport layer.
x img_desc description of image areas and format.
4 DownsamplingX Horizontal downsampling
4 DownsamplingY Vertical downsampling
4 flags description of XI_IMG.
4 exposure_time_us Exposure time of this image in microseconds. (See Note3*)
4 gain_db Gain used for this image in deci-bells. (see Note4*)
4 acq_nframe Frame number. Reset only by acquisition start. NOT reset by change of exposure, gain, downsampling, auto exposure (AEAG).
4 image_user_data See Note7*
20 exposure_sub_times_us See note8*
data_saturation Pixel value of saturation
4 wb_red Red coefficient of white balance
4 wb_green Green coefficient of white balance
4 wb_blue Blue coefficient of white balance
4 lg_black_level In case of multi gain channel readout, the black level low gain channel
4 hg_black_level In case of multi gain channel readout, the black level high gain channel
4 lg_range In case of multi gain channel readout, the valid range of low gain channel
4 hg_range In case of multi gain channel readout, the valid range of high gain channel
4 gain_ratio Gain ration /low gain channel/ high gain channel
Note1: Depending on camera family the TimeStamp is represented as counter:
  • xiQ, xiD: 40 bit microsecond number - (overlaps after 305 hours)
  • xiC,xiB,xiT,xiX: 64 bit 4-nanoseconds number (overlaps after 2339 years)

This counter is converted to image header fields tsSec and tsUSec.
TimeStamp on xiQ, xiD is recorded at the start of Data Readout.
TimeStamp on xiC, xiB, xiX, xiT is recorded at the start of Exposure.
TimeStamp is NOT implemented on some cameras. xiMU (MU9). Image header contains only constant number instead of valid TimeStamp.

Note2: xiQ cameras reports calculated black_level. We do not guaranty the precision of black_level calculation above 50ms of exposure and/or gain above 3dB.
Note3: Some camera models (MQ,MU) might report this exposure time earlier before exposure is applied to image. Cameras with IMX sensors (MC,MX,MT) report value measured by FPGA - this value is systemically lower then value returned by xiGetParam with XI_PRM_EXPOSURE parameter; difference is typically below 20 us.
Note4:
  • Valid only for MQ,MD,MR camera families with the following conditions:
    • If gain parameter is changed while sensor is idle (not exposing nor reading-out) the gain is valid on next image.
    • If gain parameter is changed while sensor is busy (exposing or reading-out) and 'direct_update' modifier is not used, the gain is valid on next image.
    • If gain parameter is change while sensor is busy (exposing or reading-out) and 'direct_update' modifier is used, the gain value in the header might be incorrect after change for next 1-2 images. This is caused by asynchronous setting of sensor registers and frame acquisition process.

Note5: In XI_BP_UNSAFE mode the bp will be set to buffer allocated by API. If XI_BP_SAFE mode the data will be copied to bp, which should be allocated by application.

Note6: When buffer policy is set to XI_BP_SAFE, xiGetImage will fill this field with current size of image data received.

Note7:ImageUserData controlled by user application using ImageUserData or XI_PRM_IMAGE_USER_DATA parameter.

Note8: Array with five sub exposures times in microseconds used by XI_TRG_SEL_MULTIPLE_EXPOSURES or hardware controlled HDR.

GPI_level-Sampling-in-Header

Digital Inputs are sampled on some cameras.
  • MQ: at exposure end
  • CB,MX,MC: at exposure start and exposure end
    The samples are available after calling of xiGetImage using the parameters XI_PRM_GPI_LEVEL_AT_IMAGE_EXP_START, XI_PRM_GPI_LEVEL_AT_IMAGE_EXP_END. See example at the parameters description.

xiSetParam

Description:
This function configures device (see xiAPI Parameters below).

Parameters:
  • hDevice - handle to device
  • prm - parameter name string.
  • value - value that should be set to parameter
  • size - size of value
  • type - data type of value

C Prototype:

XI_RETURN xiSetParam(IN HANDLE hDevice, IN CHAR * prm, IN VOID * value,
                     IN DWORD size, IN XI_PRM_TYPE type);

xiGetDeviceInfoString

Description:
This function returns selected parameter of camera without opening it. It allows to quickly get information from each camera in multiple camera setups.

Parameters:

  • Devid - index of the camera (same as on xiOpenDevice)
  • prm - parameter name string
  • value - pointer to result string
  • value_size - size of string

C Prototype:

XIAPI XI_RETURN __cdecl xiGetDeviceInfoString(IN DWORD DevId, const char* prm, char* value, DWORD value_size);

Note: This function is capable to return only limited set of parameters:
  • XI_PRM_DEVICE_SN
  • XI_PRM_DEVICE_NAME
  • XI_PRM_DEVICE_INSTANCE_PATH
  • XI_PRM_DEVICE_LOCATION_PATH
  • XI_PRM_DEVICE_TYPE

xiGetParam

Description:
This function returns parameters information (current value, minimum, maximum)(see xiAPI Parameters below).

Parameters:
  • hDevice - handle to device
  • prm - parameter name string
  • value - value buffer where result will be stored
  • size - size of value buffer
  • type - expected value type

C Prototype:

XI_RETURN xiGetParam(IN HANDLE hDevice, IN CHAR * prm, IN VOID * value,
                     INOUT DWORD * size, OUT XI_PRM_TYPE * type);


xiAPI Parameters

Each parameter contains of:
  • Description: Describing the parameter behavior
  • Type: Data type used internally for modeling parameter
  • Default: Default value, however it can differ between camera models.
  • Invalidators: List of parameters. Changing any of the listed parameters may lead to the update of value or range (min, max, increment) of the respective parameter.
  • Usage: Example of usage of this parameter in application (C code)

Basic

XI_PRM_EXPOSURE or "exposure"

Description: Current exposure time in microseconds. When parameter is set by xiSetParam the API checks the range. If it is within the range, it tries to find the closest settable value and set it. The actual value can be read by xiGetParam. E.g. Application set exposure time to 1000us, however closest possible value is 1029us (it is typically based on sensor line read-out period). This value is accessible over xiGetParam.

Type: Integer.
Default value: 1000

Usage:

xiSetParamInt(handle, XI_PRM_EXPOSURE, time_in_us);

XI_PRM_EXPOSURE_BURST_COUNT or "exposure_burst_count"

Description: Sets the number of times of exposure in one frame. To finish exposure burst change this parameter to 1 and exposure will be finished by next trigger. See more details in article

Multiple exposures in one frame

Note: This setting is valid only if the trigger selector is set to ExposureActive or ExposureStart.

Supported cameras: MC031xG-SY, MC050xG-SY, MC089xG-SY, MC124xG-SY, MX031xG-SY, MX050xG-SY, MX089xG-SY, MX124xG-SY, MT031xG-SY, MT050xG-SY

Type: Integer.
Default value: 1

Usage:

xiSetParamInt(handle, XI_PRM_TRG_SELECTOR, XI_TRG_SEL_EXPOSURE_ACTIVE);
xiSetParamInt(handle, XI_PRM_EXPOSURE_BURST_COUNT, 5)

XI_PRM_GAIN_SELECTOR or "gain_selector"

Description: Selects type of gain forOn some cameras there is possibility to select analog or digital gain separately. Selector XI_GAIN_SELECTOR_ALL is mapped on most cameras to analog gain.

Type: Enumerator.
Default value: XI_GAIN_SELECTOR_ANALOG_ALL

Usage:

xiSetParamInt(handle, XI_PRM_GAIN_SELECTOR, XI_GAIN_SELECTOR_ANALOG_ALL );

Value Description
XI_GAIN_SELECTOR_ALL Gain selector selects all channels. Implementation of gain type depends on camera.
XI_GAIN_SELECTOR_ANALOG_ALL Gain selector selects all analog channels. This is available only on some cameras.
XI_GAIN_SELECTOR_DIGITAL_ALL Gain selector selects all digital channels. This is available only on some cameras.
XI_GAIN_SELECTOR_ANALOG_TAP1 Gain selector selects tap 1. This is available only on some cameras.
XI_GAIN_SELECTOR_ANALOG_TAP2 Gain selector selects tap 2. This is available only on some cameras.
XI_GAIN_SELECTOR_ANALOG_TAP3 Gain selector selects tap 3. This is available only on some cameras.
XI_GAIN_SELECTOR_ANALOG_TAP4 Gain selector selects tap 4. This is available only on some cameras.
XI_GAIN_SELECTOR_ANALOG_N Gain selector selects North column analog gain. This is available only on some cameras.
XI_GAIN_SELECTOR_ANALOG_S Gain selector selects South column analog gain. This is available only on some cameras.

XI_PRM_GAIN or "gain"

Description: Current gain in dB. When parameter is set by xiSetParam the API checks the range. If it is within the range, it tries to find the closest settable value and set it. The actual value can be read by xiGetParam. E.g. Application set gain to 1.3dB, however closest possible value is 1.35dB (analog gain is typically based on sensor PGA registers capabilities). This value is accessible over xiGetParam.

Type: Float.
Default value: 0

Invalidators: XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING , XI_PRM_BINNING_VERTICAL , XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DECIMATION_HORIZONTAL , XI_PRM_DP_PARAM_VALUE , XI_PRM_HDR , XI_PRM_SENSOR_DATA_BIT_DEPTH

Usage:

xiSetParamFloat(handle, XI_PRM_GAIN, gain_in_db );

XI_PRM_DOWNSAMPLING or "downsampling"

Description: Changes image resolution by binning or skipping. Parameter downsampling_rate controls the mapping of sensor pixels to output data.

Note: Downsampling can be changed only before an acquisition is started.

Type: Enumerator.
Default value: 1

Usage:

xiSetParamInt(handle, XI_PRM_DOWNSAMPLING, 2);

Value Description
XI_DWN_1x1 1 sensor pixel = 1 image pixel
XI_DWN_2x2 2x2 sensor pixels = 1 image pixel
XI_DWN_3x3 Downsampling 3x3.
XI_DWN_4x4 4x4 sensor pixels = 1 image pixel
XI_DWN_5x5 Downsampling 5x5.
XI_DWN_6x6 Downsampling 6x6.
XI_DWN_7x7 Downsampling 7x7.
XI_DWN_8x8 Downsampling 8x8.
XI_DWN_9x9 Downsampling 9x9.
XI_DWN_10x10 Downsampling 10x10.
XI_DWN_16x16 Downsampling 16x16.

XI_PRM_DOWNSAMPLING_TYPE or "downsampling_type"

Description: Changes image downsampling type (binning or skipping).

Type: Enumerator.
Default value: XI_BINNING

Usage:

xiSetParamInt(handle, XI_PRM_DOWNSAMPLING_TYPE, XI_SKIPPING);

Value Description
XI_BINNING pixels are interpolated - better image
XI_SKIPPING pixels are skipped - higher frame rate

XI_PRM_TEST_PATTERN_GENERATOR_SELECTOR or "test_pattern_generator_selector"

Description: Selects Test Pattern Generator Engine.

Type: Enumerator.
Default value: XI_TESTPAT_GEN_SENSOR

Usage:

xiSetParamInt(handle, XI_PRM_TEST_PATTERN_GENERATOR_SELECTOR , XI_TESTPAT_GEN_SENSOR);

Value Description
XI_TESTPAT_GEN_SENSOR Sensor test pattern generator
XI_TESTPAT_GEN_FPGA FPGA Test Pattern Generator

XI_PRM_TEST_PATTERN or "test_pattern"

Description: Selects Test Pattern Type to be generated by the selected Generator Engine.

Type: Enumerator.
Default value: XI_TESTPAT_OFF

Invalidators: XI_PRM_TEST_PATTERN_GENERATOR_SELECTOR

Usage:

xiGetParamInt(handle,XI_PRM_TEST_PATTERN &test_pattern);
xiSetParamInt(handle, XI_PRM_TEST_PATTERN, XI_TESTPAT_OFF);

Value Description
XI_TESTPAT_OFF Testpattern turned off.
XI_TESTPAT_BLACK Image is filled with darkest possible image.
XI_TESTPAT_WHITE Image is filled with brightest possible image.
XI_TESTPAT_GREY_HORIZ_RAMP Image is filled horizontally with an image that goes from the darkest possible value to the brightest.
XI_TESTPAT_GREY_VERT_RAMP Image is filled vertically with an image that goes from the darkest possible value to the brightest.
XI_TESTPAT_GREY_HORIZ_RAMP_MOVING Image is filled horizontally with an image that goes from the darkest possible value to the brightest and moves from left to right.
XI_TESTPAT_GREY_VERT_RAMP_MOVING Image is filled vertically with an image that goes from the darkest possible value to the brightest and moves from left to right.
XI_TESTPAT_HORIZ_LINE_MOVING A moving horizontal line is superimposed on the live image.
XI_TESTPAT_VERT_LINE_MOVING A moving vertical line is superimposed on the live image.
XI_TESTPAT_COLOR_BAR Image is filled with stripes of color including White, Black, Red, Green, Blue, Cyan, Magenta and Yellow.
XI_TESTPAT_FRAME_COUNTER A frame counter is superimposed on the live image.
XI_TESTPAT_DEVICE_SPEC_COUNTER 128bit counter.

XI_PRM_IMAGE_DATA_FORMAT or "imgdataformat"

Description: Format of image data returned by function xiGetImage. In order to simplify the control of the camera from application - the xiAPI automatically changes selected camera parameters and Image Processing after setting of XI_PRM_IMAGE_DATA_FORMAT

In enumerators table second value in comment bar stands for one pixel data in memory [one_byte].

Note: Following parameters and Image Processing are controlled automatically by setting of XI_PRM_IMAGE_DATA_FORMAT :

Format: XI_MONO8 Parameters controlled automatically:

Image Processing: enabled

Format: XI_RAW8 Parameters controlled automatically:

Image Processing: disabled

Format: XI_MONO16** Parameters controlled automatically:

Image Processing: enabled

Format: XI_RAW16** Parameters controlled automatically:

Image Processing: disabled

Format: XI_RGB32, XI_RGB24, XI_RGB_PLANAR Parameters controlled automatically:

Image Processing: enabled

Note1: Only if camera implementation allows this mode.

Note2: For XI_RAW16, XI_MONO16 the parameter XI_PRM_IMAGE_DATA_BIT_DEPTH will be equal to XI_PRM_OUTPUT_DATA_BIT_DEPTH . For other formats the XI_PRM_IMAGE_DATA_BIT_DEPTH will be 8.

After changing of XI_PRM_IMAGE_DATA_FORMAT the image resolution () might change. Please check or set image resolution after changing of Image Data Format.

Note3: Bits alignment: Values are aligned to LSB.

sensor bits per pixel: 10 values in modes XI_RAW16: 0-1023

sensor bits per pixel: 12 values in modes XI_RAW16: 0-4095

sensor bits per pixel: 14 values in modes XI_RAW16: 0-16383

Example: Camera produces 10 bits data and data format XI_RAW16bit is selected - each 16bit word (pixel) can contain values in range 0-1023.

Note4: For color modes XI_RGB32 and XI_RGB24 the image from sensor should be pre-processed. CPU load is higher in these modes. Setting this parameter will reset current region of interest. XI_RGB24 is being processed from the XI_RGB32 by removing the unused Alpha channel creating a slightly higher CPU load then the XI_RGB32 format.

Type: Enumerator.
Default value: XI_MONO8

Usage:

xiGetParamInt(handle,XI_PRM_IMAGE_DATA_FORMAT &imgdataformat);
xiSetParamInt(handle, XI_PRM_IMAGE_DATA_FORMAT, XI_MONO8);

Value Description
XI_MONO8 8 bits per pixel. [Intensity] (Note1,Note2)
XI_MONO16 16 bits per pixel. [Intensity LSB] [Intensity MSB] (Note1,Note2)
XI_RGB24 RGB data format. [Blue][Green][Red] (Note1)
XI_RGB32 RGBA data format. [Blue][Green][Red][0]* (Note1)
XI_RGB_PLANAR RGB planar data format. [Red][Red]...[Green][Green]...[Blue][Blue]... (Note1)
XI_RAW8 8 bits per pixel raw data from sensor. [pixel byte] raw data from transport (camera output)
XI_RAW16 16 bits per pixel raw data from sensor. [pixel byte low] [pixel byte high] 16 bits (depacked) raw data
XI_FRM_TRANSPORT_DATA Data from transport layer (e.g. packed). Depends on data on the transport layer (Note3)
XI_RGB48 RGB data format. [Blue low byte][Blue high byte][Green low][Green high][Red low][Red high] (Note1)
XI_RGB64 RGBA data format. [Blue low byte][Blue high byte][Green low][Green high][Red low][Red high][0][0] (Note1)
XI_RGB16_PLANAR RGB16 planar data format
XI_RAW8X2 8 bits per pixel raw data from sensor(2 components in a row). [ch1 pixel byte] [ch2 pixel byte] 8 bits raw data from 2 channels (e.g. high gain and low gain channels of sCMOS cameras)
XI_RAW8X4 8 bits per pixel raw data from sensor(4 components in a row). [ch1 pixel byte [ch2 pixel byte] [ch3 pixel byte] [ch4 pixel byte] 8 bits raw data from 4 channels (e.g. sCMOS cameras)
XI_RAW16X2 16 bits per pixel raw data from sensor(2 components in a row). [ch1 pixel byte low] [ch1 pixel byte high] [ch2 pixel byte low] [ch2 pixel byte high] 16 bits (depacked) raw data from 2 channels (e.g. high gain and low gain channels of sCMOS cameras)
XI_RAW16X4 16 bits per pixel raw data from sensor(4 components in a row). [ch1 pixel byte low] [ch1 pixel byte high] [ch2 pixel byte low] [ch2 pixel byte high] [ch3 pixel byte low] [ch3 pixel byte high] [ch4 pixel byte low] [ch4 pixel byte high] 16 bits (depacked) raw data from 4 channels (e.g. sCMOS cameras)
XI_RAW32 32 bits per pixel raw data from sensor in integer format (LSB first). 4 bytes (LSB first) pixel (depacked) raw data
XI_RAW32FLOAT 32 bits per pixel raw data from sensor in single-precision floating point format. 4 bytes per pixel (depacked) raw data

Note1: Higher CPU processing is required when this mode is selected because color filter array processing is implemented on PC. This processing is serialized when multiple cameras is used at once. The most effective way to get data from camera is to use XI_RAW8, where no additional processing is done in API.

Note2: On monochromatic cameras the black level is not subtracted in XI_MONO8 and XI_MONO16 formats by Image Processing in xiAPI, so black level remains the same as in RAW format.

Note3: When using Transport Data Format, the Image Processing block from XiAPI Image Data Flow is skipped and therefore the Transport format is the most effective data format in terms of CPU and RAM usage.

XI_PRM_SHUTTER_TYPE or "shutter_type"

Description: Type of sensor shutter

Note: This feature is available only on xiMU camera models.

Type: Enumerator.
Default value: XI_SHUTTER_GLOBAL

Invalidators: XI_PRM_TRG_SOURCE

Usage:

xiGetParamInt(handle,XI_PRM_SHUTTER_TYPE &shutter_type);
xiSetParamInt(handle, XI_PRM_SHUTTER_TYPE, XI_SHUTTER_GLOBAL);

Value Description
XI_SHUTTER_GLOBAL Sensor Global Shutter(CMOS sensor)
XI_SHUTTER_ROLLING Sensor Electronic Rolling Shutter(CMOS sensor)
XI_SHUTTER_GLOBAL_RESET_RELEASE Sensor Global Reset Release Shutter(CMOS sensor)

XI_PRM_SENSOR_TAPS or "sensor_taps"

Description: Selects type of gain for XI_PRM_GAIN . On some cameras there is possibility to select analog or digital gain separately.Set/get the number of taps used on sensor.

Type: Enumerator.
Default value: 1

Usage:

xiGetParamInt(handle,XI_PRM_SENSOR_TAPS &sensor_taps);
xiSetParamInt(handle, XI_PRM_SENSOR_TAPS, XI_TAP_CNT_1);

Value Description
XI_TAP_CNT_1 1 sensor tap selected.
XI_TAP_CNT_2 2 sensor taps selected.
XI_TAP_CNT_4 4 sensor taps selected.

XI_PRM_AEAG or "aeag"

Description: Automatic exposure/gain.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AEAG, &value );
xiSetParamInt(handle, XI_PRM_AEAG, XI_ON);

XI_PRM_AEAG_ROI_OFFSET_X or "aeag_roi_offset_x"

Description: X offset of the area used for AEAG calculation. The sum of XI_PRM_AEAG_ROI_OFFSET_X and XI_PRM_AEAG_ROI_WIDTH must be equal or lower than the image resolution(width).

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AEAG_ROI_OFFSET_X, &value );
xiSetParamInt(handle, XI_PRM_AEAG_ROI_OFFSET_X, value);

XI_PRM_AEAG_ROI_OFFSET_Y or "aeag_roi_offset_y"

Description: Y offset of the area used for AEAG calculation. The sum of XI_PRM_AEAG_ROI_OFFSET_Y and XI_PRM_AEAG_ROI_HEIGHT must be equal or lower than the image resolution(height).

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AEAG_ROI_OFFSET_Y, &value );
xiSetParamInt(handle, XI_PRM_AEAG_ROI_OFFSET_Y, value);

XI_PRM_AEAG_ROI_WIDTH or "aeag_roi_width"

Description: width of the area used for AEAG calculation. The sum of XI_PRM_AEAG_ROI_OFFSET_X and XI_PRM_AEAG_ROI_WIDTH must be equal or lower than the image resolution(width).

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AEAG_ROI_WIDTH, &value );
xiSetParamInt(handle, XI_PRM_AEAG_ROI_WIDTH, value);

XI_PRM_AEAG_ROI_HEIGHT or "aeag_roi_height"

Description: height of the area used for AEAG calculation. The sum of XI_PRM_AEAG_ROI_OFFSET_Y and XI_PRM_AEAG_ROI_HEIGHT must be equal or lower than the image resolution(height).

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AEAG_ROI_HEIGHT, &value );
xiSetParamInt(handle, XI_PRM_AEAG_ROI_HEIGHT, value);

XI_PRM_SENS_DEFECTS_CORR_LIST_SELECTOR or "bpc_list_selector"

Description: Selector for current sensor defects list used by Sensor Defect Correction. For more information see Sensor Defect Correction support page.

Type: Enumerator.
Default value: XI_SENS_DEFFECTS_CORR_LIST_SEL_FACTORY

Usage:

xiSetParamInt(handle, XI_PRM_SENS_DEFECTS_CORR_LIST_SELECTOR , XI_SENS_DEFFECTS_CORR_LIST_SEL_USER0 );
xiSetParamInt(handle, XI_PRM_SENS_DEFECTS_CORR, XI_ON);

Value Description
XI_SENS_DEFFECTS_CORR_LIST_SEL_FACTORY Factory defect correction list
XI_SENS_DEFFECTS_CORR_LIST_SEL_USER0 User defect correction list

XI_PRM_SENS_DEFECTS_CORR_LIST_CONTENT or "sens_defects_corr_list_content"

Description: Set/Get current sensor defects list used by Sensor Defect Correction(in specific text format).

Type: String.
Default value: -

Usage:

xiSetParamString(handle, XI_PRM_SENS_DEFECTS_CORR_LIST_CONTENT , string, strlen(string) );
xiGetParamString(handle, XI_PRM_SENS_DEFECTS_CORR_LIST_CONTENT, string, string_size); 

XI_PRM_SENS_DEFECTS_CORR or "bpc"

Description: Correction of sensor defects. For more information see Flat Field Correction support page.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_SENS_DEFECTS_CORR, &value );
xiSetParamInt(handle, XI_PRM_SENS_DEFECTS_CORR, XI_ON);

XI_PRM_AUTO_WB or "auto_wb"

Description: SAutomatic white balance.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AUTO_WB, &value );
xiSetParamInt(handle, XI_PRM_AUTO_WB, XI_ON);

XI_PRM_MANUAL_WB or "manual_wb"

Description: Manual white balance. Takes white balance from square in image center of next image received by xiGetImage. Square have 1/8th of width and height of image. The function expects white sheet of paper exposed to 50% of values (RGB values should be around 128). As result of setting of manual_wb three parameters are changed: "wb_kb", "wb_kg" and "wb_kr". User application can store them and recall when needed to set the white balance back.

Type: Integer.
Default value: 0

Usage:

// now camera should see the white color in approximately 50% of level
xiSetParamInt(handle, XI_PRM_MANUAL_WB, 1);
xiGetImage(handle, 1000, &image); // now API automatically calculates the white balance
iGetImage(handle, 1000, &image); // this and next images will have corrected white balance

XI_PRM_WB_ROI_OFFSET_X or "wb_roi_offset_x"

Description: X offset of the area used for manual WB calculation. The sum of XI_PRM_WB_ROI_OFFSET_X and XI_PRM_WB_ROI_WIDTH must be equal or lower than the image resolution(width).

Supported cameras: MC,CB,MX

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_WB_ROI_OFFSET_X, &value );
xiSetParamInt(handle, XI_PRM_WB_ROI_OFFSET_X, value);

XI_PRM_WB_ROI_OFFSET_Y or "wb_roi_offset_y"

Description: X offset of the area used for manual WB calculation. The sum of XI_PRM_WB_ROI_OFFSET_Y and XI_PRM_WB_ROI_HEIGHT must be equal or lower than the image resolution(height).

Supported cameras: MC,CB,MX

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_WB_ROI_OFFSET_Y, &value );
xiSetParamInt(handle, XI_PRM_WB_ROI_OFFSET_Y, value);

XI_PRM_WB_ROI_WIDTH or "wb_roi_width"

Description: Width of the area used for manual WB calculation. The sum of XI_PRM_WB_ROI_OFFSET_X and XI_PRM_WB_ROI_WIDTH must be equal or lower than the image resolution(width).

Supported cameras: MC,CB,MX

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_WB_ROI_WIDTH, &value );
xiSetParamInt(handle, XI_PRM_WB_ROI_WIDTH, value);

XI_PRM_WB_ROI_HEIGHT or "wb_roi_height"

Description: Height of the area used for manual WB calculation. The sum of XI_PRM_WB_ROI_OFFSET_Y and XI_PRM_WB_ROI_HEIGHT must be equal or lower than the image resolution(height).

Supported cameras: MC,CB,MX

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_WB_ROI_HEIGHT, &value );
xiSetParamInt(handle, XI_PRM_WB_ROI_HEIGHT, value);

XI_PRM_WB_KR or "wb_kr"

Description: White balance red coefficient.

Type: Float.
Default value: 1

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_WB_KR, &value);	
xiSetParamFloat(handle, XI_PRM_WB_KR, value);

XI_PRM_WB_KG or "wb_kg"

Description: White balance green coefficient.

Type: Float.
Default value: 1

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_WB_KG, &value);	
xiSetParamFloat(handle, XI_PRM_WB_KG, value);

XI_PRM_WB_KB or "wb_kb"

Description: White balance blue coefficient.

Type: Float.
Default value: 1

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_WB_KB, &value);	
xiSetParamFloat(handle, XI_PRM_WB_KB, value);

XI_PRM_WIDTH or "width"

Description: If camera runs in single region mode this parameter represents width of the image provided by the device (in pixels). The sum of XI_PRM_OFFSET_X and XI_PRM_WIDTH must be equal or lower than the image resolution(width). Number must be divisible by the minimum increment which can be read out using the api parameter modifier XI_PRM_INFO_INCREMENT If camera runs in multiple region mode ( XI_PRM_REGION_SELECTOR ) this parameter is width of region currently selected (in pixels).

Type: Integer.
Default value: 0

Invalidators: XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_HORIZONTAL , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING , XI_PRM_IMAGE_DATA_FORMAT , XI_PRM_OUTPUT_DATA_PACKING , XI_PRM_OUTPUT_DATA_BIT_DEPTH , XI_PRM_HEIGHT

Usage:

int value;
xiGetParamInt(handle, XI_PRM_WIDTH, &value );
xiSetParamInt(handle, XI_PRM_WIDTH, value);

XI_PRM_HEIGHT or "height"

Description: If camera runs in single region mode this parameter represents the height of the image provided by the device (in pixels). The sum of XI_PRM_OFFSET_Y and must be equal or lower than the image resolution(height). Number must be divisible by the minimum increment which can be read out using the api parameter modifier XI_PRM_INFO_INCREMENT If camera runs in multiple region mode () this parameter is height of region currently selected.

Note1: Changing of this parameter will remove all images from buffer queue.

Note2: In case of using small ROI in combination with Fresco FL1100 controller, please read this article

Type: Integer.
Default value: 0

Invalidators: XI_PRM_BINNING_VERTICAL , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING , XI_PRM_IMAGE_DATA_FORMAT , XI_PRM_OUTPUT_DATA_PACKING , XI_PRM_OUTPUT_DATA_BIT_DEPTH , XI_PRM_WIDTH

Usage:

int value;
xiGetParamInt(handle, XI_PRM_HEIGHT, &value );
xiSetParamInt(handle, XI_PRM_HEIGHT, value);

XI_PRM_OFFSET_X or "offsetX"

Description: Horizontal offset from the origin to the area of interest (in pixels). The sum of XI_PRM_OFFSET_X and XI_PRM_WIDTH must be equal or lower than the image resolution(width). Number must be divisible by the minimum increment which can be read out using the api parameter modifier

Note: Changing of this parameter will remove all images from buffer queue.

Type: Integer.
Default value: 0

Invalidators: XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_HORIZONTAL , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING

Usage:

int value;
xiGetParamInt(handle, XI_PRM_OFFSET_X, &value );
xiSetParamInt(handle, XI_PRM_OFFSET_X, value);

XI_PRM_OFFSET_Y or "offsetY"

Description: Vertical offset from the origin to the area of interest (in pixels).The sum of XI_PRM_OFFSET_Y and XI_PRM_HEIGHT must be equal or lower than the image resolution(height). Number must be divisible by the minimum increment which can be read out using the api parameter modifier

XI_PRM_INFO_INCREMENT

Note: Changing of this parameter will remove all images from buffer queue.

Type: Integer.
Default value: 0

Invalidators: XI_PRM_BINNING_VERTICAL , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING

Usage:

int value;
xiGetParamInt(handle, XI_PRM_OFFSET_Y, &value );
xiSetParamInt(handle, XI_PRM_OFFSET_Y, value);

XI_PRM_REGION_SELECTOR or "region_selector"

Description: Selects Region in Multiple ROI Parameters: XI_PRM_WIDTH , XI_PRM_HEIGHT , XI_PRM_OFFSET_X , XI_PRM_OFFSET_Y , XI_PRM_REGION_MODE are related to the particular region

Note1: width and offset_x could be changed only for Region 0 .

Note2: Regions has to be in order from top to bottom. Region N has to start after Region N-1 ends.

Type: Integer.
Default value: 0

Invalidators: XI_PRM_BINNING_VERTICAL , XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DECIMATION_HORIZONTAL , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING

Usage:

int value;
xiGetParamInt(handle, XI_PRM_REGION_SELECTOR, &value );
xiSetParamInt(handle, XI_PRM_REGION_SELECTOR, value);

XI_PRM_REGION_MODE or "region_mode"

Description: Activates/deactivates Region selected by Region Selector in Multiple ROI

Note: Region 0 is always activated, it is not possible to deactivate it.

Type: Integer.
Default value: 0

Invalidators: XI_PRM_BINNING_VERTICAL , XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DECIMATION_HORIZONTAL , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING

Usage:

int value;
xiGetParamInt(handle, XI_PRM_REGION_MODE, &value );
xiSetParamInt(handle, XI_PRM_REGION_MODE, value);

XI_PRM_HORIZONTAL_FLIP or "horizontal_flip"

Description: Activates horizontal flip if available in camera.

Type: Integer.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_HORIZONTAL_FLIP , 1);  //enable horizontal flipping

XI_PRM_VERTICAL_FLIP or "vertical_flip"

Description: Activates vertical flip if available in camera.

Type: Integer.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_VERTICAL_FLIP, 1);  //enable horizontal flipping

XI_PRM_FFC or "ffc"

Description: Image flat field correction.( XI_PRM_NEW_PROCESS_CHAIN_ENABLE must be XI_ON). For more information see Flat Field Correction support page.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_FFC, &value );
xiSetParamInt(handle, XI_PRM_FFC, XI_ON);

XI_PRM_FFC_FLAT_FIELD_FILE_NAME or "ffc_flat_field_file_name"

Description: Set name of file of image flat field to be applied for FFC processor(in tiff format). ( XI_PRM_NEW_PROCESS_CHAIN_ENABLE must be XI_ON). For more information see Flat Field Correction support page.

Type: String.
Default value: -

Usage:

xiSetParamString(handle, XI_PRM_FFC_FLAT_FIELD_FILE_NAME, filename, size);

XI_PRM_FFC_DARK_FIELD_FILE_NAME or "ffc_dark_field_file_name"

Description: Set name of file of image dark field to be applied for FFC processor(in tiff format). ( XI_PRM_NEW_PROCESS_CHAIN_ENABLE must be XI_ON). For more information see Flat Field Correction support page.

Type: String.
Default value: -

Usage:

xiSetParamString(handle, XI_PRM_FFC_DARK_FIELD_FILE_NAME, filename, size);


Image Format

Note: xiAPI allows to set different combinations of binning and decimation parameters.

On xiC, xiB, xiX, xiT cameras the parameters of units (Sensor, FPGA, CPU) are accessible with selectors (e.g. XI_PRM_BINNING_SELECTOR ). After setting of selector, multiple parameters could be get of set for the selected unit. They can be divided into:

  • Patterns (e.g. XI_PRM_BINNING_HORIZONTAL_PATTERN ). If new pattern is set - the API might change the Values automatically in order to achieve setting of the new pattern.
  • Values (e.g. XI_PRM_BINNING_HORIZONTAL ). If new value is set - the API might change other values automatically in order to achieve setting of the new. Firstly it tries to find exact mode keeping the unchanged values, secondary it tries to find similar mode (trying to keep the other part - e.g. changing binning is trying to keep decimation parameters). If first and second attempts fails, the API tries to find any mode where new-value is found without keeping any other parameters, keeping Patterns.
  • Modes for binning (e.g. XI_PRM_BINNING_VERTICAL_MODE )

XI_PRM_BINNING_SELECTOR or "binning_selector"

Description: Selects Binning engine to configure.

Type: Enumerator.
Default value: XI_BIN_SELECT_SENSOR

Usage:

xiGetParamInt(handle,XI_PRM_BINNING_SELECTOR &binning_selector);
xiSetParamInt(handle, XI_PRM_BINNING_SELECTOR, XI_BIN_SELECT_SENSOR);

Value Description
XI_BIN_SELECT_SENSOR parameters for image sensor binning are selected
XI_BIN_SELECT_DEVICE_FPGA parameters for device (camera) FPGA decimation are selected
XI_BIN_SELECT_HOST_CPU parameters for Host CPU binning are selected

XI_PRM_BINNING_VERTICAL_MODE or "binning_vertical_mode"

Description: Sets the mode to use to combine vertical pixel together.

Type: Enumerator.
Default value: XI_BIN_MODE_SUM

Usage:

xiGetParamInt(handle,XI_PRM_BINNING_VERTICAL_MODE &binning_vertical_mode);
xiSetParamInt(handle, XI_PRM_BINNING_VERTICAL_MODE, XI_BIN_MODE_SUM);

Value Description
XI_BIN_MODE_SUM The response from the combined pixels will be added, resulting in increased sensitivity.
XI_BIN_MODE_AVERAGE The response from the combined pixels will be averaged, resulting in increased signal/noise ratio.

XI_PRM_BINNING_VERTICAL or "binning_vertical"

Description: Defines number of vertical photo-sensitive cells to combine.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Integer.
Default value: 1

Invalidators: XI_PRM_BINNING_SELECTOR , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DECIMATION_HORIZONTAL , XI_PRM_BINNING_HORIZONTAL , XI_PRM_DP_UNIT_SELECTOR , XI_PRM_DP_PROC_SELECTOR , XI_PRM_DP_PARAM_SELECTOR , XI_PRM_DP_PARAM_VALUE , XI_PRM_HDR

Usage:

int value;
xiGetParamInt(handle, XI_PRM_BINNING_VERTICAL, &value );
xiSetParamInt(handle, XI_PRM_BINNING_VERTICAL, value);

XI_PRM_BINNING_HORIZONTAL_MODE or "binning_horizontal_mode"

Description: Sets the mode to use to combine horizontal pixel together.

Type: Enumerator.
Default value: XI_BIN_MODE_SUM

Usage:

xiGetParamInt(handle,XI_PRM_BINNING_HORIZONTAL_MODE &binning_horizontal_mode);
xiSetParamInt(handle, XI_PRM_BINNING_HORIZONTAL_MODE, XI_BIN_MODE_SUM);

Value Description
XI_BIN_MODE_SUM The response from the combined pixels will be added, resulting in increased sensitivity.
XI_BIN_MODE_AVERAGE The response from the combined pixels will be averaged, resulting in increased signal/noise ratio.

XI_PRM_BINNING_HORIZONTAL or "binning_horizontal"

Description: Defines number of horizontal photo-sensitive cells to combine.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Integer.
Default value: 1

Invalidators: XI_PRM_BINNING_SELECTOR , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DECIMATION_HORIZONTAL , XI_PRM_BINNING_VERTICAL , XI_PRM_DP_UNIT_SELECTOR , XI_PRM_DP_PROC_SELECTOR , XI_PRM_DP_PARAM_SELECTOR , XI_PRM_DP_PARAM_VALUE

Usage:

int value;
xiGetParamInt(handle, XI_PRM_BINNING_HORIZONTAL, &value );
xiSetParamInt(handle, XI_PRM_BINNING_HORIZONTAL, value);

XI_PRM_BINNING_HORIZONTAL_PATTERN or "binning_horizontal_pattern"

Description: Defines number of horizontal photo-sensitive cells to combine.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Enumerator.
Default value: XI_BIN_MONO

Usage:

xiGetParamInt(handle,XI_PRM_BINNING_HORIZONTAL_PATTERN &binning_horizontal_pattern);
xiSetParamInt(handle, XI_PRM_BINNING_HORIZONTAL_PATTERN, XI_BIN_MONO);

Value Description
XI_BIN_MONO adjacent pixels are combined
XI_BIN_BAYER Bayer pattern is preserved during pixel combining

XI_PRM_BINNING_VERTICAL_PATTERN or "binning_vertical_pattern"

Description: Defines binning vertical pattern.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Enumerator.
Default value: XI_BIN_MONO

Usage:

xiGetParamInt(handle,XI_PRM_BINNING_VERTICAL_PATTERN &binning_vertical_pattern);
xiSetParamInt(handle, XI_PRM_BINNING_VERTICAL_PATTERN, XI_BIN_MONO);

Value Description
XI_BIN_MONO adjacent pixels are combined
XI_BIN_BAYER Bayer pattern is preserved during pixel combining

XI_PRM_DECIMATION_SELECTOR or "decimation_selector"

Description: Defines binning vertical pattern.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Enumerator.
Default value: XI_DEC_SELECT_SENSOR

Usage:

xiGetParamInt(handle,XI_PRM_DECIMATION_SELECTOR &decimation_selector);
xiSetParamInt(handle, XI_PRM_DECIMATION_SELECTOR, XI_DEC_SELECT_SENSOR);

Value Description
XI_DEC_SELECT_SENSOR parameters for image sensor decimation are selected
XI_DEC_SELECT_DEVICE_FPGA parameters for device (camera) FPGA decimation are selected
XI_DEC_SELECT_HOST_CPU parameters for Host CPU decimation are selected

XI_PRM_DECIMATION_VERTICAL or "decimation_vertical"

Description: Reduces the vertical resolution of the image by the specified decimation factor.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Integer.
Default value: 1

Invalidators: XI_PRM_DECIMATION_VERTICAL , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING , XI_PRM_BINNING_VERTICAL , XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_HORIZONTAL , XI_PRM_DP_UNIT_SELECTOR , XI_PRM_DP_PROC_SELECTOR , XI_PRM_DP_PARAM_SELECTOR , XI_PRM_DP_PARAM_VALUE , XI_PRM_DECIMATION_SELECTOR , XI_PRM_HDR

Usage:

int value;
xiGetParamInt(handle, XI_PRM_DECIMATION_VERTICAL, &value );
xiSetParamInt(handle, XI_PRM_DECIMATION_VERTICAL, value);

XI_PRM_DECIMATION_HORIZONTAL or "decimation_horizontal"

Description: Reduces the horizontal resolution of the image by the specified decimation factor.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Integer.
Default value: 1

Invalidators: XI_PRM_DECIMATION_VERTICAL , XI_PRM_DOWNSAMPLING_TYPE , XI_PRM_DOWNSAMPLING , XI_PRM_BINNING_VERTICAL , XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DP_UNIT_SELECTOR , XI_PRM_DP_PROC_SELECTOR , XI_PRM_DP_PARAM_SELECTOR , XI_PRM_DP_PARAM_VALUE , XI_PRM_DECIMATION_SELECTOR

Usage:

int value;
xiGetParamInt(handle, XI_PRM_DECIMATION_HORIZONTAL, &value );
xiSetParamInt(handle, XI_PRM_DECIMATION_HORIZONTAL, value);

XI_PRM_DECIMATION_HORIZONTAL_PATTERN or "decimation_horizontal_pattern"

Description: Defines decimation horizontal pattern.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Enumerator.
Default value: XI_DEC_MONO

Usage:

xiGetParamInt(handle,XI_PRM_DECIMATION_HORIZONTAL_PATTERN &decimation_horizontal_pattern);
xiSetParamInt(handle, XI_PRM_DECIMATION_HORIZONTAL_PATTERN, XI_DEC_MONO);

Value Description
XI_DEC_MONO adjacent pixels are decimated
XI_DEC_BAYER Bayer pattern is preserved during pixel decimation

XI_PRM_DECIMATION_VERTICAL_PATTERN or "decimation_vertical_pattern"

Description: Defines decimation vertical pattern.

Note1: Setting this feature may automatically change other Binning/Decimation parameters in order to achieve a valid combination.

Note2: This feature influences image size + resets ROI to default full resolution.

Type: Enumerator.
Default value: XI_DEC_MONO

Usage:

xiGetParamInt(handle,XI_PRM_DECIMATION_VERTICAL_PATTERN &decimation_vertical_pattern);
xiSetParamInt(handle, XI_PRM_DECIMATION_VERTICAL_PATTERN, XI_DEC_MONO);

Value Description
XI_DEC_MONO adjacent pixels are decimated
XI_DEC_BAYER Bayer pattern is preserved during pixel decimation

AE Setup

XI_PRM_EXP_PRIORITY or "exp_priority"

Description: Exposure priority for Auto Exposure / Auto Gain function.

Type: Float.
Default value: 1

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_EXP_PRIORITY, &value);	
xiSetParamFloat(handle, XI_PRM_EXP_PRIORITY, value);

XI_PRM_AG_MAX_LIMIT or "ag_max_limit"

Description: Maximum limit of gain in AEAG procedure.

Type: Float.
Default value: 0

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_AG_MAX_LIMIT, &value);	
xiSetParamFloat(handle, XI_PRM_AG_MAX_LIMIT, value);

XI_PRM_AE_MAX_LIMIT or "ae_max_limit"

Description: Maximum limit of exposure (in uSec) in AEAG procedure.

Type: Integer.
Default value: 200000

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AE_MAX_LIMIT, &value );
xiSetParamInt(handle, XI_PRM_AE_MAX_LIMIT, value);

XI_PRM_AEAG_LEVEL or "aeag_level"

Description: Average intensity of output signal AEAG should achieve(in %).

Type: Integer.
Default value: 50

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AEAG_LEVEL, &value );
xiSetParamInt(handle, XI_PRM_AEAG_LEVEL, value);


Performance

XI_PRM_LIMIT_BANDWIDTH or "limit_bandwidth"

Description: Camera acquisition data-rate Limit on transport layer in Megabits (1000000) per second. API controls the camera clock or increases the line period by 1 in order to achieve the closest data-rate as the Limit value set, ensuring the data-rate is below the Limit. This parameter can be used to decrease data-rate e.g. when more cameras are connected to same interface to share same channel. In order to activate the limit - application should set also XI_PRM_LIMIT_BANDWIDTH_MODE = XI_ON, see example below.

Note: Controlling method (clock or line period) depends on the camera model.

Type: Integer.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_LIMIT_BANDWIDTH , datarate_in_Mbits_sec);

Example: See more at our application note about Multiple Cameras Setup

// get interface data rate
int interface_data_rate_mbps=2500;
// calculate data rate for each camera
#define CONNECTED_CAMERAS_TO_SAME_HUB 3
int camera_data_rate = interface_data_rate_mbps / CONNECTED_CAMERAS_TO_SAME_HUB;
#define MARGIN_MBitsPER_SECOND 300
camera_data_rate -= MARGIN_MBitsPER_SECOND;
// set data rate
xiSetParamInt(handle, XI_PRM_LIMIT_BANDWIDTH , camera_data_rate);
// enable the limiting
xiSetParamInt(handle, XI_PRM_LIMIT_BANDWIDTH_MODE , XI_ON);

XI_PRM_LIMIT_BANDWIDTH_MODE or "limit_bandwidth_mode"

Description: Controls if the XI_PRM_LIMIT_BANDWIDTH is active. When disabled, lower level specific features are expected to control the throughput. When enabled, XI_PRM_LIMIT_BANDWIDTH controls the overall throughput.

Note: This parameter is not supported on MQ, MU, MD, MR camera families.

Type: Enumerator.
Default value: XI_OFF

Usage:

xiGetParamInt(handle,XI_PRM_LIMIT_BANDWIDTH_MODE &limit_bandwidth_mode);
xiSetParamInt(handle, XI_PRM_LIMIT_BANDWIDTH_MODE, XI_OFF);

Value Description
XI_OFF Turn parameter off
XI_ON Turn parameter on

XI_PRM_SENSOR_DATA_BIT_DEPTH or "sensor_bit_depth"

Description: Returns the bit depth of the pixel data received from sensor.

Note: Read more at XiAPI Image Data Flow

Type: Enumerator.
Default value: 0

Invalidators: XI_PRM_IMAGE_DATA_FORMAT

Usage:

xiGetParamInt(handle,XI_PRM_SENSOR_DATA_BIT_DEPTH &sensor_bit_depth);
xiSetParamInt(handle, XI_PRM_SENSOR_DATA_BIT_DEPTH, XI_BPP_8);

Value Description
XI_BPP_8 8 bit per pixel
XI_BPP_9 9 bit per pixel
XI_BPP_10 10 bit per pixel
XI_BPP_11 11 bit per pixel
XI_BPP_12 12 bit per pixel
XI_BPP_14 14 bit per pixel
XI_BPP_16 16 bit per pixel
XI_BPP_24 24 bit per pixel
XI_BPP_32 32 bit per pixel

XI_PRM_OUTPUT_DATA_BIT_DEPTH or "output_bit_depth"

Description: The bit depth of the output data from camera (=transport layer).

Note: Read more at XiAPI Image Data Flow



Type: Enumerator.
Default value: 0

Invalidators: XI_PRM_IMAGE_DATA_FORMAT , XI_PRM_DP_PARAM_VALUE , XI_PRM_BINNING_VERTICAL , XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DECIMATION_HORIZONTAL

Usage:

xiGetParamInt(handle,XI_PRM_OUTPUT_DATA_BIT_DEPTH &output_bit_depth);
xiSetParamInt(handle, XI_PRM_OUTPUT_DATA_BIT_DEPTH, XI_BPP_8);

Value Description
XI_BPP_8 8 bit per pixel
XI_BPP_9 9 bit per pixel
XI_BPP_10 10 bit per pixel
XI_BPP_11 11 bit per pixel
XI_BPP_12 12 bit per pixel
XI_BPP_14 14 bit per pixel
XI_BPP_16 16 bit per pixel
XI_BPP_24 24 bit per pixel
XI_BPP_32 32 bit per pixel

XI_PRM_IMAGE_DATA_BIT_DEPTH or "image_data_bit_depth"

Description: The bit depth of the pixel data returned by function xiGetImage. If MONO16 or RAW16 image formats are used this parameter defines the alignment of the data on the xiGetImage.

Type: Enumerator.
Default value: 0

Invalidators: XI_PRM_IMAGE_DATA_FORMAT

Usage:

xiGetParamInt(handle,XI_PRM_IMAGE_DATA_BIT_DEPTH &image_data_bit_depth);
xiSetParamInt(handle, XI_PRM_IMAGE_DATA_BIT_DEPTH, XI_BPP_8);

Value Description
XI_BPP_8 8 bit per pixel
XI_BPP_9 9 bit per pixel
XI_BPP_10 10 bit per pixel
XI_BPP_11 11 bit per pixel
XI_BPP_12 12 bit per pixel
XI_BPP_14 14 bit per pixel
XI_BPP_16 16 bit per pixel
XI_BPP_24 24 bit per pixel
XI_BPP_32 32 bit per pixel

XI_PRM_OUTPUT_DATA_PACKING or "output_bit_packing"

Description: This feature enables bit packing on transport data layer, thus increasing the maximum frame rate when data with 10 or 12 bits per pixel is transported. For more info please see Transport Data Packing feature description.

Note: Read more at XiAPI Image Data Flow

Type: Integer.
Default value: 0

Invalidators: XI_PRM_IMAGE_DATA_FORMAT , XI_PRM_OUTPUT_DATA_BIT_DEPTH , XI_PRM_DP_PARAM_VALUE , XI_PRM_BINNING_VERTICAL , XI_PRM_BINNING_HORIZONTAL , XI_PRM_DECIMATION_VERTICAL , XI_PRM_DECIMATION_HORIZONTAL

Usage:

int value;
xiGetParamInt(handle, XI_PRM_OUTPUT_DATA_PACKING, &value );
xiSetParamInt(handle, XI_PRM_OUTPUT_DATA_PACKING, XI_ON);

XI_PRM_OUTPUT_DATA_PACKING_TYPE or "output_bit_packing_type"

Description: This feature chooses output data packing type(ximea grouping 10g160, 12g192, 14g224), PFNC packing 10p, 12p...). For more info please see Transport Data Packing feature description.

Type: Enumerator.
Default value: XI_DATA_PACK_XI_GROUPING

Usage:

xiGetParamInt(handle,XI_PRM_OUTPUT_DATA_PACKING_TYPE &output_bit_packing_type);
xiSetParamInt(handle, XI_PRM_OUTPUT_DATA_PACKING_TYPE, XI_DATA_PACK_XI_GROUPING);

Value Description
XI_DATA_PACK_XI_GROUPING Data grouping (10g160, 12g192, 14g224).
XI_DATA_PACK_PFNC_LSB_PACKING Data packing (10p, 12p)

Temperature

XI_PRM_IS_COOLED or "iscooled"

Description: Returns 1 for cameras that support cooling.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_IS_COOLED, &value );

XI_PRM_COOLING or "cooling"

Description: Set camera cooling control. Replaced by XI_PRM_TEMP_CONTROL_MODE

Type: Enumerator.
Default value: XI_TEMP_CTRL_MODE_OFF

Usage:

xiSetParamInt(handle, XI_PRM_TEMP_SELECTOR, XI_TEMP_SENSOR_BOARD);
xiSetParamFloat(handle, XI_PRM_TARGET_TEMP, 18.5); 
xiSetParamInt(handle, XI_PRM_COOLING, XI_TEMP_CTRL_MODE_AUTO);

Value Description
XI_TEMP_CTRL_MODE_OFF Controlling of elements (TEC/Peltier, Fans) is turned off
XI_TEMP_CTRL_MODE_AUTO Controlling of elements is performed automatically by API or camera in order to reach parameter TARGET_TEMP.
XI_TEMP_CTRL_MODE_MANUAL Controlling of elements is done manually by application.

XI_PRM_TARGET_TEMP or "target_temp"

Description: Set target temperature for temperature control. XI_PRM_TEMP_SELECTOR might be used for selection of thermometer.

Type: Float.
Default value: 0

Usage:

xiSetParamFloat(handle, XI_PRM_TARGET_TEMP, 18.5); 
xiGetParamFloat(handle, XI_PRM_TARGET_TEMP, &target_temp);

XI_PRM_TEMP_SELECTOR or "temp_selector"

Description: Temperature sensor selector.

Type: Enumerator.
Default value: XI_TEMP_SENSOR_BOARD

Usage:

float temperature=0;
xiSetParamInt(handle, XI_PRM_TEMP_SELECTOR, XI_TEMP_IMAGE_SENSOR_RAW); 
xiGetParamFloat(handle, XI_PRM_TEMP, &temperature); 

Value Description
XI_TEMP_IMAGE_SENSOR_DIE_RAW Image sensor die (non-calibrated)
XI_TEMP_IMAGE_SENSOR_DIE Image sensor die (calibrated)
XI_TEMP_SENSOR_BOARD PCB as image sensor
XI_TEMP_INTERFACE_BOARD Interface board
XI_TEMP_FRONT_HOUSING Front part of camera housing
XI_TEMP_REAR_HOUSING Rear part of camera housing
XI_TEMP_TEC1_COLD TEC1 cold side temperature
XI_TEMP_TEC1_HOT TEC1 hot side temperature

XI_PRM_TEMP or "temp"

Description: Selected thermometer reading in degree Celsius. Thermometer can be selected by XI_PRM_TEMP_SELECTOR

Type: Float.
Default value: 0

Invalidators: XI_PRM_TEMP_SELECTOR

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_TEMP, &value);

XI_PRM_TEMP_CONTROL_MODE or "device_temperature_ctrl_mode"

Description: Temperature control mode.

Type: Enumerator.
Default value: XI_TEMP_CTRL_MODE_OFF

Usage:

xiSetParamInt(handle, XI_PRM_TEMP_SELECTOR, XI_TEMP_SENSOR_BOARD);
xiSetParamFloat(handle, XI_PRM_TARGET_TEMP, 18.5); 
xiSetParamInt(handle, XI_PRM_COOLING, XI_TEMP_CTRL_MODE_AUTO);

Value Description
XI_TEMP_CTRL_MODE_OFF Controlling of elements (TEC/Peltier, Fans) is turned off
XI_TEMP_CTRL_MODE_AUTO Controlling of elements is performed automatically by API or camera in order to reach parameter TARGET_TEMP.
XI_TEMP_CTRL_MODE_MANUAL Controlling of elements is done manually by application.

XI_PRM_CHIP_TEMP or "chip_temp"

Description: Temperature reading of thermometer chip. Sensor is located on the PCB close to imaging sensor. Units: degrees of Celsius.

Type: Float.
Default value: 0

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_CHIP_TEMP, &value);

XI_PRM_HOUS_TEMP or "hous_temp"

Description: Camera housing temperature.

Type: Float.
Default value: 0

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_HOUS_TEMP, &value);

XI_PRM_HOUS_BACK_SIDE_TEMP or "hous_back_side_temp"

Description: Camera housing back side temperature.

Type: Float.
Default value: 0

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_HOUS_BACK_SIDE_TEMP, &value);

XI_PRM_SENSOR_BOARD_TEMP or "sensor_board_temp"

Description: Camera sensor board temperature.

Type: Float.
Default value: 0

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_SENSOR_BOARD_TEMP, &value);

XI_PRM_TEMP_ELEMENT_SEL or "device_temperature_element_sel"

Description: Temperature element selector (TEC, Fan)

Type: Enumerator.
Default value: XI_TEMP_ELEM_TEC1

Usage:

See XI_PRM_TEMP_ELEMENT_VALUE

Value Description
XI_TEMP_ELEM_TEC1 TEC1 = TEC/Peltier that is closest to the image sensor
XI_TEMP_ELEM_TEC2 TEC2 = TEC/Peltier location depends on camera model
XI_TEMP_ELEM_FAN1 Temperature element fan current or rotation (FAN1 = Fan)
XI_TEMP_ELEM_FAN1_THRS_TEMP Temperature element fan start rotation threshold temperature

XI_PRM_TEMP_ELEMENT_VALUE or "device_temperature_element_val"

Description: Temperature element value in percents of full control range.

Type: Float.
Default value: 0

Invalidators: XI_PRM_TEMP_ELEMENT_SEL

Usage:

xiSetParamInt(handle, XI_PRM_COOLING, XI_TEMP_CTRL_MODE_MANUAL);
xiSetParamInt(handle, XI_PRM_TEMP_ELEMENT_SEL, XI_TEMP_ELEM_TEC1);
xiSetParamFloat(handle, XI_PRM_TEMP_ELEMENT_VALUE, 50.1);


Color Correction

Note: Works only for color cameras.

XI_PRM_CMS or "cms"

Description: Enable or disable color management.

Note: This feature is in Beta stage.

Type: Enumerator.
Default value: XI_CMS_DIS

Usage:

xiGetParamInt(handle,XI_PRM_CMS &cms);
xiSetParamInt(handle, XI_PRM_CMS, XI_CMS_DIS);

Value Description
XI_CMS_DIS disables color management
XI_CMS_EN enables color management (high CPU usage)
XI_CMS_EN_FAST enables fast color management (high RAM usage)

XI_PRM_CMS_INTENT or "cms_intent"

Description: Defines rendering intents.

Note1: Absolute colorimetry and relative colorimetry actually use the same table but differ in the adjustment for the white point media. If the output device has a much larger gamut than the source profile, i.e., all the colors in the source can be represented in the output, using the absolute colorimetry rendering intent would "ideally" (ignoring noise, precision, etc.) give an exact output of the specified CIELAB values. Perceptually, the colors may appear incorrect, but instrument measurements of the resulting output would match the source. Colors outside of the proof print system's possible color are mapped to the boundary of the color gamut. Absolute colorimetry is useful to get an exact specified color (e.g., IBM blue), or to quantify the accuracy of mapping methods.

Note2: The goal in relative colorimetry is to be truthful to the specified color, with only a correction for the media. Relative colorimetry is useful in proofing applications, since you are using it to get an idea of how a print on one device will appear on a different device. Media differences are the only thing you really would like to adjust for. Obviously there has to be some gamut mapping going on also. Usually this is done in a way where hue and lightness are maintained at the cost of reduced saturation. Relative colorimetry is the default rendering intent on most systems.

Note3: Perceptual and Saturation The perceptual and saturation intents are where the results really depend upon the profile maker. This is even how some of the competitors in this market differentiate themselves. These intents should be created by the profile maker so that pleasing images occur with the perceptual intent while eye-catching business graphics occur with the saturation intent. This is achieved through the use of different perceptual remaps of the data as well as different gamut mapping methods. Perceptual rendering is recommended for color separation.

Note4: In practice, photographers almost always use relative or perceptual intent, as for natural images, absolute causes color cast, while saturation produces unnatural colors.[6] Relative intent handles out-of-gamut by clipping (burning) these colors to the edge of the gamut, leaving in-gamut colors unchanged, while perceptual intent smoothly moves out-of-gamut colors into gamut, preserving gradations, but distorts in-gamut colors in the process. If an entire image is in-gamut, relative is perfect, but when there are out of gamut colors, which is more preferable depends on a case-by-case basis.

Note5: Saturation intent is most useful in charts and diagrams, where there is a discrete palette of colors that the designer wants saturated to make them intense, but where specific hue is less important.

Note6: This feature is in Beta stage.

Type: Enumerator.
Default value: XI_CMS_INTENT_PERCEPTUAL

Usage:

xiGetParamInt(handle,XI_PRM_CMS_INTENT &cms_intent);
xiSetParamInt(handle, XI_PRM_CMS_INTENT, XI_CMS_INTENT_PERCEPTUAL);

Value Description
XI_CMS_INTENT_PERCEPTUAL CMS intent perceptual
XI_CMS_INTENT_RELATIVE_COLORIMETRIC CMS intent relative colorimetry
XI_CMS_INTENT_SATURATION CMS intent saturation
XI_CMS_INTENT_ABSOLUTE_COLORIMETRIC CMS intent absolute colorimetry

XI_PRM_APPLY_CMS or "apply_cms"

Description: If set to XI_ON applies CMS profile to xiGetImage.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_APPLY_CMS, &value );
xiSetParamInt(handle, XI_PRM_APPLY_CMS, XI_ON);

XI_PRM_INPUT_CMS_PROFILE or "input_cms_profile"

Description: Filename of the input cms profile (e.g. input.icc)

Type: String.
Default value: (default device profile)

Usage:

xiSetParamString(h,XI_PRM_INPUT_CMS_PROFILE,"C:\\ICC\\custom_in.icc",(DWORD) strlen("C:\\ICC\\custom_in.icc"));

XI_PRM_OUTPUT_CMS_PROFILE or "output_cms_profile"

Description: Filename of the output cms profile (e.g. output.icc)

Type: String.
Default value: (sRGB profile)

Usage:

xiSetParamString(h,XI_PRM_INPUT_CMS_PROFILE,"C:\\ICC\\custom_out.icc",(DWORD) strlen("C:\\ICC\\custom_out.icc"));

XI_PRM_IMAGE_IS_COLOR or "iscolor"

Description: Returns 1 for color cameras.

Type: Integer.
Default value: 0

Usage:

xiGetParamInt(handle, XI_PRM_IMAGE_IS_COLOR, &iscolor);

XI_PRM_COLOR_FILTER_ARRAY or "cfa"

Description: Returns color filter array type of RAW data.

Type: Enumerator.
Default value: XI_CFA_NONE

Usage:

xiGetParamInt(handle,XI_PRM_COLOR_FILTER_ARRAY &cfasizeof(value));

Value Description
XI_CFA_NONE Result pixels have no filters applied in this format
XI_CFA_BAYER_RGGB Regular RGGB
XI_CFA_CMYG AK Sony sens
XI_CFA_RGR 2R+G readout
XI_CFA_BAYER_BGGR BGGR readout
XI_CFA_BAYER_GRBG GRBG readout
XI_CFA_BAYER_GBRG GBRG readout
XI_CFA_POLAR_A_BAYER_BGGR BGGR polarized 4x4 macropixel
XI_CFA_POLAR_A Polarized 2x2 macropixel

XI_PRM_GAMMAY or "gammaY"

Description: Luminosity gamma.

Type: Float.
Default value: 0.47

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_GAMMAY, &value);	
xiSetParamFloat(handle, XI_PRM_GAMMAY, value);

XI_PRM_GAMMAC or "gammaC"

Description: Chromaticity gamma.

Type: Float.
Default value: 0.8

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_GAMMAC, &value);	
xiSetParamFloat(handle, XI_PRM_GAMMAC, value);

XI_PRM_SHARPNESS or "sharpness"

Description: Sharpness Strength. The range is -4 (less sharp) to +4 (more sharp).

Type: Float.
Default value: 0

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_SHARPNESS, &value);	
xiSetParamFloat(handle, XI_PRM_SHARPNESS, value);

XI_PRM_CC_MATRIX_00 or "ccMTX00"

Description: Color Correction Matrix element [0][0].

Correction Matrix elements:

	coefficients:				default values:
M_00	M_01	M_02	M_03	=	1.0	0.0	0.0	0.0
M_10	M_11	M_12	M_13	=	0.0	1.0	0.0	0.0
M_20	M_21	M_22	M_23	=	0.0	0.0	1.0	0.0
M_30	M_31	M_32	M_33	=	0.0	0.0	1.0	0.0

Type: Float.
Default value: 1.0

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_CC_MATRIX_00, &value);	
xiSetParamFloat(handle, XI_PRM_CC_MATRIX_00, value);

XI_PRM_DEFAULT_CC_MATRIX or "defccMTX"

Description: Set default Color Correction Matrix

Type: Integer.
Default value: 0

Usage:

int value;
xiSetParamInt(handle, XI_PRM_DEFAULT_CC_MATRIX, value );


Device IO

XI_PRM_TRG_SOURCE or "trigger_source"

Description: Defines source of trigger.

Note: To set input as external trigger, XI_PRM_GPI_MODE of selected input should be set to . See example at XI_PRM_GPI_MODE

Type: Enumerator.
Default value: XI_TRG_OFF

Usage:

xiSetParamInt(handle, XI_PRM_GAIN_SELECTOR, XI_GAIN_SELECTOR_ANALOG_ALL );

Value Description
XI_TRG_OFF Capture of next image is automatically started after previous.
XI_TRG_EDGE_RISING Capture is started on rising edge of selected input.
XI_TRG_EDGE_FALLING Capture is started on falling edge of selected input
XI_TRG_SOFTWARE Capture is started with software trigger.
XI_TRG_LEVEL_HIGH Specifies that the trigger is considered valid as long as the level of the source signal is high.
XI_TRG_LEVEL_LOW Specifies that the trigger is considered valid as long as the level of the source signal is low.

Example: For more examples see xiAPI Camera Trigger and Synchronization Signals

// enable trigger by software
xiSetParamInt(handle, XI_PRM_TRG_SOURCE, XI_TRG_SOFTWARE);
// start acquisition
xiStartAcquisition(handle);
int frames=5;
while (frames--)
	{
	// trigger next image
	int trigger_retry=1000;
	while(--trigger_retry)
		{
		if (XI_OK == xiSetParamInt(handle, XI_PRM_TRG_SOFTWARE, 1))
			break;
		// returns error in case if it is too early
		// to start next exposure
		Sleep(1);
		}
		// get the image
	xiGetImage(handle, 1000, &image);
	}

XI_PRM_TRG_SOFTWARE or "trigger_software"

Description: Generates an internal trigger. XI_PRM_TRG_SOURCE have be set to TRG_SOFTWARE.

Note: In several models xiMU (MU9), xiQ

Type: Integer.
Default value: 0

Usage:

int value;
xiSetParamInt(handle, XI_PRM_TRG_SOFTWARE, value );

XI_PRM_TRG_SELECTOR or "trigger_selector"

Description: This parameter selects the type of trigger. For more information about enumerator XI_TRG_SEL_EXPOSURE_ACTIVE please refer to our Exposure Defined by Trigger Pulse Length support page.

For more information about enumerators: XXI_TRG_SEL_FRAME_BURST_START, XXI_TRG_SEL_FRAME_BURST_ACTIVE please refer to our Frame Burst Modes support page.

For more information about enumerator XI_TRG_SEL_EXPOSURE_START please refer to our Multiple exposures in one frame support page.

Type: Enumerator.
Default value: XI_TRG_SEL_FRAME_START

Usage:

xiGetParamInt(handle,XI_PRM_TRG_SELECTOR &trigger_selector);
xiSetParamInt(handle, XI_PRM_TRG_SELECTOR, XI_TRG_SEL_FRAME_START);

Value Description
XI_TRG_SEL_FRAME_START Selects a trigger starting the capture of one frame
XI_TRG_SEL_EXPOSURE_ACTIVE The trigger controls the start and length of the exposure..
XI_TRG_SEL_FRAME_BURST_START Selects a trigger starting the capture of the bursts of frames in an acquisition.
XI_TRG_SEL_FRAME_BURST_ACTIVE Selects a trigger controlling the duration of the capture of the bursts of frames in an acquisition.
XI_TRG_SEL_MULTIPLE_EXPOSURES Selects a trigger which when first trigger starts exposure and consequent pulses are gating exposure(active HI)
XI_TRG_SEL_EXPOSURE_START Selects a trigger controlling the start of the exposure of one Frame.
XI_TRG_SEL_MULTI_SLOPE_PHASE_CHANGE Selects a trigger controlling the multi slope phase in one Frame (phase0 -> phase1) or (phase1 -> phase2).
XI_TRG_SEL_ACQUISITION_START Selects a trigger starting acquisition of first frame.

XI_PRM_TRG_OVERLAP or "trigger_overlap"

Description: This parameter selects the type of trigger overlap.

Type: Enumerator.
Default value: XI_TRG_OVERLAP_PREV_FRAME

Usage:

xiGetParamInt(handle,XI_PRM_TRG_OVERLAP &trigger_overlap);
xiSetParamInt(handle, XI_PRM_TRG_OVERLAP, XI_TRG_OVERLAP_OFF);

Value Description
XI_TRG_OVERLAP_OFF No trigger overlap is permitted. If camera is in read-out phase, all triggers are rejected.
XI_TRG_OVERLAP_READ_OUT Trigger is accepted only when sensor is ready to start next exposure with defined exposure time. Trigger is rejected when sensor is not ready for new exposure with defined exposure time. Note: This mode is planned and not yet supported by cameras.
XI_TRG_OVERLAP_PREV_FRAME Trigger is accepted by camera any time. If sensor is not ready for the next exposure – the trigger is latched and sensor starts exposure as soon as exposure can be started with defined exposure time.

XI_PRM_ACQ_FRAME_BURST_COUNT or "acq_frame_burst_count"

Description: Sets the number of frames to be acquired after trigger pulse has been sent to the camera. This setting is valid only if the trigger selector is set to FrameBurstStart. For more info please refer to our Frame Burst Modes support page. If burst count is set to zero (0) then number of acquired frames will not be limited (=endless).

Type: Integer.
Default value: 1

Usage:

int value;
xiGetParamInt(handle, XI_PRM_ACQ_FRAME_BURST_COUNT, &value );
xiSetParamInt(handle, XI_PRM_ACQ_FRAME_BURST_COUNT, value);

XI_PRM_TIMESTAMP or "timestamp"

Description: Reads the current timestamp value from camera in nanoseconds.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_TIMESTAMP, &value );


GPIO Setup

XI_PRM_GPI_SELECTOR or "gpi_selector"

Description: Selects GPI.

Type: Enumerator.
Default value: 1

Usage:

xiGetParamInt(handle,XI_PRM_GPI_SELECTOR &gpi_selector);
xiSetParamInt(handle, XI_PRM_GPI_SELECTOR, XI_GPI_PORT1);

Value Description
XI_GPI_PORT1 GPI port 1
XI_GPI_PORT2 GPI port 2
XI_GPI_PORT3 GPI port 3
XI_GPI_PORT4 GPI port 4
XI_GPI_PORT5 GPI port 5
XI_GPI_PORT6 GPI port 6
XI_GPI_PORT7 GPI port 7
XI_GPI_PORT8 GPI port 8
XI_GPI_PORT9 GPI port 9
XI_GPI_PORT10 GPI port 10
XI_GPI_PORT11 GPI port 11
XI_GPI_PORT12 GPI port 12

Example: See XI_PRM_GPI_LEVEL

On each camera family or model the relation of gpi_index and physical pin differs. Following table list the camera families and gpi_index relations.

Models: MQ cameras (MQ.*)

gpi_index physical pin on the camera cable color
1 1 (IN1) Red

Models: MC cameras (MC.*)

gpi_index physical pin on the camera
1 5 (IN1)
2 8 (INOUT1)
3 2 (INOUT2)

Models: MX X2G2 cameras (MX.*X2G2.*)

gpi_index physical pin on the camera
1 22 (IN1)
2 20 (INOUT1)
3 21 (INOUT2)

Models: MX X4G2 cameras (MX.*X4G2.*)

gpi_index physical pin on the camera
1 2 (IN1)
2 4 (IN2)
3 6 (INOUT1)
4 7 (INOUT2)
5 45 (INOUT3)
6 46 (INOUT4)

Models: CB X8G3 cameras (CB.*X8G3.*)

gpi_index physical pin on the camera
1 2 (IN1)
2 1 (IN2)
3 7 (INOUT1)
4 9 (INOUT2)
5 8 (INOUT3)
6 12 (INOUT4)

Models: CB X4G2 cameras (CB.*)

gpi_index physical pin on the camera
1 3 (IN1)
2 4 (IN2)
3 6 (INOUT1)
4 7 (INOUT2)
5 11 (INOUT3)
6 12 (INOUT4)

Models: MX377 MTP cameras (MX377.*MTP.*)

gpi_index physical pin on the camera cable color
1 8 (IN1) Green/Blue
2 13 (IN2) Green/Yellow
3 2 (INOUT1) Blue/Red
4 3 (INOUT2) Red/Brown
5 4 (INOUT3) Yellow/Red
6 5 (INOUT4) Brown/Red
7 12 (INOUT5) Green/White
8 14 (INOUT6) Red/Orange
9 9 (INOUT7) Orange/Red
10 7 (INOUT8) White/Green

XI_PRM_GPI_MODE or "gpi_mode"

Description: Defines GPI functionality.

Note1: To use GPI as trigger source, the XI_PRM_TRG_SOURCE should be also set to XI_TRG_EDGE_RISING or XI_TRG_EDGE_FALLING

Type: Enumerator.
Default value: XI_GPI_OFF

Invalidators: XI_PRM_GPI_SELECTOR

Usage:

xiGetParamInt(handle,XI_PRM_GPI_MODE &gpi_mode);
xiSetParamInt(handle, XI_PRM_GPI_MODE, XI_GPI_OFF);

Value Description
XI_GPI_OFF Input is not used for triggering, but can be used to get parameter GPI_LEVEL. This can be used to switch I/O line on some cameras to input mode.
XI_GPI_TRIGGER Input can be used for triggering
XI_GPI_EXT_EVENT External signal input (not implemented)

Example:

// select digital input (for xiQ=1, for xiC=1 or 2)
int input_id = 1;
xiSetParamInt(handle, XI_PRM_GPI_SELECTOR,  input_id);
// set input as frame trigger
xiSetParamInt(handle, XI_PRM_GPI_MODE, XI_GPI_TRIGGER);
// enable triggering of image from digital input
xiSetParamInt(handle, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_RISING);

XI_PRM_GPI_LEVEL or "gpi_level"

Description: Level of digital input selected by XI_PRM_GPI_SELECTOR

Note: When used on pin that could be input or output (E.g. pin 8 on MC023 camera), then associated GPO needs to be in mode XI_GPO_HIGH_IMPEDANCE . Otherwise pin can be pulled down (GPO_OFF) or up (GPO_ON). Such pins are HIGH_IMPEDANCE as default so application does not to setup it when used only as input.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_GPI_LEVEL, &value );

Example:

// select digital input (different mapping to physical pin on each model, see table below)
int gpi_index = 1;
xiSetParamInt(handle, XI_PRM_GPI_SELECTOR,  gpi_index);
// get input level
int gpi_level = 0;
xiGetParamInt(handle, XI_PRM_GPI_LEVEL,  &gpi_level);
printf("Level on digital input %d is %d\n", gpi_index, gpi_level);

XI_PRM_GPI_LEVEL_AT_IMAGE_EXP_START or "gpi_level_at_image_exp_start"

Description: Level of digital input selected by XI_PRM_GPI_SELECTOR sampled at exposure start of the last image received by GetImage.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_GPI_LEVEL_AT_IMAGE_EXP_START, &value );

Example:

if (XI_OK == xiGetImage(xiH, 5000, &image))
{
  int level_input_1_at_exp_start = 0;
  xiSetParamInt(xiH, XI_PRM_GPI_SELECTOR, 1);
  xiGetParamInt(xiH,XI_PRM_GPI_LEVEL_AT_IMAGE_EXP_START, &level_input_1_at_exp_start);
}

XI_PRM_GPI_LEVEL_AT_IMAGE_EXP_END or "gpi_level_at_image_exp_end"

Description: Level of digital input selected by XI_PRM_GPI_SELECTOR sampled at exposure end of the last image received by GetImage.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_GPI_LEVEL_AT_IMAGE_EXP_END, &value );

Example:

if (XI_OK == xiGetImage(xiH, 5000, &image))
{
  int level_input_2_at_exp_end = 0;
  xiSetParamInt(xiH, XI_PRM_GPI_SELECTOR, 2);
  xiGetParamInt(xiH, XI_PRM_GPI_LEVEL_AT_IMAGE_EXP_END, &level_input_2_at_exp_end);
}

XI_PRM_GPO_SELECTOR or "gpo_selector"

Description: Selects GPO.

Type: Enumerator.
Default value: 1

Usage:

xiGetParamInt(handle,XI_PRM_GPO_SELECTOR &gpo_selector);
xiSetParamInt(handle, XI_PRM_GPO_SELECTOR, XI_GPO_PORT1);

Value Description
XI_GPO_PORT1 GPO port 1
XI_GPO_PORT2 GPO port 2
XI_GPO_PORT3 GPO port 3
XI_GPO_PORT4 GPO port 4
XI_GPO_PORT5 GPO port 5
XI_GPO_PORT6 GPO port 6
XI_GPO_PORT7 GPO port 7
XI_GPO_PORT8 GPO port 8
XI_GPO_PORT9 GPO port 9
XI_GPO_PORT10 GPO port 10
XI_GPO_PORT11 GPO port 11
XI_GPO_PORT12 GPO port 12

Example: See XI_PRM_GPO_MODE

On each camera family or model the relation of gpo_index and physical pin differs. Following table list the camera families and gpi_index relations.

Models: MQ cameras (MQ.*)

gpo_index physical pin on the camera cable color
1 2 (OUT1) White

Models: MC cameras (MC.*)

gpo_index physical pin on the camera
1 3 (OUT1)
2 8 (INOUT1)
3 2 (INOUT2)

Models: MX X2G2 cameras (MX.*X2G2.*)

gpo_index physical pin on the camera
1 24 (OUT1)
2 20 (INOUT1)
3 21 (INOUT2)

Models: MX X4G2 cameras (MX.*X4G2.*)

gpo_index physical pin on the camera
1 50 (OUT1)
2 48 (OUT2)
2 6 (INOUT1)
3 7 (INOUT2)
3 45 (INOUT3)
3 46 (INOUT4)

Models: CB X8G3 cameras (CB.*X8G3.*)

gpo_index physical pin on the camera
1 4 (OUT1)
2 3 (OUT2)
2 7 (INOUT1)
3 9 (INOUT2)
3 8 (INOUT3)
3 12 (INOUT4)

Models: CB X4G2 cameras (CB.*)

gpo_index physical pin on the camera
1 8 (OUT1)
2 9 (OUT2)
2 6 (INOUT1)
3 7 (INOUT2)
3 11 (INOUT3)
3 12 (INOUT4)

Models: MX377 MTP cameras (MX377.*MTP.*)

gpo_index physical pin on the camera cable color
1 19 (OUT1) Orange/Green
2 17 (OUT2) Brown/Green
3 2 (INOUT1) Blue/Red
4 3 (INOUT2) Red/Brown
5 4 (INOUT3) Yellow/Red
6 5 (INOUT4) Brown/Red
7 12 (INOUT5) Green/White
8 14 (INOUT6) Red/Orange
9 9 (INOUT7) Orange/Red
10 7 (INOUT8) White/Green

XI_PRM_GPO_MODE or "gpo_mode"

Description: Defines GPO functionality.

Note1: On some camera models (MR, MH): Modes FRAME_ACTIVE or EXPOSURE_ACTIVE are supported only if XI_PRM_TRG_SOURCE is set to XI_TRG_SOFTWARE or XI_TRG_EDGE_RISING or XI_TRG_EDGE_FALLING. See section XI_PRM_TRG_SOURCE On models xiMU (MU9) xiQ

Note2: Some camera families (e.g. MR) does not support the software control of outputs. Only one of mode: FRAME_ACTIVE and EXPOSURE_ACTIVE can be set.

Note3: Duration of pulse depends on camera model and polarity of signal.

Note4: Each bidirectional line has only one control for inverter (as in GenICam-SFNC). If output mode with _NEG extension is set then also input signal becomes inverted.

Type: Enumerator.
Default value: XI_GPO_OFF

Invalidators: XI_PRM_GPO_SELECTOR

Usage:

xiGetParamInt(handle,XI_PRM_GPO_MODE &gpo_mode);
xiSetParamInt(handle, XI_PRM_GPO_MODE, XI_GPO_OFF);

Value Description
XI_GPO_OFF Output is off (zero voltage or switched_off)
XI_GPO_ON Output is on (voltage or switched_on)
XI_GPO_FRAME_ACTIVE Output is on while frame exposure,read,transfer.
XI_GPO_FRAME_ACTIVE_NEG Output is off while frame exposure,read,transfer.
XI_GPO_EXPOSURE_ACTIVE Output is on while frame exposure
XI_GPO_EXPOSURE_ACTIVE_NEG Output is off while frame exposure
XI_GPO_FRAME_TRIGGER_WAIT OOutput is on while camera is ready for trigger
XI_GPO_FRAME_TRIGGER_WAIT_NEG Output is off while camera is ready for trigger.
XI_GPO_EXPOSURE_PULSE Output is on short pulse at the beginning of frame exposure.
XI_GPO_EXPOSURE_PULSE_NEG Output is off short pulse at the beginning of frame exposure.
XI_GPO_BUSY Output is on when camera has received trigger until end of transfer
XI_GPO_BUSY_NEG Output is off when camera has received trigger until end of transfer
XI_GPO_HIGH_IMPEDANCE Associated pin is in high impedance (tri-stated) and can be driven externally. E.g. for triggering or reading status by GPI_LEVEL.
XI_GPO_FRAME_BUFFER_OVERFLOW Frame buffer overflow status.

Example:

xiSetParamInt(handle, XI_PRM_GPO_SELECTOR, 1);
// make output on (one)
xiSetParamInt(handle, XI_PRM_GPO_MODE,  XI_GPO_ON);
Sleep(1000); // wait to see the output is on (e.g. LED)
// make output off
xiSetParamInt(handle, XI_PRM_GPO_MODE,  XI_GPO_OFF);

XI_PRM_LED_SELECTOR or "led_selector"

Description: Selects LED.

Type: Enumerator.
Default value: 1

Usage:

xiGetParamInt(handle,XI_PRM_LED_SELECTOR &led_selector);
xiSetParamInt(handle, XI_PRM_LED_SELECTOR, XI_LED_SEL1);

Value Description
XI_LED_SEL1 LED 1
XI_LED_SEL2 LED 2
XI_LED_SEL3 LED 3
XI_LED_SEL4 LED 4
XI_LED_SEL5 LED 5

XI_PRM_LED_MODE or "led_mode"

Description: Defines LED functionality.

Type: Enumerator.
Default value: XI_LED_HEARTBEAT

Invalidators: XI_PRM_LED_SELECTOR

Usage:

xiGetParamInt(handle,XI_PRM_LED_MODE &led_mode);
xiSetParamInt(handle, XI_PRM_LED_MODE, XI_LED_HEARTBEAT);

Value Description
XI_LED_HEARTBEAT Set led to blink (1 Hz) if link is OK.
XI_LED_TRIGGER_ACTIVE Set led to blink if trigger detected.
XI_LED_EXT_EVENT_ACTIVE Set led to blink if external signal detected.
XI_LED_LINK Set led to blink if link is OK.
XI_LED_ACQUISITION Set led to blink if data streaming
XI_LED_EXPOSURE_ACTIVE Set led to blink if sensor integration time.
XI_LED_FRAME_ACTIVE Set led to blink if device busy/not busy
XI_LED_OFF Set led to off.
XI_LED_ON Set led to on.
XI_LED_BLINK Blinking (1Hz)

XI_PRM_DEBOUNCE_EN or "dbnc_en"

Description: Enable/Disable debounce to selected GPI (see

XI_PRM_GPI_SELECTOR parameter).

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_DEBOUNCE_EN, &value );
xiSetParamInt(handle, XI_PRM_DEBOUNCE_EN, XI_ON);


Debounce Setup

XI_PRM_DEBOUNCE_T0 or "dbnc_t0"

Description: Debounce time (x * 10us) for transition to inactive level of GPI selected by XI_PRM_DEBOUNCE_POL

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_DEBOUNCE_T0, &value );
xiSetParamInt(handle, XI_PRM_DEBOUNCE_T0, value);

XI_PRM_DEBOUNCE_T1 or "dbnc_t1"

Description: Debounce time (x * 10us)for transition to active level of GPI selected by XI_PRM_DEBOUNCE_POL

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_DEBOUNCE_T1, &value );
xiSetParamInt(handle, XI_PRM_DEBOUNCE_T1, value);

XI_PRM_DEBOUNCE_POL or "dbnc_pol"

Description: Debounce polarity selects active level of GPI (see XI_PRM_GPI_SELECTOR parameter). Does not inverts the signal if set.



Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_DEBOUNCE_POL, &value );
xiSetParamInt(handle, XI_PRM_DEBOUNCE_POL, value);


Lens Control

Note: Some of XIMEA cameras can be equipped with controlled lens. API for lens control contains couple of parameters.

Lens tested OK with CB cameras (2017-04):

  • CANON EF 50mm f/1.4 USM
  • CANON EF 50mm f/1.8 II
  • CANON EF 24-105 f4 L IS USM
  • CANON EF 17-40mm f/4L USM
  • CANON EF 100mm f/2.8 Macro USM
  • CANON EF-S 17-55mm f/2.8 IS USM
  • CANON EF 70-200mm f/4L IS USM
  • CANON EF 50mm f/1.8 STM
  • CANON EF 24mm f/2.8 STM
  • CANON EF 10-18mm f/4.5-5.6 STM
  • CANON EF 18-135mm f/3.5-5.6 STM
  • Sigma 150mm f/2.8 EX DG OS HSM APO Macro
  • Sigma 15mm f/2.8 EX DG

XI_PRM_LENS_MODE or "lens_mode"

Description: Status of lens control interface. This shall be set to XI_ON before any Lens operations.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_LENS_MODE, &value );
xiSetParamInt(handle, XI_PRM_LENS_MODE, XI_ON);

XI_PRM_LENS_APERTURE_VALUE or "lens_aperture_value"

Description: Current lens aperture value in aperture stops. Examples: 2.8, 4, 5.6, 8, 11.

Type: Float.
Default value: 1

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_LENS_APERTURE_VALUE, &value);	
xiSetParamFloat(handle, XI_PRM_LENS_APERTURE_VALUE, value);

XI_PRM_LENS_APERTURE_INDEX or "lens_aperture_index"

Description: Current lens aperture motor step value.

Type: Integer.
Default value: 1

Usage:

int value;
xiGetParamInt(handle, XI_PRM_LENS_APERTURE_INDEX, &value );
xiSetParamInt(handle, XI_PRM_LENS_APERTURE_INDEX, value);

XI_PRM_LENS_FOCUS_MOVEMENT_VALUE or "lens_focus_movement_value"

Description: Lens current focus movement value to be used by XI_PRM_LENS_FOCUS_MOVE in motor steps. Positive numbers will direct the movement to infinity. Negative numbers will direct the movement to macro.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_LENS_FOCUS_MOVEMENT_VALUE, &value );
xiSetParamInt(handle, XI_PRM_LENS_FOCUS_MOVEMENT_VALUE, value);

XI_PRM_LENS_FOCUS_MOVE or "lens_focus_move"

Description: Moves lens focus motor by steps set in XI_PRM_LENS_FOCUS_MOVEMENT_VALUE

Type: Integer.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_LENS_MODE, XI_ON);
xiSetParamFloat(handle, XI_PRM_LENS_FOCUS_MOVEMENT_VALUE, 10);
xiSetParamInt(handle, XI_PRM_LENS_FOCUS_MOVE, 0); // move 10 steps to infinity

XI_PRM_LENS_FOCUS_DISTANCE or "lens_focus_distance"

Description: Lens focus distance in cm.

Type: Float.
Default value: 1000

Usage:

float distance_cm=0;
xiGetParamFloat(handle, XI_PRM_LENS_FOCUS_DISTANCE, &distance_cm);

XI_PRM_LENS_FOCAL_LENGTH or "lens_focal_length"

Description: Lens focal distance in mm. This parameter is constant for prime lens and can change in real time for zoom lens.

Type: Float.
Default value: 1

Usage:

xfloat zoom_min_mm=0;
float zoom_max_mm=0;
xiGetParamFloat(handle, XI_PRM_LENS_FOCAL_LENGTH XI_PRM_INFO_MIN, &zoom_min_mm);
xiGetParamFloat(handle, XI_PRM_LENS_FOCAL_LENGTH XI_PRM_INFO_MAX, &zoom_max_mm);

XI_PRM_LENS_FEATURE_SELECTOR or "lens_feature_selector"

Description: Selects the current feature which is accessible by XI_PRM_LENS_FEATURE

Type: Enumerator.
Default value: XI_LENS_FEATURE_MOTORIZED_FOCUS_SWITCH

Usage:

See parameter XI_PRM_LENS_FEATURE

Value Description
XI_LENS_FEATURE_MOTORIZED_FOCUS_SWITCH Status of lens motorized focus switch
XI_LENS_FEATURE_MOTORIZED_FOCUS_BOUNDED On read = 1 if motorized focus is on one of limits.
XI_LENS_FEATURE_MOTORIZED_FOCUS_CALIBRATION On read = 1 if motorized focus is calibrated. Write 1 to start calibration.
XI_LENS_FEATURE_IMAGE_STABILIZATION_ENABLED On read = 1 if image stabilization is enabled. Write 1 to enable image stabilization.
XI_LENS_FEATURE_IMAGE_STABILIZATION_SWITCH_STATUS On read = 1 if image stabilization switch is in position On.
XI_LENS_FEATURE_IMAGE_ZOOM_SUPPORTED On read = 1 if lens supports zoom = are not prime.

XI_PRM_LENS_FEATURE or "lens_feature"

Description: Allows access to lens feature value currently selected by XI_PRM_LENS_FEATURE_SELECTOR

Type: Float.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_LENS_FEATURE_SELECTOR, XI_LENS_FEATURE_MOTORIZED_FOCUS_SWITCH);
int switch_status=0;
xiGetParamInt(handle, XI_PRM_LENS_FEATURE, &witch_status);
if (switch_status > 0)
   printf("The motorized focus switch on the lens is switched on.\n");


Device info parameters

XI_PRM_DEVICE_NAME or "device_name"

Description: Return device name.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_DEVICE_NAME, &value, sizeof(value));

XI_PRM_DEVICE_TYPE or "device_type"

Description: Returns device type (1394, USB2.0, USB3.0, PCIe, ...).

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_DEVICE_TYPE, &value, sizeof(value));

XI_PRM_DEVICE_MODEL_ID or "device_model_id"

Description: Returns the device model id.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_DEVICE_MODEL_ID, &value );

XI_PRM_SENSOR_MODEL_ID or "sensor_model_id"

Description: Returns the device sensor model id.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_SENSOR_MODEL_ID, &value );

XI_PRM_DEVICE_SN or "device_sn"

Description: Returns device serial number. Only string form is possible. It might contain also alphabet characters.

Type: String.
Default value: 0

Usage:

char sn[20]="";
xiGetParamString(handle, XI_PRM_DEVICE_SN, sn, sizeof(sn));

Example:

// show serial number of this camera
char sn[20]="";
xiGetParamString(handle, XI_PRM_DEVICE_SN, sn, sizeof(sn));
printf("Serial number of the camera is: %s\n",sn);

XI_PRM_DEVICE_SENS_SN or "device_sens_sn"

Description: Returns sensor serial number.

Type: String.
Default value: 0

Usage:

char sens_sn[100]="";
xiGetParamString(handle, XI_PRM_DEVICE_SENS_SN, sens_sn, 100);

XI_PRM_DEVICE_INSTANCE_PATH or "device_inst_path"

Description: Returns device instance path in operating system.

Type: String.
Default value: -

Usage:

xiGetParamString(handle, XI_PRM_DEVICE_INSTANCE_PATH, path, sizeof(path));

XI_PRM_DEVICE_LOCATION_PATH or "device_loc_path"

Description: Returns device location path in operating system. It should reflect the connection position.

Type: String.
Default value: -

Usage:

xiGetParamString(handle, XI_PRM_DEVICE_LOCATION_PATH, path, sizeof(path));

XI_PRM_DEVICE_USER_ID or "device_user_id"

Description: Get/Set custom user ID stored in camera non volatile memory. This can be later used as a handle for opening or identification.

Note1: Available currently on certain models

Note2: For xiB xiC camera devices are supported maximum length 10 characters.

Note3: For xiB xiT xiX camera devices are supported maximum length 4 characters. (Power off/on required after User ID changed)

Type: String.
Default value: -

Usage:

xiGetParamString(handle,XI_PRM_DEVICE_USER_ID,name,sizeof(name));

XI_PRM_DEVICE_MANIFEST or "device_manifest"

Description: Get XML of current device parameters and capabilities.

Note: Available currently on xiQ USB3.0, xiB xiT cameras.

Type: String.
Default value: -

Usage:

char* manifest_data=NULL;
#define MANIF_MAX_SIZE 2*1024*1024
manifest_data = malloc(MANIF_MAX_SIZE);
xiGetParamString(handle,XI_PRM_DEVICE_MANIFEST,manifest_data,MANIF_MAX_SIZE);

XI_PRM_IMAGE_USER_DATA or "image_user_data"

Description: Sets the user data (32bit number) into camera. The following frame captured by camera will have this number stored at image header. The number is accessible later after xiGetImage in XI_IMG structure as image_user_data.

Supported cameras: xiB, xiT

Type: Integer.
Default value: 0

Usage:

uint32_t data=7;
xiSetParamInt(handle,XI_PRM_IMAGE_USER_DATA,data);
xiGetImage(handle,5000,&image);
printf("Image captured has user_data:%d\n",image.image_user_data);


Device acquisition settings

XI_PRM_IMAGE_DATA_FORMAT_RGB32_ALPHA or "imgdataformatrgb32alpha"

Description: The alpha channel of RGB32 output image format(see XI_PRM_IMAGE_DATA_FORMAT ).

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_IMAGE_DATA_FORMAT_RGB32_ALPHA, &value );
xiSetParamInt(handle, XI_PRM_IMAGE_DATA_FORMAT_RGB32_ALPHA, value);

XI_PRM_IMAGE_PAYLOAD_SIZE or "imgpayloadsize"

Description: Buffer size in bytes sufficient for output image returned by GetImage

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_IMAGE_PAYLOAD_SIZE, &value );

XI_PRM_TRANSPORT_PIXEL_FORMAT or "transport_pixel_format"

Description: Transport pixel format is format of data transported by link to transport layer. It might be modified after setting of XI_PRM_IMAGE_DATA_FORMAT , XI_PRM_OUTPUT_DATA_PACKING , XI_PRM_OUTPUT_DATA_BIT_DEPTH , ...

Type: Enumerator.
Default value: XI_GenTL_Image_Format_Mono8

Usage:

xiGetParamInt(handle,XI_PRM_TRANSPORT_PIXEL_FORMAT &transport_pixel_format);
xiSetParamInt(handle, XI_PRM_TRANSPORT_PIXEL_FORMAT, );

XI_PRM_TRANSPORT_DATA_TARGET or "transport_data_target"

Description: Sets image data delivery target to CPU RAM (default) or GPU RAM.

Type: Enumerator.
Default value: XI_TRANSPORT_DATA_TARGET_CPU_RAM

Usage:

xiGetParamInt(handle,XI_PRM_TRANSPORT_DATA_TARGET &transport_data_target);
xiSetParamInt(handle, XI_PRM_TRANSPORT_DATA_TARGET, XI_TRANSPORT_DATA_TARGET_CPU_RAM);

Value Description
XI_TRANSPORT_DATA_TARGET_CPU_RAM normal CPU memory buffer is used for image data
XI_TRANSPORT_DATA_TARGET_GPU_RAM data is delivered straight to GPU memory using GPUDirect technology
XI_TRANSPORT_DATA_TARGET_UNIFIED CUDA managed memory is used for image data.
XI_TRANSPORT_DATA_TARGET_ZEROCOPY CUDA zerocopy memory is used for image data.

XI_PRM_SENSOR_CLOCK_FREQ_HZ or "sensor_clock_freq_hz"

Description: Set or return the sensor clock frequency. This clock is specific to sensor used. See documentation/application for the camera to use this parameter.

Type: Float.
Default value: 0

Invalidators: XI_PRM_LIMIT_BANDWIDTH

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_SENSOR_CLOCK_FREQ_HZ, &value);	
xiSetParamFloat(handle, XI_PRM_SENSOR_CLOCK_FREQ_HZ, value);

XI_PRM_SENSOR_CLOCK_FREQ_INDEX or "sensor_clock_freq_index"

Description: Sensor clock frequency. Selects frequency on cameras which supports only some specific frequencies.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_SENSOR_CLOCK_FREQ_INDEX, &value );
xiSetParamInt(handle, XI_PRM_SENSOR_CLOCK_FREQ_INDEX, value);

XI_PRM_SENSOR_OUTPUT_CHANNEL_COUNT or "sensor_output_channel_count"

Description: Number of output channels from sensor used for data transfer.

Type: Enumerator.
Default value: 0

Usage:

xiGetParamInt(handle,XI_PRM_SENSOR_OUTPUT_CHANNEL_COUNT &sensor_output_channel_count);
xiSetParamInt(handle, XI_PRM_SENSOR_OUTPUT_CHANNEL_COUNT, XI_CHANN_CNT2);

Value Description
XI_CHANN_CNT2 2 sensor readout channels.
XI_CHANN_CNT4 4 sensor readout channels.
XI_CHANN_CNT8 8 sensor readout channels.
XI_CHANN_CNT16 16 sensor readout channels.
XI_CHANN_CNT32 32 sensor readout channels.

XI_PRM_FRAMERATE or "framerate"

Description: Defines frames per second of sensor. On some sensors it is possible to set framerate - see Note. See more details in article Frame Rate Control

Note1: On some camera models it is possible to change or limit acquisition frame rate. Frame rate value should be within possible range. Use following code to get range.

xiGetParamFloat(handle, XI_PRM_FRAMERATE XI_PRM_INFO_MIN, &min_fps);
xiGetParamFloat(handle, XI_PRM_FRAMERATE XI_PRM_INFO_MAX, &max_fps);

Note2: Use following code to set 10 FPS on MQ, MD cameras

xiSetParamInt(h,XI_PRM_ACQ_TIMING_MODE, XI_ACQ_TIMING_MODE_FRAME_RATE);
xiSetParamFloat(h, XI_PRM_FRAMERATE, 10);

Note3: Use following code to limit frame rate 10 to FPS on CB,MT,MX,MC cameras

xiSetParamInt(h,XI_PRM_ACQ_TIMING_MODE, XI_ACQ_TIMING_MODE_FRAME_RATE_LIMIT);
xiSetParamFloat(h, XI_PRM_FRAMERATE, 10);

Type: Float.
Default value: 0

Invalidators: XI_PRM_IMAGE_DATA_FORMAT , XI_PRM_EXPOSURE , XI_PRM_ACQ_TIMING_MODE , XI_PRM_LIMIT_BANDWIDTH

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_FRAMERATE, &value);	
xiSetParamFloat(handle, XI_PRM_FRAMERATE, value);

XI_PRM_COUNTER_SELECTOR or "counter_selector"

Description: Selects which frame counter must be returned

Note1: available only on PCIe cameras xiX xiB xiT cameras.)

Note2: Could be returned number of skipped frames on the transport layer, number of skipped frames on API layer, number of successfully transferred frames.

Type: Enumerator.
Default value: XI_CNT_SEL_TRANSPORT_SKIPPED_FRAMES

Usage:

xiGetParamInt(handle,XI_PRM_COUNTER_SELECTOR &counter_selector);
xiSetParamInt(handle, XI_PRM_COUNTER_SELECTOR, XI_CNT_SEL_TRANSPORT_SKIPPED_FRAMES);

Value Description
XI_CNT_SEL_TRANSPORT_SKIPPED_FRAMES Number of skipped frames on transport layer (e.g. when image gets lost while transmission). Occur when capacity of transport channel does not allow to transfer all data.
XI_CNT_SEL_API_SKIPPED_FRAMES Number of skipped frames on API layer. Occur when application does not process the images as quick as they are received from the camera.
XI_CNT_SEL_TRANSPORT_TRANSFERRED_FRAMES Number of successfully transferred frames on transport layer.
XI_CNT_SEL_FRAME_MISSED_TRIGGER_DUETO_OVERLAP Number of missed triggers due to overlap.
XI_CNT_SEL_FRAME_MISSED_TRIGGER_DUETO_FRAME_BUFFER_OVR Number of missed triggers due to frame buffer full.
XI_CNT_SEL_FRAME_BUFFER_OVERFLOW Frame buffer full counter.

XI_PRM_COUNTER_VALUE or "counter_value"

Description: Returns value of selected (by XI_PRM_COUNTER_SELECTOR ) frame counter.

Note: All counters are reset with the camera open, and counters XI_CNT_SEL_TRANSPORT_SKIPPED_FRAMES, XI_CNT_SEL_API_SKIPPED_FRAMES and XI_CNT_SEL_TRANSPORT_TRANSFERRED_FRAMES are also reset with acquisition start.

Type: Integer.
Default value: 0

Usage:

int number_of_skipped_frames = 0;
xiSetParamInt(handle, XI_PRM_COUNTER_SELECTOR, XI_CNT_SEL_API_SKIPPED_FRAMES);
xiGetParamInt(handle, XI_PRM_COUNTER_VALUE, &number_of_skipped_frames);

XI_PRM_ACQ_TIMING_MODE or "acq_timing_mode"

Description: This parameter defines the acquisition timing mode. More information about enumerators XI_ACQ_TIMING_MODE_FRAME_RATE and XI_ACQ_TIMING_MODE_FRAME_RATE_LIMIT please refer to our Transport Data Packing support page

Type: Enumerator.
Default value: XI_ACQ_TIMING_MODE_FREE_RUN

Usage:

xiGetParamInt(handle,XI_PRM_ACQ_TIMING_MODE &acq_timing_mode);
xiSetParamInt(handle, XI_PRM_ACQ_TIMING_MODE, XI_ACQ_TIMING_MODE_FREE_RUN);

Value Description
XI_ACQ_TIMING_MODE_FREE_RUN camera acquires images at a maximum possible framerate
XI_ACQ_TIMING_MODE_FRAME_RATE Selects a mode when sensor frame acquisition frequency is set to parameter FRAMERATE
XI_ACQ_TIMING_MODE_FRAME_RATE_LIMIT Selects a mode when sensor frame acquisition frequency is limited by parameter FRAMERATE

XI_PRM_AVAILABLE_BANDWIDTH or "available_bandwidth"

Description: Calculate and return available interface bandwidth. Unit is Megabits (1000000) per sec.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AVAILABLE_BANDWIDTH, &value );

XI_PRM_BUFFER_POLICY or "buffer_policy"

Description: Defines buffer handling. Can be safe, data will be copied to user/app buffer or unsafe, user will get internally allocated buffer without data copy. Size of the image buffer can be obtained by parameter XI_PRM_IMAGE_PAYLOAD_SIZE

Note: Click to below link to open simple description of buffer policy. buffer_policy_in_xiApi.png

Type: Enumerator.
Default value: XI_BP_UNSAFE

Usage:

xiGetParamInt(handle,XI_PRM_BUFFER_POLICY &buffer_policy);
xiSetParamInt(handle, XI_PRM_BUFFER_POLICY, XI_BP_UNSAFE);

Value Description
XI_BP_UNSAFE User gets pointer to internally allocated circle buffer and data may be overwritten by device.
XI_BP_SAFE Data from device will be copied to user allocated buffer or xiApi allocated memory.

XI_PRM_LUT_EN or "LUTEnable"

Description: Activates Look-Up-Table (LUT).

Note1: Possible value: 0 - sensor pixels are transferred directly

Note2: Possible value: 1 - sensor pixels are mapped through LUT

Note3: LUT parameters are valid only for some cameras. E.g. xiQ supports LUT. xiMU (MU9PM-MH) does NOT support it.

Note4: For xiQ cameras setting XI_PRM_LUT_EN also uploads previously set values in to camera. Values are latched in API.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_LUT_EN, &value );
xiSetParamInt(handle, XI_PRM_LUT_EN, XI_ON);

XI_PRM_LUT_INDEX or "LUTIndex"

Description: Controls the index (offset) of the coefficient to access in the LUT.

Note1: All xiQ cameras have LUT N-bit to N-bit, based on the XI_PRM_SENSOR_DATA_BIT_DEPTH For the specific camera. All xiC/xiX/xiT cameras have LUT 12-bit to 12-bit.

Note2: Range of applicable indexes depends on sensor digitization bit depth (sensor_bit_depth). It could be obtained:

xiGetParamInt(handle, XI_PRM_LUT_INDEX XI_PRM_INFO_MIN, &minimum_lut_index);
xiGetParamInt(handle, XI_PRM_LUT_INDEX XI_PRM_INFO_MAX, &maximum_lut_index);

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_LUT_INDEX, &value );
xiSetParamInt(handle, XI_PRM_LUT_INDEX, value);

XI_PRM_LUT_VALUE or "LUTValue"

Description: Defines value at entry LUTIndex of the LUT.

Note: Range of applicable values depends on sensor digitization bit depth (sensor_bit_depth). It could be obtained:

xiGetParamInt(handle, XI_PRM_LUT_VALUE XI_PRM_INFO_MIN, &minimum_lut_value);
xiGetParamInt(handle, XI_PRM_LUT_VALUE XI_PRM_INFO_MAX, &maximum_lut_value);

Note: All xiQ cameras have LUT N-bit to N-bit, based on the XI_PRM_SENSOR_DATA_BIT_DEPTH of the specific camera. All xiC/xiX/xiT cameras have LUT 12-bit to 12-bit.

Note: For xiQ cameras setting values has no direct effect on image, only after setting XI_PRM_LUT_EN to value 1, will apply all changes to camera.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_LUT_VALUE, &value );
xiSetParamInt(handle, XI_PRM_LUT_VALUE, value);

XI_PRM_TRG_DELAY or "trigger_delay"

Description: Setting of this parameter is applicable for selected cameras:

Note: Range of applicable values depends on sensor digitization bit depth (sensor_bit_depth). It could be obtained:

xiX, xiB, xiT, xiC xiMU (MU9). Granularity of real delay duration depends on sensor settings (line read out time). Typical granularity is up to 100 microseconds. Maximum time is approx. 100ms for xiMU camera.

Type: Integer.
Default value: 0

Invalidators: XI_PRM_TRG_SELECTOR

Usage:

xiSetParamInt(handle, XI_PRM_TRG_SELECTOR , XI_TRG_SEL_FRAME_START);
xiSetParamInt(handle, XI_PRM_TRG_DELAY , 5000);  //5ms delay

XI_PRM_TS_RST_MODE or "ts_rst_mode"

Description: Defines way time stamp reset engine is armed.

Type: Enumerator.
Default value: XI_TS_RST_ARM_ONCE

Usage:

xiSetParamInt(handle, XI_PRM_TS_RST_MODE , XI_TS_RST_ARM_ONCE);
xiSetParamInt(handle, XI_PRM_TS_RST_SOURCE , XI_TS_RST_SRC_TRIGGER);

Value Description
XI_TS_RST_ARM_ONCE Engine is disabled after time stamp has been reset after selected event.
XI_TS_RST_ARM_PERSIST Engine is armed permanently so each selected event will trigger time stamp reset.

XI_PRM_TS_RST_SOURCE or "ts_rst_source"

Description: Defines source for timestamp reset engine as well as the polarity active signal. The engine is edge sensitive.

Note: Number of active GPI or GPO depends on camera model.

Type: Enumerator.
Default value: XI_TS_RST_OFF

Usage:

xiSetParamInt(handle, XI_PRM_TS_RST_MODE , XI_TS_RST_ARM_ONCE);
xiSetParamInt(handle, XI_PRM_TS_RST_SOURCE , XI_TS_RST_SRC_TRIGGER);

Value Description
XI_TS_RST_OFF No source selected time stamp reset is not armed.
XI_TS_RST_SRC_GPI_1 GPI1 rising edge is active (signal after de-bounce module)
XI_TS_RST_SRC_GPI_2 GPI2 rising edge is active
XI_TS_RST_SRC_GPI_3 GPI3 rising edge is active
XI_TS_RST_SRC_GPI_4 GPI4 rising edge is active
XI_TS_RST_SRC_GPI_1_INV GPI1 falling edge is active
XI_TS_RST_SRC_GPI_2_INV GPI2 falling edge is active
XI_TS_RST_SRC_GPI_3_INV GPI3 falling edge is active
XI_TS_RST_SRC_GPI_4_INV GPI4 falling edge is active
XI_TS_RST_SRC_GPO_1 TimeStamp reset source selected GPO1
XI_TS_RST_SRC_GPO_2 TimeStamp reset source selected GPO2
XI_TS_RST_SRC_GPO_3 TimeStamp reset source selected GPO3
XI_TS_RST_SRC_GPO_4 TimeStamp reset source selected GPO4
XI_TS_RST_SRC_GPO_1_INV TimeStamp reset source selected GPO1 inverted
XI_TS_RST_SRC_GPO_2_INV TimeStamp reset source selected GPO2 inverted
XI_TS_RST_SRC_GPO_3_INV TimeStamp reset source selected GPO3 inverted
XI_TS_RST_SRC_GPO_4_INV TimeStamp reset source selected GPO4 inverted
XI_TS_RST_SRC_TRIGGER TRIGGER to sensor rising edge is active
XI_TS_RST_SRC_TRIGGER_INV TRIGGER to sensor rising edge is active
XI_TS_RST_SRC_SW TRIGGER to sensor rising edge is active
XI_TS_RST_SRC_EXPACTIVE Exposure Active signal rising edge
XI_TS_RST_SRC_EXPACTIVE_INV Exposure Active signal falling edge
XI_TS_RST_SRC_FVAL Frame valid signal rising edge (internal signal in camera)
XI_TS_RST_SRC_FVAL_INV Frame valid signal falling edge (internal signal in camera)
XI_TS_RST_SRC_GPI_5 GPI5 rising edge is active
XI_TS_RST_SRC_GPI_6 GPI6 rising edge is active
XI_TS_RST_SRC_GPI_5_INV GPI5 falling edge is active
XI_TS_RST_SRC_GPI_6_INV GPI6 falling edge is active
XI_TS_RST_SRC_GPI_7 TimeStamp reset source selected GPI7 (after de bounce)
XI_TS_RST_SRC_GPI_8 TimeStamp reset source selected GPI8 (after de bounce)
XI_TS_RST_SRC_GPI_9 TimeStamp reset source selected GPI9 (after de bounce)
XI_TS_RST_SRC_GPI_10 TimeStamp reset source selected GPI10 (after de bounce)
XI_TS_RST_SRC_GPI_11 TimeStamp reset source selected GPI11 (after de bounce)
XI_TS_RST_SRC_GPI_7_INV TimeStamp reset source selected GPI7 inverted (after de bounce)
XI_TS_RST_SRC_GPI_8_INV TimeStamp reset source selected GPI8 inverted (after de bounce)
XI_TS_RST_SRC_GPI_9_INV TimeStamp reset source selected GPI9 inverted (after de bounce)
XI_TS_RST_SRC_GPI_10_INV TimeStamp reset source selected GPI10 inverted (after de bounce)
XI_TS_RST_SRC_GPI_11_INV TimeStamp reset source selected GPI11 inverted (after de bounce)

Extended Device parameters

XI_PRM_IS_DEVICE_EXIST or "isexist"

Description: Returns 1 if camera connected and works properly.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_IS_DEVICE_EXIST, &value );

XI_PRM_ACQ_BUFFER_SIZE or "acq_buffer_size"

Description: Selects type of gain for XI_PRM_GAIN . On some cameras there is possibility to select analog or digital gain separately.

Note1: If the processing of this image takes more time than these 7seconds, the image data will be automatically overwritten with new image data due to the circular character of the buffer.

Note2: The maximal value for this parameter is 2147483647 because it uses the signed integer.

Type: Integer.
Default value: 100000000

Usage:

int value;
xiGetParamInt(handle, XI_PRM_ACQ_BUFFER_SIZE, &value );
xiSetParamInt(handle, XI_PRM_ACQ_BUFFER_SIZE, value);

Example: Sensor gives 1MB of data per image @ 10 frames/second, Application retrieves image data by xiGetImagem, Application has access to the frame at most 7 seconds (70MB/(1MB*10fps))

xiSetParamInt(handle, XI_PRM_ACQ_BUFFER_SIZE, 70*1000*1000);

XI_PRM_ACQ_BUFFER_SIZE_UNIT or "acq_buffer_size_unit"

Description: Acquisition buffer size unit. Default 1. E.g. Value 1024 means that buffer_size is in KiBytes.

Type: Integer.
Default value: 1

Usage:

// set unit to 1 MiB
xiSetParamInt(handle, XI_PRM_ACQ_BUFFER_SIZE_UNIT, 1024*1024);
// set buffer size to 200 MiB
xiSetParamInt(handle, XI_PRM_ACQ_BUFFER_SIZE, 200);

XI_PRM_ACQ_TRANSPORT_BUFFER_SIZE or "acq_transport_buffer_size"

Description: Size of one transport buffer in bytes (only valid for MQ,MD camera families). Frame/Field can contain multiple transport buffers. To decrease CPU load and increase system performance on committing transport buffers to kernel driver, transport buffer size has to be as high as possible. However in case of small Frame/Field size and high framerates it is necessary to decrease transport buffer size and increase queue of Frame/Field buffers( XI_PRM_BUFFERS_QUEUE_SIZE ). Check out How to optimize software performance on high frame rates for more info.

Note: Whole range minimum to maximum is not guaranteed on all tested configurations. Please be aware of possible issues on some controllers.

Type: Integer.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_ACQ_TRANSPORT_BUFFER_SIZE, size_in_bytes);

Example: Application set transport buffer size to 128KiB for small (80KB images)

xiSetParamInt(handle, XI_PRM_ACQ_TRANSPORT_BUFFER_SIZE, 128*1024);

XI_PRM_ACQ_TRANSPORT_PACKET_SIZE or "acq_transport_packet_size"

Description: Acquisition transport packet size in bytes. (only valid for MQ,MD camera families)

Type: Integer.
Default value: 0

Usage:

// Get packet size
xiGetParamInt(handle, XI_PRM_ACQ_TRANSPORT_PACKET_SIZE, &packet_size);

XI_PRM_BUFFERS_QUEUE_SIZE or "buffers_queue_size"

Description: XI_PRM_BUFFERS_QUEUE_SIZE - 1 is the maximum number of images which can be stored in the buffers queue.

Type: Integer.
Default value: 4

Invalidators: XI_PRM_ACQ_BUFFER_SIZE

Usage:

xiSetParamInt(handle, XI_PRM_ACQ_TRANSPORT_BUFFER_SIZE, size_in_bytes);

Example: Application sets queue size to 7

Sensor acquires images at 10 frames/second. It means new image is acquired every 100ms, therefore queue can contain up to 6 images acquired during 600ms (=6*100ms) time span.

Application needs typically 40ms for processing of an image

If it takes 400ms for the application to process one of the images (e.g. saving it to a server) the subsequent 4 frames are still available since they are stored in the queue (images 17-19 on the below figure).



Illustration of normal status when application is processing one frame longer

If it takes 1000ms for the application to process one of the images, the buffer queue will fill up and some images will be skipped (images 16-20 on the below figure). The user can check for such situation by checking the image sequence number (nframe of XI_IMG structure) of each image.



Illustration of state when application gets late. Longer than queue.

The application can work with the image data at most acq_buffer_size/(frame_rate_FPS*bytes_per_frame) seconds before the data is overwritten due to the circular character of the buffer. If the application needs more time to process the image, XI_PRM_BUFFER_POLICY

must be set to XI_BP_SAFE. In this case API copies the image to a user/API allocated memory where it can be accessed without the risk of being overwritten. This copying however takes extra CPU time.

XI_PRM_ACQ_TRANSPORT_BUFFER_COMMIT or "acq_transport_buffer_commit"

Description: Defines number of buffers to commit to low level. (only valid for MQ,MD camera families)

Type: Integer.
Default value: 1

Usage:

int value;
xiGetParamInt(handle, XI_PRM_ACQ_TRANSPORT_BUFFER_COMMIT, &value );
xiSetParamInt(handle, XI_PRM_ACQ_TRANSPORT_BUFFER_COMMIT, value);

XI_PRM_RECENT_FRAME or "recent_frame"

Description: This parameter changes the behavior of xiGetImage.

Note1: possible value: 0 - Retrieves next available image from buffer

Note2: possible value: 1 - Retrieves the most recent image from buffer

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_RECENT_FRAME, &value );
xiSetParamInt(handle, XI_PRM_RECENT_FRAME, XI_ON);

XI_PRM_DEVICE_RESET or "device_reset"

Description: Resets the camera firmware. From the functional view, it is the same as disconnection and connection of the camera.It is typically followed by an enumeration of the operating system which might take some time (e.g. 10 seconds). Application shall wait some time after the reset and then use xiGetNumberDevices in order to enumerate the camera again. It should be used on the device with the stopped acquisition. After re-enumeration closing of the old device to release its handler is recommended. A new handler should be used for further image acquisition.

Note: currently supported only for xiQ camera family

Type: Integer.
Default value: 0

Usage:

xiSetParamInt(old_handle, XI_PRM_DEVICE_RESET, 1);
Sleep(10000); // wait 10 seconds for enumeration by OS
DWORD devices_count=0;
xiGetNumberDevices(&devices_count);
xiCloseDevice(old_handle);
HANDLE new_handle= NULL;
xiOpenDevice(0, &new_handle);


Sensor Defects Correction

XI_PRM_COLUMN_FPN_CORRECTION or "column_fpn_correction"

Description: Correction of column fpn.

Type: Enumerator.
Default value: XI_OFF

Usage:

xiGetParamInt(handle,XI_PRM_COLUMN_FPN_CORRECTION &column_fpn_correction);
xiSetParamInt(handle, XI_PRM_COLUMN_FPN_CORRECTION, XI_OFF);

Value Description
XI_OFF Turn parameter off
XI_ON Turn parameter on

XI_PRM_ROW_FPN_CORRECTION or "row_fpn_correction"

Description: Correction of row fpn.

Type: Enumerator.
Default value: XI_OFF

Usage:

xiGetParamInt(handle,XI_PRM_ROW_FPN_CORRECTION &row_fpn_correction);
xiSetParamInt(handle, XI_PRM_ROW_FPN_CORRECTION, XI_OFF);

Value Description
XI_OFF Turn parameter off
XI_ON Turn parameter on

Sensor features

XI_PRM_SENSOR_MODE or "sensor_mode"

Description: Current sensor mode. Allows to select sensor mode by one integer. Setting of this parameter affects: image dimensions and downsampling.

Type: Enumerator.
Default value: 0

Usage:

xiGetParamInt(handle,XI_PRM_SENSOR_MODE &sensor_mode);
xiSetParamInt(handle, XI_PRM_SENSOR_MODE, XI_SENS_MD0);

Value Description
XI_SENS_MD0 Sensor mode number 0
XI_SENS_MD1 Sensor mode number 1
XI_SENS_MD2 Sensor mode number 2
XI_SENS_MD3 Sensor mode number 3
XI_SENS_MD4 Sensor mode number 4
XI_SENS_MD5 Sensor mode number 5
XI_SENS_MD6 Sensor mode number 6
XI_SENS_MD7 Sensor mode number 7
XI_SENS_MD8 Sensor mode number 8
XI_SENS_MD9 Sensor mode number 9
XI_SENS_MD10 Sensor mode number 10
XI_SENS_MD11 Sensor mode number 11
XI_SENS_MD12 Sensor mode number 12
XI_SENS_MD13 Sensor mode number 13
XI_SENS_MD14 Sensor mode number 14
XI_SENS_MD15 Sensor mode number 15

XI_PRM_HDR or "hdr"

Description: Enable High Dynamic Range sensor feature.

Note1: enables HDR mode for certain type of sensors. For more information see HDR mode

Note2: support page.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_HDR, &value );
xiSetParamInt(handle, XI_PRM_HDR, XI_ON);

XI_PRM_HDR_KNEEPOINT_COUNT or "hdr_kneepoint_count"

Description: number of kneepoints.

Note1: Defines the number of kneepoints in the Piecewise Linear Response (PWLR) curve.

Note2: In case of one kneepoint, the kneepoint is defined by parameters (T2,SL2). In case of two kneepoints define both (T1,SL1), (T2,SL2).

Type: Integer.
Default value: 1

Usage:

int value;
xiGetParamInt(handle, XI_PRM_HDR_KNEEPOINT_COUNT, &value );
xiSetParamInt(handle, XI_PRM_HDR_KNEEPOINT_COUNT, value);

XI_PRM_HDR_T1 or "hdr_t1"

Description: Exposure time (T1) of 1st kneepoint in % of XI_PRM_EXPOSURE

Type: Integer.
Default value: 60

Usage:

int value;
xiGetParamInt(handle, XI_PRM_HDR_T1, &value );
xiSetParamInt(handle, XI_PRM_HDR_T1, value);

XI_PRM_HDR_T2 or "hdr_t2"

Description: Exposure time (T2) of 2nd kneepoint in % of

Type: Integer.
Default value: 80

Usage:

int value;
xiGetParamInt(handle, XI_PRM_HDR_T2, &value );
xiSetParamInt(handle, XI_PRM_HDR_T2, value);

XI_PRM_KNEEPOINT1 or "hdr_kneepoint1"

Description: Saturation level (SL1) of 1st kneepoint in % of sensor saturation.

Type: Integer.
Default value: 40

Usage:

int value;
xiGetParamInt(handle, XI_PRM_KNEEPOINT1, &value );
xiSetParamInt(handle, XI_PRM_KNEEPOINT1, value);

XI_PRM_KNEEPOINT2 or "hdr_kneepoint2"

Description: Saturation level (SL2) of 2nd kneepoint in % of sensor saturation.

Type: Integer.
Default value: 60

Usage:

int value;
xiGetParamInt(handle, XI_PRM_KNEEPOINT2, &value );
xiSetParamInt(handle, XI_PRM_KNEEPOINT2, value);

XI_PRM_IMAGE_BLACK_LEVEL_UPDATE or "image_black_level_update"

Description: Allows user to set black level.

Note1: User can define black level to API(processing) by parameter

wrong decleration of description

Note2: User can define black level to device by parameter

wrong decleration of description

Type: Enumerator.
Default value: XI_IMAGE_BLACK_LEVEL_UPDATE_AUTO

Usage:

xiGetParamInt(handle,XI_PRM_IMAGE_BLACK_LEVEL_UPDATE &image_black_level_update);
xiSetParamInt(handle, XI_PRM_IMAGE_BLACK_LEVEL_UPDATE, XI_IMAGE_BLACK_LEVEL_UPDATE_AUTO);

Value Description
XI_IMAGE_BLACK_LEVEL_UPDATE_AUTO Camera or software defines black level automatically.
XI_IMAGE_BLACK_LEVEL_UPDATE_SW (see Note1*)
XI_IMAGE_BLACK_LEVEL_UPDATE_HW (see Note2*)

XI_PRM_IMAGE_BLACK_LEVEL or "image_black_level"

Description: Black level is calculated level (in pixel counts) that should reflect the value of pixels without light. It should be the same as XI_IMG.black_level from last image get using xiGetImage.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_IMAGE_BLACK_LEVEL, &value );
xiSetParamInt(handle, XI_PRM_IMAGE_BLACK_LEVEL, value);


Version info

XI_PRM_API_VERSION or "api_version"

Description: Returns the version of API.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_API_VERSION, &value, sizeof(value));

XI_PRM_DRV_VERSION or "drv_version"

Description: Returns the version of the current device driver.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_DRV_VERSION, &value, sizeof(value));

XI_PRM_MCU1_VERSION or "version_mcu1"

Description: Returns the version of the current MCU1 firmware.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_MCU1_VERSION, &value, sizeof(value));

XI_PRM_MCU2_VERSION or "version_mcu2"

Description: Returns the version of the current MCU2 firmware.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_MCU2_VERSION, &value, sizeof(value));

XI_PRM_MCU3_VERSION or "version_mcu3"

Description: Returns the version of the current MCU3 firmware.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_MCU3_VERSION, &value, sizeof(value));

XI_PRM_FPGA1_VERSION or "version_fpga1"

Description: Returns version of FPGA firmware currently running.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_FPGA1_VERSION, &value, sizeof(value));

XI_PRM_XMLMAN_VERSION or "version_xmlman"

Description: Returns version of XML manifest.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_XMLMAN_VERSION, &value, sizeof(value));

XI_PRM_HW_REVISION or "hw_revision"

Description: Returns the hardware revision number of the camera.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_HW_REVISION, &value, sizeof(value));


API features

XI_PRM_DEBUG_LEVEL or "debug_level"

Description: Setting the API debug level allows to select amount of messages stored to debug output.

Note1: In Windows use DebugView to view the current messages.

Note2: In Linux the messages are printed to stderr

Note3: Prints same as XI_DL_TRACE plus locking of resources

Type: Enumerator.
Default value: XI_DL_WARNING

Usage:

xiGetParamInt(handle,XI_PRM_DEBUG_LEVEL &debug_level);
xiSetParamInt(handle, XI_PRM_DEBUG_LEVEL, XI_DL_DETAIL);

Value Description
XI_DL_DETAIL See Note3*
XI_DL_TRACE Prints errors, warnings and important informations
XI_DL_WARNING Prints all errors and warnings
XI_DL_ERROR Prints all errors
XI_DL_FATAL Prints only important errors
XI_DL_DISABLED Prints no messages

XI_PRM_AUTO_BANDWIDTH_CALCULATION or "auto_bandwidth_calculation"

Description: Setting this parameter the application can control API behavior. Setting to XI_OFF - API will skip auto bandwidth measuring and calculation before opening the camera (xiOpenDevice). Setting to XI_ON the measurement is enabled (default).

Note: It is important to set this parameter to XI_OFF in case when multiple cameras are connected to one hub with enabled acquisition and new camera should be opened - to not affect overall streaming by auto bandwidth measurement.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_AUTO_BANDWIDTH_CALCULATION, &value );
xiSetParamInt(handle, XI_PRM_AUTO_BANDWIDTH_CALCULATION, XI_ON);

XI_PRM_NEW_PROCESS_CHAIN_ENABLE or "new_process_chain_enable"

Description: Setting this parameter the application can control API behavior. When set to XI_OFF - API will use original processing in image pipe for cameras families MU, MQ, MD. Setting to XI_ON - API will use newer processing type.

Note: There are some differences between processing so the switching may be done with caution. For older implementation we advise to stick to original processing. Only if some features require the newer processing it might be enabled. Switching may be done before xiOpenDevice.

Type: Integer.
Default value: 1

Usage:

int value;
xiGetParamInt(handle, XI_PRM_NEW_PROCESS_CHAIN_ENABLE, &value );
xiSetParamInt(handle, XI_PRM_NEW_PROCESS_CHAIN_ENABLE, XI_ON);

XI_PRM_PROC_NUM_THREADS or "proc_num_threads"

Description: Number of threads per image processor. An application can change this number in order to optimize performance or decrease number of threads to save resources.

Note: this parameter does not work for MQ, MD camera families and for MU9Px-MH camera.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_PROC_NUM_THREADS, &value );
xiSetParamInt(handle, XI_PRM_PROC_NUM_THREADS, value);


Camera FFS

Note: Some of XIMEA cameras contain Flash File System. It allows to store/read small customer file in each camera. For more information visit our knowledge base article How to work with FFS

XI_PRM_READ_FILE_FFS or "read_file_ffs"

Description: Name of file to be written/read from camera FFS.

Note: On MX,MC,CB,MT cameras family, there is limited set of filenames. User's application can use filenames: User1, User2, User3 to store some application specific data.

Type: String.
Default value: -

Usage:

char filename[100]="User1";
xiSetParamString(handle, XI_PRM_FFS_FILE_NAME, filename, size);

Example: Example below reads the sensor defects file. This file exist on xiQ cameras.

// set filename
char filename[100]="bad_pixel_list.txt";
stat = xiSetParamString(xiH, XI_PRM_FFS_FILE_NAME, filename, sizeof(filename));
HandleResult(stat,"xiSetParamString (XI_PRM_FFS_FILE_NAME)");
// allocate buffer
#define MAX_FILE_SIZE 1000*1000 // 1MB
char* file_content=NULL;
file_content = (char*) calloc(1,MAX_FILE_SIZE);
if (!file_content)
{
  printf("Error on memory allocation for file content.\n");
  return;
}
// read file
stat = xiGetParamString(xiH, XI_PRM_READ_FILE_FFS, file_content, MAX_FILE_SIZE);
HandleResult(stat,"xiGetParamString (XI_PRM_READ_FILE_FFS)");
// print file content
printf("Text read from FFS file:%s\n%s\n\n", filename, file_content);
free(file_content);

Example: For reading out Hyper-Spectral sensor calibration data from the camera - use the same code as above, but replace the filename with 'sens_calib.dat'. Code to be used for HSI Calibration:

// set filename for HSI Sensor Calibration
char filename[100]="sens_calib.dat";
stat = xiSetParamString(xiH, XI_PRM_FFS_FILE_NAME, filename, sizeof(filename));
// continue like in example for reading FFS file

XI_PRM_WRITE_FILE_FFS or "write_file_ffs"

Description: File data to be written to camera flash file system.

Type: String.
Default value: -

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_WRITE_FILE_FFS, &value, sizeof(value));
xiSetParamString(handle, XI_PRM_WRITE_FILE_FFS , value, strlen(value));

Example: Write file:

xiSetParamString(xiH, XI_PRM_FFS_FILE_NAME, "User1", strlen("User1"));
char* file_content="ABCDEFGH";
xiSetParamString(xiH, XI_PRM_WRITE_FILE_FFS, file_content, strlen(file_content));

Example: Delete file:

xiSetParamString(xiH, XI_PRM_FFS_FILE_NAME, "filename.txt", strlen("filename.txt"));
xiSetParamString(xiH, XI_PRM_WRITE_FILE_FFS, NULL, 0)

XI_PRM_FFS_FILE_NAME or "ffs_file_name"

Description: Name of file to be written/read from camera FFS.

Note: On MX,MC,CB,MT cameras family, there is limited set of filenames. User's application can use filenames: User1, User2, User3 to store some application specific data.

Type: String.
Default value: -

Usage:

char filename[100]="User1";
xiSetParamString(handle, XI_PRM_FFS_FILE_NAME, filename, size););

XI_PRM_FFS_FILE_ID or "ffs_file_id"

Description: File number(id) in camera FFS.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_FFS_FILE_ID, &value );

Example: Get list of files:

int max_file_id = 0;
		xiGetParamInt(xiH, XI_PRM_FFS_FILE_ID XI_PRM_INFO_MAX, &max_file_id);
	char file_name[MAX_PATH];

	for(int i = 0; i <= max_file_id; i++)
	{
		memset(file_name, 0, MAX_PATH);
		stat = xiSetParamInt(xiH, XI_PRM_FFS_FILE_ID, i);
		stat = xiGetParamString(xiH, XI_PRM_FFS_FILE_NAME, file_name, MAX_PATH);
	}

XI_PRM_FFS_FILE_SIZE or "ffs_file_size"

Description: Size of a file specified with parameter XI_PRM_FFS_FILE_ID in bytes.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_FFS_FILE_SIZE, &value );

XI_PRM_FREE_FFS_SIZE or "free_ffs_size"

Description: Size of free camera flash file system space in bytes.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_FREE_FFS_SIZE, &value );

XI_PRM_USED_FFS_SIZE or "used_ffs_size"

Description: Size of used camera flash file system space in bytes.

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_USED_FFS_SIZE, &value );

XI_PRM_FFS_ACCESS_KEY or "ffs_access_key"

Description: Setting of the key enables file operations on some cameras. It is required to set before usage of

Type: Integer.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_FFS_ACCESS_KEY, 0x12345678);


APIContextControl

XI_PRM_API_CONTEXT_LIST or "xiapi_context_list"

Description: API Context contains text representation of current settings for offline image processing. It can be get while acquisition to store the context. Respectively it can be set while offline processing - to restore context.

Type: String.
Default value:

Usage:

char value[200]="";
xiGetParamString(handle, XI_PRM_API_CONTEXT_LIST, &value, sizeof(value));
xiSetParamString(handle, XI_PRM_API_CONTEXT_LIST , value, strlen(value));


Sensor Control

Note: Some of XIMEA cameras has sensors with specific features.

XI_PRM_SENSOR_FEATURE_SELECTOR or "sensor_feature_selector"

Description: Selects the current feature which is accessible by XI_PRM_SENSOR_FEATURE_VALUE

Note1: Selector description

Note2: XI_SENSOR_FEATURE_ZEROROT_ENABLE

When this feature is enabled the readout for pixel line is overlapped with vertical shift of pixels from pixel are to readout shift registers. This effectively can eliminate time needed between consequent live readouts. The price for it is that the dynamic range is lower by 6dB compared to normal ROT.

Note3: XI_SENSOR_FEATURE_ACQUISITION_RUNNING

When this feature value is 1 - acquisition is running. Application can stop just acquisition of the sensor without freeing of image buffers by setting this value to 0. Then acquisition could be resumed by setting 1. It is also much faster compared to xiStopAcquisition/xiStartAcquisition

Note4: This feature can be also added to CamTool

Note5: This feature can be also added to xiapi_camera_description_FULL.xml

Note6: to \XIMEA\XIMEACamTool64\camdesc and replace the original file. When CamTool is opened, there are two xiAPI parameters of this feature (Sensor feature selector, Sensor feature value) in Performance tab on the right side (Visibility level: Guru). Select Enable Zero ROT and check Sensor feature value.

Type: Enumerator.
Default value: XI_SENSOR_FEATURE_ZEROROT_ENABLE

Usage:

xiGetParamInt(handle,XI_PRM_SENSOR_FEATURE_SELECTOR &sensor_feature_selector);
xiSetParamInt(handle, XI_PRM_SENSOR_FEATURE_SELECTOR, XI_SENSOR_FEATURE_ZEROROT_ENABLE);

Value Description
XI_SENSOR_FEATURE_ZEROROT_ENABLE Zero ROT enable for ONSEMI PYTHON family. For camera model:MQ013xG-ON
XI_SENSOR_FEATURE_BLACK_LEVEL_CLAMP Black level offset clamping. for Camera model:MD
XI_SENSOR_FEATURE_MD_FPGA_DIGITAL_GAIN_DISABLE Disable digital component of gain for MD family
XI_SENSOR_FEATURE_ACQUISITION_RUNNING Sensor acquisition is running status. Could be stopped by setting of 0. For camera model:CB,MC,MX,MT
XI_SENSOR_FEATURE_TIMING_MODE Set Sensor timing mode
XI_SENSOR_FEATURE_PARALLEL_ADC Parallel ADC readout

XI_PRM_SENSOR_FEATURE_VALUE or "sensor_feature_value"

Description: Allows access to sensor feature value currently selected by XI_PRM_SENSOR_FEATURE_SELECTOR

Type: Integer.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_SENSOR_FEATURE_SELECTOR, XI_SENSOR_FEATURE_ZEROROT_ENABLE);
xiSetParamInt(handle, XI_PRM_SENSOR_FEATURE_VALUE, XI_ON);


Extended Features

XI_PRM_ACQUISITION_STATUS_SELECTOR or "acquisition_status_selector"

Description: Selects the internal acquisition signal to read using XI_PRM_ACQUISITION_STATUS

Type: Enumerator.
Default value: XI_ACQUISITION_STATUS_ACQ_ACTIVE

Usage:

xiGetParamInt(handle,XI_PRM_ACQUISITION_STATUS_SELECTOR &acquisition_status_selector);
xiSetParamInt(handle, XI_PRM_ACQUISITION_STATUS_SELECTOR, XI_ACQUISITION_STATUS_ACQ_ACTIVE);

Value Description
XI_ACQUISITION_STATUS_ACQ_ACTIVE Device is currently doing an acquisition of one or many frames.

XI_PRM_ACQUISITION_STATUS or "acquisition_status"

Description: Returns status of acquisition.

Type: Enumerator.
Default value: XI_OFF

Usage:

xiGetParam(handle, XI_PRM_ACQUISITION_STATUS, &value, sizeof(int), xiTypeInteger);
int xiGetParamInt(handle, XI_PRM_ACQUISITION_STATUS, &value);

Value Description
XI_OFF Turn parameter off
XI_ON Turn parameter on

XI_PRM_DP_UNIT_SELECTOR or "dp_unit_selector"

Description: Data Pipe Unit Selector.

Type: Enumerator.
Default value: XI_DP_UNIT_SENSOR

Usage:

xiGetParamInt(handle,XI_PRM_DP_UNIT_SELECTOR &dp_unit_selector);
xiSetParamInt(handle, XI_PRM_DP_UNIT_SELECTOR, XI_DP_UNIT_SENSOR);

Value Description
XI_DP_UNIT_SENSOR Selects device image sensor
XI_DP_UNIT_FPGA Selects device image FPGA

XI_PRM_DP_PROC_SELECTOR or "dp_proc_selector"

Description: Data Pipe Processor Selector.

Type: Enumerator.
Default value: XI_DP_PROC_NONE

Invalidators: XI_PRM_DP_UNIT_SELECTOR

Usage:

xiGetParamInt(handle,XI_PRM_DP_PROC_SELECTOR &dp_proc_selector);
xiSetParamInt(handle, XI_PRM_DP_PROC_SELECTOR, XI_DP_PROC_NONE);

Value Description
XI_DP_PROC_NONE Default empty processor
XI_DP_PROC_CHANNEL_MUXER Channel Muxer (selected processor combines multiple input channels)
XI_DP_PROC_PIXEL_SEQUENCER Selects pixel data output sequence
XI_DP_PROC_CHANNEL_1 Selects sensor output channel 1
XI_DP_PROC_CHANNEL_2 Selects sensor output channel 2
XI_DP_PROC_FRAME_BUFFER Selects frame buffer memory

XI_PRM_DP_PARAM_SELECTOR or "dp_param_selector"

Description: Data Pipe Processor parameter Selector.

Type: Enumerator.
Default value: XI_DP_PARAM_NONE

Invalidators: XI_PRM_DP_UNIT_SELECTOR , XI_PRM_DP_PROC_SELECTOR

Usage:

xiGetParamInt(handle,XI_PRM_DP_PARAM_SELECTOR &dp_param_selector);
xiSetParamInt(handle, XI_PRM_DP_PARAM_SELECTOR, XI_DP_PARAM_NONE);

Value Description
XI_DP_PARAM_NONE Empty parameter
XI_DP_PARAM_CHMUX_CHANNEL_SELECTOR Defines output of Channel Muxer processor
XI_DP_PARAM_CHMUX_ALPHA Channel merger coefficient Alpha
XI_DP_PARAM_CHMUX_BETA Channel merger coefficient Beta
XI_DP_PARAM_PIXSEQ_SELECTOR PixSeq Selector
XI_DP_PARAM_CHANNEL_TIMING Selected channel timing
XI_DP_PARAM_FRAMEBUF_MODE Frame Buffer Mode
XI_DP_PARAM_FRAMEBUF_SIZE Frame Buffer Size Bytes

XI_PRM_DP_PARAM_VALUE or "dp_param_value"

Description: Data Pipe processor parameter value.

Type: Float.
Default value: 0

Invalidators: XI_PRM_DP_UNIT_SELECTOR , XI_PRM_DP_PROC_SELECTOR , XI_PRM_DP_PARAM_SELECTOR

Usage:

float value;
xiGetParamFloat(handle, XI_PRM_DP_PARAM_VALUE, &value);	
xiSetParamFloat(handle, XI_PRM_DP_PARAM_VALUE, value);

XI_PRM_GENTL_DATASTREAM_ENABLED or "gentl_stream_en"

Description: Control of GenTL data stream. Enabling by XI_ON the acquisition buffering must be controlled by GenTL interface (e.g. DSAllocAndAnnounceBuffer, DSQueueBuffer)

Type: Integer.
Default value: 0

Usage:

int value;
xiGetParamInt(handle, XI_PRM_GENTL_DATASTREAM_ENABLED, &value );
xiSetParamInt(handle, XI_PRM_GENTL_DATASTREAM_ENABLED, XI_ON);

XI_PRM_GENTL_DATASTREAM_CONTEXT or "gentl_stream_context"

Description: Pointer to GenTL stream context. It can be used later with GenTL buffers handling.

Note: See more details in the example xiAPI-capture-50-images-gentl.

Type: String.
Default value: 0

Usage:

xiSetParamInt(handle, XI_PRM_GENTL_DATASTREAM_ENABLED, XI_ON);
void* stream_h=NULL;
xiGetParamString(handle, XI_PRM_GENTL_DATASTREAM_CONTEXT, &stream_h, sizeof(void*)));
void* buffer_handle=NULL;
AllocAndAnnounceBuffer(stream_h, payload_size, NULL, &buffer_handle);


API parameter modifiers

Description: The parameter modifiers allow you to acquire more information about the camera parameters (e.g. min. or max. value). Also with certain parameters they allow direct update of these parameters without interrupting the image acquisition loop (e.g. setting of exposure and gain).

XI_PRM_INFO_MIN

Description: Acquire parameter minimum value

Usage:

xiGetParamInt(handle, XI_PRM_EXPOSURE XI_PRM_INFO_MIN, &exp_min);

XI_PRM_INFO_MAX

Description: Acquire parameter maximum value.

Usage:

xiGetParamInt(handle, XI_PRM_EXPOSURE XI_PRM_INFO_MAX, &exp_max);

XI_PRM_INFO_INCREMENT

Description: Get parameter possible increment step. The setting of value is limited to values MinumumValue+(N*IncrementValue)

Usage:

xiGetParamInt(handle, XI_PRM_HEIGHT XI_PRM_INFO_INCREMENT, &height_inc);

XI_PRM_DIRECT_UPDATE

Description: Parameter modifier for direct update without stopping the streaming. Currently XI_PRM_EXPOSURE and XI_PRM_GAIN can be used with this modifier.

Usage:

xiSetParamInt(handle, XI_PRM_EXPOSURE XI_PRMM_DIRECT_UPDATE, exp_val);
xiSetParamInt(handle, XI_PRM_GAIN XI_PRMM_DIRECT_UPDATE, gain_val);


Image Buffers Queue

Functionality

The Image Buffers is first-in first-out (FIFO) type of queue.

Capturing

Each captured image is stored in the buffers queue. When application calls xiGetImage - the oldest image is removed from queue. Maximum number of images in queue can be set by parameter XI_PRM_BUFFERS_QUEUE_SIZE.

Flushing the queue

The images remain in the queue until they are overwritten or flushed. The queue is flushed on one of following conditions:
  • acquisition is stopped (xiStopAcquisition)
  • application set some of parameters using xiSetParam:
    • Exposure (XI_PRM_EXPOSURE) *Note
    • Gain (XI_PRM_GAIN) *Note
    • Downsampling (XI_PRM_DOWNSAMPLING)
    • Data Format (XI_PRM_IMAGE_DATA_FORMAT)
    • Width (XI_PRM_WIDTH)
    • Height (XI_PRM_HEIGHT)
    • Offset X (XI_PRM_OFFSET_X)
    • Offset Y (XI_PRM_OFFSET_Y)

*Note: Some of parameters can be changed without flushing the queue. It is possible to change parameter using modifier: XI_PRMM_DIRECT_UPDATE

Generated:98e3c9b: Tue Sep 17 06:55:07 CEST 2019