FG Camera Library  1.5.1.0 (2024-05-13)
e2v EV2S02M / EV2S05M

Overview

The following e2v Snappy sensor models are available for the VisionSensor PV3:

Supported sensors
Sensor Type eFG_CAMERA_TYPE Number of
pixels
Pixel size Optical format
EV2S02MB Monochrome FG_CAMERA_TYPE_1920_1080_IMAGO_VSx_EV2S02MB 1920 x 1080 2.8 µm x 2.8 µm 1/3"
EV2S02MC Color FG_CAMERA_TYPE_1920_1080_IMAGO_VSx_EV2S02MC
EV2S05MB Monochrome FG_CAMERA_TYPE_2560_1936_IMAGO_VSx_EV2S05MB 2560 x 1936 1/1.8"
EV2S05MC Color FG_CAMERA_TYPE_2560_1936_IMAGO_VSx_EV2S05MC
Note
The SoC's sensor interface on the VisionSensor PV3 requires at least two image buffers in the aquisition queue to avoid dropped sensor frames. A third buffer is required at the end of a frame, so that there are still remaining at least two buffers after one is given back to the user.
In order to avoid any dropped frames during startup while adding the first buffers with FG_append_image(), the sensor aquisition start is delayed until the second buffer is added. A third buffer should be added before the first frame completes.

Features

  • Global Shutter with simultaneous integration and readout
  • 12-bit ADC with 8 bit image readout
  • Horizontal and vertical flipping
  • 2x2 pixel binning
  • Short integration times down to 12 µs
  • Constant trigger delay of 20 µs with very low jitter
  • Adjustable trigger input, edge sensitivity and trigger divider (see Using a trigger signal)
  • Line scan mode

Supported pixel formats

The supported pixel formats are listed below:

Supported pixel types
Sensor eFG_PIXEL_TYPE Output format
EV2S02MB / EV2S05MB (Monochrome) FG_PIXEL_TYPE_Y_8 1 byte per pixel
EV2S02MC / EV2S05MC (Color) FG_PIXEL_TYPE_Y_8 Raw bayer, 1 byte per pixel
Note
  • For color sensors, the first line starts with R-G components if the Mirror option is 0.
  • 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 rates

The frame rate can be increased be reducing the AOI size. Some examples are listed in the following table:

Maximum frame rate examples
AOI size EV2S02M EV2S05M
max. frame rate exposure time max. frame rate exposure time
2560 x 1936 - - 53 Hz 18.5 ms
1920 x 1080 115 Hz 8.6 ms 117 Hz 8.4 ms
1920 x 768 161 Hz 6.1 ms 165 Hz 6 ms
1920 x 480 256 Hz 3.8 ms 262 Hz 3.7 ms
1920 x 240 506 Hz 1.9 ms 514 Hz 1.9 ms
1920 x 32 3.2 kHz 295 µs 3.1 kHz 296 µs
1920 x 16 5.4 kHz 167 µs 5.1 kHz 170 µs
1920 x 8 8.3 kHz 103 µs 7.5 kHz 109 µs
1920 x 4 11.3 kHz 71 µs 9.8 kHz 77 µs
1920 x 2 13.8 kHz 55 µs 11.6 kHz 61 µs
1920 x 1 15.6 kHz 47 µs 12.8 kHz 53 µs
2560 x 1 - - 10.1 kHz 70 µs
Note
  • For the 2MP sensor, the frame rate only depends on the AOI height. Using the full width of the 5MP sensor slightly decreases the frame rate.
  • The listed maximum exposure time settings are for free run mode only. In triggered mode or in line scan mode, the exposure time values have to be about 24 µs shorter in order to reach the frame rate.

Special features

The sensor supports the following special features.

Special features
Property name Description Library
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
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.
≥ 1.2.6.0
Binning Binning mode
1: no pixel binning (default)
2: 2x2 pixel binning
Note
  • The binning mode must be configured before the first buffer is allocated.
  • The parameters for FG_set_scan_param() and FG_set_aoi() refer to the reduced image size after binning is enabled.
  • For 2x2 binning, the pixel brightness increases by a factor of two (sum of four neighbour pixels divided by two).
  • Color information will be lost for color sensors.
≥ 1.5.1.0
ImageMode Controls the digital test pattern:
0: Video output
1: Enable test pattern
≥ 1.2.6.0
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.
The lowest achievable frame rate is 16 Hz for line scan mode, else 2 Hz.
0: Use maximum frame rate
≥ 1: Desired frame rate in Hertz
≥ 1.2.7.0
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.
The longest frame period is 65 ms for line scan mode, else 524 ms.
0: Use maximum frame rate
≥ 1: Desired frame period in µs
≥ 1.2.9.0

Additional features are described in the following sections:

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.
  • An additional frame trigger signal can be used to start aquisition of one image.

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

Note
  • Line scan mode requires FPGA version ≥ 1.0.0.68.
  • 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.
  • The exposure time needs to be short enough to avoid in-motion unsharpness. It should not exceed the reciprocal of the effective line rate.

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.

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.

Using a sensor trigger

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. Multiple trigger events are required before the image is complete and returned to the user.

The trigger input, edge sensitivity and a trigger divider can be controlled to adapt the the trigger signal to the desired scan rate, see Using a trigger signal.

The scan height acts like a trigger multiplier for the effective line rate.

Using a frame trigger

In line scan mode, an additional frame trigger can be used to start acquisition of an image. The trigger can be software based or hardware based using the digital input signal IN1. Frame trigger works independently from the sensor trigger mode. An additional frame start delay is also available.

The frame trigger is configured using the following special features:

Special features for frame trigger in line scan mode
Property name Description Version requirements
FPGA Library
FrameTriggerMode Sets the frame trigger mode, used for starting frames in line scan mode.
0: Don't use frame trigger, frames are captured continuously (default)
1: Frames are software triggered by using the special option FrameTrigger
2: Use rising edge on input IN1
3: Use falling edge on input IN1
100...115: VIB::Multiplexer output line 0...15 (only for VisionSensor PV3 with I/O Expansion)
≥ 1.0.0.68 ≥ 1.2.9.0
FrameTriggerDelay Frame start delay after receiving the frame trigger. The number determines how many sensor trigger events are ignored after each frame trigger.
0...65535 (default: 0)
FrameTrigger Triggers a frame in software controlled frame trigger mode (write only).
Only the value 0 is valid.

Example:

// Setup hardware based frame trigger using rising edge on IN1:
FG_set_special_option("FrameTriggerMode", 2);
// Delay frame start by 100 sensor scan frames
FG_set_special_option("FrameTriggerDelay", 100);
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
FG_set_special_option
UINT32 DLL_FG_API FG_set_special_option(const char *option, INT64 arg)
Configures a special camera property.
Definition: FG_CameraInterface.cpp:893