FG Camera Library
Loading...
Searching...
No Matches
FG_CameraInterface.h File Reference

Detailed Description

Header file for this libraray.

For a description on how to use this library take a look at First Steps.

Data Structures

struct  FG_IMAGE
 This structure stores information associated with image buffers. More...
struct  FG_VERSION
 struct for the library version "libFGCamera.so.major.minor.patchlevel.buildnumber" More...

Macros

#define FG_VERSION_BUILDNUMBER   0
 Library version build number.
#define FG_VERSION_MAJOR   1
 Library version major number.
#define FG_VERSION_MINOR   7
 Library version minor number.
#define FG_VERSION_NUMBER   (FG_VERSION_BUILDNUMBER + 100 * (FG_VERSION_PATCHLEVEL + 100 * (FG_VERSION_MINOR + 100 * FG_VERSION_MAJOR)))
 Library version number.
#define FG_VERSION_PATCHLEVEL   1
 Library version patch number.

Enumerations

enum  eFG_CAMERA_TYPE {
  FG_CAMERA_TYPE_X_X_IMAGO_Vxx_AUTO = 0 , FG_CAMERA_TYPE_X_X_IMAGO_VCx_AUTO = 1 , FG_CAMERA_TYPE_752_480_IMAGO_VCx_MT9V032M = 2 , FG_CAMERA_TYPE_752_480_IMAGO_VCx_MT9V032C = 3 ,
  FG_CAMERA_TYPE_1280_1024_IMAGO_VCx_EV76C560M = 4 , FG_CAMERA_TYPE_1280_1024_IMAGO_VCx_EV76C560C = 5 , FG_CAMERA_TYPE_1600_1200_IMAGO_VCx_EV76C570M = 6 , FG_CAMERA_TYPE_1600_1200_IMAGO_VCx_EV76C570C = 7 ,
  FG_CAMERA_TYPE_2592_2048_IMAGO_VCx_NOIP3SN5000A = 8 , FG_CAMERA_TYPE_2592_2048_IMAGO_VCx_NOIP3SE5000A = 9 , FG_CAMERA_TYPE_2048_1_IMAGO_VCx_DR2K7 = 10 , FG_CAMERA_TYPE_4096_1_IMAGO_VCx_DR4K7 = 11 ,
  FG_CAMERA_TYPE_4096_1_IMAGO_VCx_DR4K35 = 12 , FG_CAMERA_TYPE_8192_1_IMAGO_VCx_DR8K35 = 13 , FG_CAMERA_TYPE_2048_2_IMAGO_VCx_DR2X2K7 = 14 , FG_CAMERA_TYPE_4096_2_IMAGO_VCx_DR2X4K7 = 15 ,
  FG_CAMERA_TYPE_2048_2_IMAGO_VCx_DR2X2K7_RGB = 16 , FG_CAMERA_TYPE_4096_2_IMAGO_VCx_DR2X4K7_RGB = 17 , FG_CAMERA_TYPE_2560_2048_IMAGO_VCx_L181M = 29 , FG_CAMERA_TYPE_2560_2048_IMAGO_VCx_L181C = 30 ,
  FG_CAMERA_TYPE_640_480_IMAGO_CCVS1STMU0300A = 18 , FG_CAMERA_TYPE_4096_3008_IMAGO_VCx_IMX565M = 36 , FG_CAMERA_TYPE_4096_3008_IMAGO_VCx_IMX565C = 37 , FG_CAMERA_TYPE_2432_2064_IMAGO_VCx_IMX567M = 38 ,
  FG_CAMERA_TYPE_2432_2064_IMAGO_VCx_IMX567C = 39 , FG_CAMERA_TYPE_4096_4_IMAGO_GL7004 = 40 , FG_CAMERA_TYPE_X_X_IMAGO_VSx_AUTO = 19 , FG_CAMERA_TYPE_736_480_IMAGO_VSx_MT9V032M = 20 ,
  FG_CAMERA_TYPE_736_480_IMAGO_VSx_MT9V032C = 21 , FG_CAMERA_TYPE_1920_1080_IMAGO_VSx_EV2S02MB = 22 , FG_CAMERA_TYPE_1920_1080_IMAGO_VSx_EV2S02MC = 23 , FG_CAMERA_TYPE_2560_1936_IMAGO_VSx_EV2S05MB = 24 ,
  FG_CAMERA_TYPE_2560_1936_IMAGO_VSx_EV2S05MC = 25 , FG_CAMERA_TYPE_1440_1080_IMAGO_VSx_IMX296LL = 27 , FG_CAMERA_TYPE_GIGE_AUTO = 31 , FG_CAMERA_TYPE_GIGE_IMAGO_VSx_EV2S02MB = 32 ,
  FG_CAMERA_TYPE_GIGE_IMAGO_VSx_EV2S02MC = 33 , FG_CAMERA_TYPE_GIGE_IMAGO_VSx_EV2S05MB = 34 , FG_CAMERA_TYPE_GIGE_IMAGO_VSx_EV2S05MC = 35 , FG_CAMERA_TYPE_GIGE_IMAGO_VIEWIT = 41 ,
  FG_CAMERA_TYPE_FILE_BMP = 26
}
 The following camera models are supported by this library. More...
