FG Camera Library  1.5.0.0 (2023-09-08)
Lince5M181

Overview

The following Lince 5M sensor models are available for the VisionCam XM2:

Supported sensors
Sensor Type eFG_CAMERA_TYPE Number of
pixels
Pixel size Optical format
Lince5M181M Monochrome FG_CAMERA_TYPE_2560_2048_IMAGO_VCx_L181M 2560 x 2048 5 µm x 5 µm 1"
Lince5M181C Color FG_CAMERA_TYPE_2560_2048_IMAGO_VCx_L181C

Features

  • Global Shutter with overlapped integration and readout
  • 12-bit ADC with 8 bit image readout
  • Short integration times down to 1 µs
  • Automatic black level and fixed pattern noise correction
  • Line scan mode
  • Binning modes 2x2 and 4x4
  • Vertical and horizontal mirroring
  • Hardware triggered mode controlled by RTCC

Supported pixel formats

The supported pixel formats are listed below:

Supported pixel types
Sensor eFG_PIXEL_TYPE Output format
Lince5M181M (Monochrome) FG_PIXEL_TYPE_Y_8 1 byte per pixel
Lince5M181C (Color) FG_PIXEL_TYPE_Y_8 Raw bayer, 1 byte per pixel

For color sensors, there is no support for demosaicing in hardware. But the function FG_set_gain_rgb() can still be used to adjust the gain for each color component within the raw bayer pixels.

Frame rate

The frame rate can be increased be reducing the AOI size. Use the calculator to obtain the maximum frame rate:

Frame rate calculator
Frame rate:
Line rate:

Special features

The sensor supports the following special features, see also section Configure special features for additional features:

Special features
Property name Description
Mirror Flips the image horizontally and / or vertically
0: no flipping (default)
1: flip horizontally
2: flip vertically
3: flip horizontally and vertically (rotation by 180°)
Note
  • Vertical mirroring cannot be changed after buffer allocation
  • The order of color components for raw Bayer format depends on this setting. Use FG_get_pixel_order() to get the order after the Mirror option is configured.
FrameRate Sets the desired sensor frame rate in Hertz. This setting is only applied in free run mode. The actual frame rate may be lower if the exposure time setting is too high, or if the sensor's limit is exceeded.
0: Use maximum frame rate
≥ 1: Desired frame rate in Hertz
ScanPeriod Sets the desired sensor frame period in microseconds (similar to "FrameRate"). This setting is only applied in free run mode. The actual frame period may be longer if the exposure time setting is too high, or if the sensor's limit is exceeded.
0: Use maximum frame rate
≥ 1: Desired frame period in µs
Binning Binning option
1: No binning
2: 2x2 binning
4: 4x4 binning
Note
Binning mode cannot be changed after buffer allocation

Line scan mode

Choosing a smaller AOI height will increase the maximum frame rate significantly. This makes the sensor also suitable for line scan applications.

A dedicated line scan mode was introduced which provides the following benefits:

  • Concatenation of lines from multiple sensor frames into a larger images is handled by the library.
  • Reduces the risk of loosing sensor frames, because the image buffers can be much bigger.
  • Lowers the number of interactions with the driver which reduces the acquisition overhead.

A sensor scan height greater than one can be useful to increase the effective line rate. For example, an AOI size of 2048 x 4 allows a scan rate of 28 kHz which results in an effective line rate of 112 kHz.

Note
  • If the scan height is greater than one, the effective line rate has to match the object speed to avoid image distortions. This can be achieved by using a rotational encoder as the trigger source for example (see Using hardware trigger mode).
  • The exposure time needs to be short enough to avoid in-motion unsharpness. It should not exceed the reciprocal of the effective line rate.
  • The vertical mirror option will flip the complete image, not each sensor scan within the image. Therefore, the correct mounting situation of the camera depends on the transport direction.

Activating line scan mode

Line scan mode is enabled by configuring the AOI with FG_set_scan_param() instead of FG_set_aoi(). The parameter image_scan_count specifies the number of sensor frames that will be concatenated into the larger destination image. A value of 1 disables line scan mode.

Note
Successive sensor scans are written from bottom to top into the image. The vertical mirror option will flip the complete image, not each sensor scan within the image. Therefore, the transport direction of a moving object underneath the camera is fixed, unless only one sensor line is used.

Example:

The following example configures a scan AOI of 1024 x 4 at the sensor's center location:

UINT32 sensor_width, sensor_height;
UINT32 scan_x, scan_y, scan_width, scan_height, image_scan_count;
UINT32 image_width, image_height;
eFG_PIXEL_TYPE pixel_type;
// read the default values to get the sensor size:
FG_get_scan_param(NULL, NULL, &sensor_width, &sensor_height, NULL, &pixel_type);
// the sensor AOI size:
scan_width = 1024;
scan_height = 4;
// set x/y offsets to the sensor's center:
scan_x = (sensor_width - scan_width) / 2;
scan_y = (sensor_height - scan_height) / 2;
// use a scan count of 250 which results in an image height of 1000 lines:
image_scan_count = 250;
// configure AOI for line scan mode:
FG_set_scan_param(scan_x, scan_y, scan_width, scan_height, image_scan_count, pixel_type);
// calculate the image size (same as FG_get_image_size())
image_width = scan_width;
image_height = image_scan_count * scan_height;
Note
  • FG_get_aoi() returns the sensor scan AOI in line scan mode, the image height can be obtained with FG_get_image_size().
  • It is possible to change the AOI position after the aquisition has started.

Triggering the sensor in line scan mode

In line scan mode with hardware or software trigger enabled, each trigger event will start acquisition of one sensor frame containing the configured sensor scan height number of lines. The scan height acts like a trigger multiplier for the effective line rate. Multiple trigger events are required before the image is complete and returned to the user.

The RTCC can be used to adapt the the trigger signal to the desired scan rate, see Using hardware trigger mode for examples.

FG_set_scan_param
UINT32 DLL_FG_API FG_set_scan_param(UINT32 scan_x, UINT32 scan_y, UINT32 scan_width, UINT32 scan_height, UINT32 image_height, enum eFG_PIXEL_TYPE pixel_type)
Sets the area of interest and output format.
Definition: FG_CameraInterface.cpp:695
FG_install_camera
UINT32 DLL_FG_API FG_install_camera(enum eFG_CAMERA_TYPE camera_type)
Opens and initializes the camera.
Definition: FG_CameraInterface.cpp:282
FG_CAMERA_TYPE_X_X_IMAGO_Vxx_AUTO
@ FG_CAMERA_TYPE_X_X_IMAGO_Vxx_AUTO
IMAGO VisionCam/Sensor (automatic)
Definition: FG_CameraInterface.h:54
FG_get_scan_param
UINT32 DLL_FG_API FG_get_scan_param(UINT32 *scan_x, UINT32 *scan_y, UINT32 *scan_width, UINT32 *scan_height, UINT32 *image_height, enum eFG_PIXEL_TYPE *pixel_type)
Returns the area of interest and the output format.
Definition: FG_CameraInterface.cpp:709
eFG_PIXEL_TYPE
eFG_PIXEL_TYPE
Specifies the format to use for captured images (see FG_get_aoi() / FG_set_aoi()).
Definition: FG_CameraInterface.h:108