Illustrates working with Capabilities and The Gain Tables.
This example shows you how to retrieve the Camera Capabilities from the device and extract the Gain Table information.
#if defined(_WIN32) || defined(_WINDOWS)
#include "stdafx.h"
#else
#include <stdio.h>
#endif
#include "stdint.h"
#include "stdlib.h"
#define FLI_TEST_MAX_SUPPORTED_CAMERAS (4)
static int32_t s_iDeviceHandle;
uint32_t uiNumDetectedDevices;
static FPRODEVICEINFO s_camDeviceInfo[FLI_TEST_MAX_SUPPORTED_CAMERAS];
int main()
{
int32_t iResult;
uint32_t uiCapNum;
uint32_t uiGainEntries;
uint32_t uiGainIndex;
float fGainValue;
uiNumDetectedDevices = FLI_TEST_MAX_SUPPORTED_CAMERAS;
if ((iResult >= 0) && (uiNumDetectedDevices > 0))
{
s_iDeviceHandle = -1;
iResult =
FPROCam_Open(&s_camDeviceInfo[0], &s_iDeviceHandle);
if ((iResult >= 0) && (s_iDeviceHandle >= 0))
{
if (iResult >= 0)
{
{
{
for (uint32_t i = 0; i < uiGainEntries; ++i)
{
#if defined(_WIN32) || defined(_WINDOWS)
#else
printf("Gain index %d: %.4f\n",i, fGainValue);
#endif
}
}
{
}
}
}
}
}
return 0;
}
Finger Lakes Instrumentation Camera API.
LIBFLIPRO_API FPROSensor_GetCapabilityList(int32_t iHandle, uint32_t *pCapList, uint32_t *pNumCaps)
Retrieves the capabilities list for the connected camera.
#define FPRO_GAIN_SCALE_FACTOR
Gain Scale Factor.
Definition: libflipro.h:726
LIBFLIPRO_API FPROCam_Open(FPRODEVICEINFO *pDevInfo, int32_t *pHandle)
Connects to the camera specified by the pDevInfo parameter.
LIBFLIPRO_API FPROCam_Close(int32_t iHandle)
Disconnects from the camera an releases the handle.
@ FPROCAP_NUM
Number of supported capabilities.
Definition: libflipro.h:877
@ FPROCAP_LOW_GAIN_TABLE_SIZE
Number of Gain Values (Low Gain channel for low gain frame in HDR Modes)
Definition: libflipro.h:866
@ FPRO_GAIN_TABLE_LOW_CHANNEL
Low Gain Channel used for Low Gain images in HDR modes.
Definition: libflipro.h:752
LIBFLIPRO_API FPROSensor_SetGainIndex(int32_t iHandle, FPROGAINTABLE eTable, uint32_t uiGainIndex)
Sets the current setting for the Gain for the specified table.
LIBFLIPRO_API FPROSensor_GetGainIndex(int32_t iHandle, FPROGAINTABLE eTable, uint32_t *pGainIndex)
Retrieves the current setting for the Gain for the specified table.
LIBFLIPRO_API FPROCam_GetCameraList(FPRODEVICEINFO *pDeviceInfo, uint32_t *pNumDevices)
FPROCam_GetCameraList.
LIBFLIPRO_API FPROSensor_GetGainTable(int32_t iHandle, FPROGAINTABLE eTable, FPROGAINVALUE *pGainValues, uint32_t *pNumEntries)
Retrieves the specified Gain Table.
Definition: libflipro.h:365
Definition: libflipro.h:775