enum  eFG_ERROR_CODE {
  FG_ERROR_CODE_NoError = 0 , FG_ERROR_CODE_Unknown = 1 , FG_ERROR_CODE_InvalidArgument = 3 , FG_ERROR_CODE_InvalidCameraChannel = 4 ,
  FG_ERROR_CODE_GrabTimeOut = 5 , FG_ERROR_CODE_BrokenImage = 6 , FG_ERROR_CODE_ExtraErrorInformation = 100
}
 The result code for all library functions. More...
enum  eFG_PIXEL_ORDER {
  FG_PIXEL_ORDER_Y = 0 , FG_PIXEL_ORDER_RG , FG_PIXEL_ORDER_BG , FG_PIXEL_ORDER_GR ,
  FG_PIXEL_ORDER_GB , FG_PIXEL_ORDER_RGB
}
 Order of pixel components in memory (see FG_get_pixel_order()). More...
enum  eFG_PIXEL_TYPE { FG_PIXEL_TYPE_Y_8 = 0 , FG_PIXEL_TYPE_Y_16 , FG_PIXEL_TYPE_RGBX_32 , FG_PIXEL_TYPE_RGB_24 }
 The data format for storing images in memory, see FG_set_scan_param() and FG_set_aoi() More...
enum  eFG_TRIGGER_MODE { FG_TRIGGER_MODE_SOFTWARE = 0 , FG_TRIGGER_MODE_HARDWARE = 1 , FG_TRIGGER_MODE_FREERUN = 2 }
 Trigger mode definitions, see FG_set_trigger_mode() for a description. More...

Functions

UINT32 DLL_FG_API FG_alloc_image (FG_IMAGE *img)
 Allocates a new image buffer for storing sensor frames.
UINT32 DLL_FG_API FG_append_image (FG_IMAGE *img)
 Puts an image buffer into the aquisition queue.
UINT32 DLL_FG_API FG_free_image (FG_IMAGE *img)
 Releases an image buffer.
UINT32 DLL_FG_API FG_get_aoi (UINT32 *x1, UINT32 *y1, UINT32 *x2, UINT32 *y2, enum eFG_PIXEL_TYPE *pixel_type)
 Returns the area of interest and the output format.
UINT32 DLL_FG_API FG_get_black (UINT32 *black)
 Returns the normalized black level.
UINT32 DLL_FG_API FG_get_camera_type (enum eFG_CAMERA_TYPE *camera_type)
 Returns the installed camera type.
UINT32 DLL_FG_API FG_get_gain (UINT32 *gain)
 Returns the normalized gain value.
UINT32 DLL_FG_API FG_get_gain_rgb (UINT32 *gain_red, UINT32 *gain_green, UINT32 *gain_blue)
 Returns the normalized color gain values for supported hardware.
UINT32 DLL_FG_API FG_get_image (FG_IMAGE *img, UINT32 TimeOut_ms)
 Returns captured images to the user.
UINT32 DLL_FG_API FG_get_image_size (UINT32 *width, UINT32 *height, UINT32 *bytes)
 Returns the size of the image buffers.
UINT32 DLL_FG_API FG_get_last_error (char *error_sting, UINT32 max_string_size)
 Returns an error description for the last failed library call.
UINT32 DLL_FG_API FG_get_pixel_order (enum eFG_PIXEL_ORDER *pixel_order)
 Returns the order of pixel components within image buffers.
UINT32 DLL_FG_API FG_get_scan_param (UINT32 *scan_x, UINT32 *scan_y, UINT32 *scan_width, UINT32 *scan_height, UINT32 *image_scan_count, enum eFG_PIXEL_TYPE *pixel_type)
 Returns the area of interest and the output format.
UINT32 DLL_FG_API FG_get_shutter_time (UINT32 *shutter_time_us)
 Returns the exposure time in µs.
UINT32 DLL_FG_API FG_get_special_option (const char *option, INT64 *result)
 Returns a special camera property value.
UINT32 DLL_FG_API FG_get_timestamp (FG_IMAGE *img, UINT64 *pTimestamp)
 Returns the image completion timestamp of a captured image.
UINT32 DLL_FG_API FG_get_trigger_mode (enum eFG_TRIGGER_MODE *trigger_mode)
 Returns the configured trigger mode.
UINT32 DLL_FG_API FG_get_version (FG_VERSION *lib_version)
 Returns the library version.
UINT32 DLL_FG_API FG_install_camera (enum eFG_CAMERA_TYPE camera_type,...)
 Opens and initializes the camera.
UINT32 DLL_FG_API FG_save_image (FG_IMAGE *img, const char *filename)
 Saves the given image into an BMP file.
UINT32 DLL_FG_API FG_set_aoi (UINT32 x1, UINT32 y1, UINT32 x2, UINT32 y2, enum eFG_PIXEL_TYPE pixel_type)
 Sets the area of interest and the output format.
UINT32 DLL_FG_API FG_set_black (UINT32 black)
 Sets the black level using a normalized value.
UINT32 DLL_FG_API FG_set_gain (UINT32 gain)
 Sets the gain using a normalized value.
UINT32 DLL_FG_API FG_set_gain_rgb (UINT32 gain_red, UINT32 gain_green, UINT32 gain_blue)
 Sets the color component gain values for supported hardware.
UINT32 DLL_FG_API FG_set_scan_param (UINT32 scan_x, UINT32 scan_y, UINT32 scan_width, UINT32 scan_height, UINT32 image_scan_count, enum eFG_PIXEL_TYPE pixel_type)
 Sets the area of interest and output format.
UINT32 DLL_FG_API FG_set_shutter_time (UINT32 shutter_time_us)
 Sets the exposure time in µs.
UINT32 DLL_FG_API FG_set_special_option (const char *option, INT64 arg)
 Configures a special camera property.
UINT32 DLL_FG_API FG_set_trigger_mode (enum eFG_TRIGGER_MODE trigger_mode)
 Sets the trigger mode.
UINT32 DLL_FG_API FG_stop_image (void)
 Forces the camera to stop grabbing and using any buffers.
UINT32 DLL_FG_API FG_trigger_image (void)
 Triggers the next image in software triggered mode.
UINT32 DLL_FG_API FG_uninstall_camera (void)
 Closes the camera.

Macro Definition Documentation

◆ FG_VERSION_NUMBER

#define FG_VERSION_NUMBER   (FG_VERSION_BUILDNUMBER + 100 * (FG_VERSION_PATCHLEVEL + 100 * (FG_VERSION_MINOR + 100 * FG_VERSION_MAJOR)))

Library version number.

The library version has the following structure: <major>.<minor>.<patchlevel>.<buildnumber>
For example, the library version 1.2.8.0 produces a value of 1020800 after evaluation of the VIB_VERSION expression by the compiler.

Enumeration Type Documentation

◆ eFG_CAMERA_TYPE

The following camera models are supported by this library.

Enumerator
FG_CAMERA_TYPE_X_X_IMAGO_Vxx_AUTO 

IMAGO VisionCam/Sensor (automatic)

FG_CAMERA_TYPE_X_X_IMAGO_VCx_AUTO 

IMAGO VisionCam (automatic)

FG_CAMERA_TYPE_752_480_IMAGO_VCx_MT9V032M 

IMAGO VisionCam MT9V032M 752x480 BW.

FG_CAMERA_TYPE_752_480_IMAGO_VCx_MT9V032C 

IMAGO VisionCam MT9V032C 752x480 RGB.

FG_CAMERA_TYPE_1280_1024_IMAGO_VCx_EV76C560M 

IMAGO VisionCam EV76C560M 1280x1024 BW.

FG_CAMERA_TYPE_1280_1024_IMAGO_VCx_EV76C560C 

IMAGO VisionCam EV76C560C 1280x1024 RGB.

FG_CAMERA_TYPE_1600_1200_IMAGO_VCx_EV76C570M 

IMAGO VisionCam EV76C570M 1600x1200 BW.

FG_CAMERA_TYPE_1600_1200_IMAGO_VCx_EV76C570C 

IMAGO VisionCam EV76C570C 1600x1200 RGB.

FG_CAMERA_TYPE_2592_2048_IMAGO_VCx_NOIP3SN5000A 

IMAGO VisionCam PYTHON 5000 2592x2048 BW.

FG_CAMERA_TYPE_2592_2048_IMAGO_VCx_NOIP3SE5000A 

IMAGO VisionCam PYTHON 5000 2592x2048 RGB.

FG_CAMERA_TYPE_2048_1_IMAGO_VCx_DR2K7 

IMAGO VisionCam DR2k7 2048x1 BW.

FG_CAMERA_TYPE_4096_1_IMAGO_VCx_DR4K7 

IMAGO VisionCam DR4k7 4096x1 BW.

FG_CAMERA_TYPE_4096_1_IMAGO_VCx_DR4K35 

IMAGO VisionCam DR4k3.5 4096x1 BW.

FG_CAMERA_TYPE_8192_1_IMAGO_VCx_DR8K35 

IMAGO VisionCam DR8k3.5 8192x1 BW.

FG_CAMERA_TYPE_2048_2_IMAGO_VCx_DR2X2K7 

IMAGO VisionCam DR2x2k7 2048x2 BW.

FG_CAMERA_TYPE_4096_2_IMAGO_VCx_DR2X4K7 

IMAGO VisionCam DR2x4k7 4096x2 BW.

FG_CAMERA_TYPE_2048_2_IMAGO_VCx_DR2X2K7_RGB 

IMAGO VisionCam DR2x2k7 2048x2 RGB (1x GB line + 1x RG line)

FG_CAMERA_TYPE_4096_2_IMAGO_VCx_DR2X4K7_RGB 

IMAGO VisionCam DR2x4k7 4096x2 RGB (1x GB line + 1x RG line)

FG_CAMERA_TYPE_2560_2048_IMAGO_VCx_L181M 

IMAGO VisionCam Lince5M181 BW.

FG_CAMERA_TYPE_2560_2048_IMAGO_VCx_L181C 

IMAGO VisionCam Lince5M181 RGB.

FG_CAMERA_TYPE_640_480_IMAGO_CCVS1STMU0300A 

IMAGO VisionCam EB / Prophesee.

FG_CAMERA_TYPE_4096_3008_IMAGO_VCx_IMX565M 

IMAGO Visioncam IMX565 4096x3008 BW.

FG_CAMERA_TYPE_4096_3008_IMAGO_VCx_IMX565C 

IMAGO Visioncam IMX565 4096x3008 RGB.

FG_CAMERA_TYPE_2432_2064_IMAGO_VCx_IMX567M 

IMAGO Visioncam IMX567 2432x2064 BW.

FG_CAMERA_TYPE_2432_2064_IMAGO_VCx_IMX567C 

IMAGO Visioncam IMX567 2432x2064 RGB.

FG_CAMERA_TYPE_4096_4_IMAGO_GL7004 

IMAGO Visioncam GL7004 4096x4 RGBW.

FG_CAMERA_TYPE_X_X_IMAGO_VSx_AUTO 

IMAGO VisionSensor (automatic)

FG_CAMERA_TYPE_736_480_IMAGO_VSx_MT9V032M 

IMAGO VisionSensor MT9V032M 736x480 BW.

FG_CAMERA_TYPE_736_480_IMAGO_VSx_MT9V032C 

IMAGO VisionSensor MT9V032C 736x480 RGB.

FG_CAMERA_TYPE_1920_1080_IMAGO_VSx_EV2S02MB 

IMAGO VisionSensor EV2S02MB 1920x1080 BW.

FG_CAMERA_TYPE_1920_1080_IMAGO_VSx_EV2S02MC 

IMAGO VisionSensor EV2S02MC 1920x1080 RGB.

FG_CAMERA_TYPE_2560_1936_IMAGO_VSx_EV2S05MB 

IMAGO VisionSensor EV2S05MB 2560x1936 BW.

FG_CAMERA_TYPE_2560_1936_IMAGO_VSx_EV2S05MC 

IMAGO VisionSensor EV2S05MC 2560x1936 RGB.

FG_CAMERA_TYPE_1440_1080_IMAGO_VSx_IMX296LL 

IMAGO VisionSensor IMX296 1440x1080 BW.

FG_CAMERA_TYPE_GIGE_AUTO 

GigE auto detection.

FG_CAMERA_TYPE_GIGE_IMAGO_VSx_EV2S02MB 

GigE VisionSensor EV2S02MB 1920x1080 BW.

FG_CAMERA_TYPE_GIGE_IMAGO_VSx_EV2S02MC 

GigE VisionSensor EV2S02MC 1920x1080 RGB.

FG_CAMERA_TYPE_GIGE_IMAGO_VSx_EV2S05MB 

GigE VisionSensor EV2S05MB 2560x1936 BW.

FG_CAMERA_TYPE_GIGE_IMAGO_VSx_EV2S05MC 

GigE VisionSensor EV2S05MC 2560x1936 RGB.

FG_CAMERA_TYPE_GIGE_IMAGO_VIEWIT 

GigE ViewIT.

FG_CAMERA_TYPE_FILE_BMP 

Virtual file camera using the BMP format.

◆ eFG_ERROR_CODE

The result code for all library functions.

Enumerator
FG_ERROR_CODE_NoError 

The function was successful.

FG_ERROR_CODE_Unknown 

Unknown error.

FG_ERROR_CODE_InvalidArgument 

The function arguments are invalid.

FG_ERROR_CODE_InvalidCameraChannel 

The selected camera channel is invalid.

FG_ERROR_CODE_GrabTimeOut 

Only valid for FG_get_image(): acquisition timeout.

FG_ERROR_CODE_BrokenImage 

Only valid for FG_get_image(): the returned image contents are invalid.

FG_ERROR_CODE_ExtraErrorInformation 

Other errors, use FG_get_last_error() to obtain the error message.

◆ eFG_PIXEL_ORDER

Order of pixel components in memory (see FG_get_pixel_order()).

Enumerator
FG_PIXEL_ORDER_Y 

Luminosity pixels only.

FG_PIXEL_ORDER_RG 

Raw Bayer pattern values starting with R-G components in the first row, G-B components in the second row.

FG_PIXEL_ORDER_BG 

Raw Bayer pattern values starting with B-G components in the first row, G-R components in the second row.

FG_PIXEL_ORDER_GR 

Raw Bayer pattern values starting with G-R components in the first row, B-G components in the second row.

FG_PIXEL_ORDER_GB 

Raw Bayer pattern values starting with G-B components in the first row, R-G components in the second row.

FG_PIXEL_ORDER_RGB 

RGB components are present for each pixel, starting with the R component.

◆ eFG_PIXEL_TYPE

The data format for storing images in memory, see FG_set_scan_param() and FG_set_aoi()

Supported values depend on the sensor / camera type.

Enumerator
FG_PIXEL_TYPE_Y_8 

1 byte per pixel, can be monochrome or raw bayer values (depending on the sensor)

FG_PIXEL_TYPE_Y_16 

2 bytes per pixel, the number of valid bits depends on the sensor type

FG_PIXEL_TYPE_RGBX_32 

4 bytes per pixel containing 8 bit red/green/blue/dummy. The sequence is [RGBx RGBx ...]

FG_PIXEL_TYPE_RGB_24 

3 bytes per pixel containing 8 bit red/green/blue. The sequence is [R0G0B0 R1G1B1 ...]

◆ eFG_TRIGGER_MODE

Trigger mode definitions, see FG_set_trigger_mode() for a description.

Enumerator
FG_TRIGGER_MODE_SOFTWARE 

Software triggered mode.

FG_TRIGGER_MODE_HARDWARE 

Hardware triggered mode.

FG_TRIGGER_MODE_FREERUN 

Free-run triggered mode.