" name="keywords" />
Go to Cart
Home → Support → Knowledge Base → Multiple exposures in one frame

Multiple exposures in one frame

The multiple exposure feature accumulates several exposures (sub-exposures) into a single frame.
At the end of each exposure, the pixel values are transferred to a pixel buffer, and the sensor starts again from zero.
The readout of the frame starts after the last exposure period has finished.
Once the required number of exposures is completed, the resulting output frame is the sum of all exposures for each pixel.
As you can see in the text below, this feature can work in two modes - either with exposure time defined by the XiApi parameter or controlled by the duration of the trigger pulse.
In both modes, every trigger pulse starts one sub-exposure. The frame is read out and delivered after the last trigger of the burst.

The number of exposures can be defined using the XiApi parameter XI_PRM_EXPOSURE_BURST_COUNT.


According to Sony, the maximum number of exposures per frame is 4095.
However, please note that there is a gap (FOT) after each exposure, during which the next exposure cannot start. Depending on the sensor and bit depth, it is ~50 - 160 µs.

Camera models supported

Some of the XIMEA cameras support multiple exposures captured in a single frame.
The models supporting this feature are based on the Sony Pregius sensors mentioned in the tables below.

Sony Pregius (IMX25x)

Present in the following camera families:

xiC camera family
xiX camera family

Sensor model Camera model Chroma Interface
Sony IMX252 MC031MG-SY Monochrome USB3
Sony IMX252 MC031CG-SY Color USB3
Sony IMX252 MX031MG-SY-X2G2 Monochrome PCIe Gen2 x2
Sony IMX252 MX031CG-SY-X2G2 Color PCIe Gen2 x2
Sony IMX250 MC050MG-SY Monochrome USB3
Sony IMX250 MC050CG-SY Color USB3
Sony IMX250 MX050MG-SY-X2G2 Monochrome PCIe Gen2 x2
Sony IMX250 MX050CG-SY-X2G2 Color PCIe Gen2 x2
Sony IMX255 MC089MG-SY Monochrome USB3
Sony IMX255 MC089CG-SY Color USB3
Sony IMX255 MX089MG-SY-X2G2 Monochrome PCIe Gen2 x2
Sony IMX255 MX089CG-SY-X2G2 Color PCIe Gen2 x2
Sony IMX253 MC124MG-SY Monochrome USB3
Sony IMX253 MC124CG-SY Color USB3
Sony IMX253 MX124MG-SY-X2G2 Monochrome PCIe Gen2 x2
Sony IMX253 MX124CG-SY-X2G2 Color PCIe Gen2 x2

Sony Pregius S (IMX53x, IMX54x)

On Pregius S sensors the feature uses the Sony "Multi exposure Master Fast trigger" mode. It is controlled by the same XiApi parameters as on the IMX25x cameras.

Sensor model Camera model Chroma Interface
Sony IMX540 MX245MG-SY-X2G2 Monochrome PCIe Gen2 x2
Sony IMX540 MX245CG-SY-X2G2 Color PCIe Gen2 x2
Sony IMX530 MX245MG-SY-X2G2-HDR Monochrome PCIe Gen2 x2
Sony IMX530 MX245CG-SY-X2G2-HDR Color PCIe Gen2 x2
Sony IMX541 MX203MG-SY-X2G2 Monochrome PCIe Gen2 x2
Sony IMX541 MX203CG-SY-X2G2 Color PCIe Gen2 x2
Sony IMX531 MX203MG-SY-X2G2-HDR Monochrome PCIe Gen2 x2
Sony IMX531 MX203CG-SY-X2G2-HDR Color PCIe Gen2 x2
Sony IMX542 MX161MG-SY-X2G2 Monochrome PCIe Gen2 x2
Sony IMX542 MX161CG-SY-X2G2 Color PCIe Gen2 x2
Sony IMX532 MX161MG-SY-X2G2-HDR Monochrome PCIe Gen2 x2
Sony IMX532 MX161CG-SY-X2G2-HDR Color PCIe Gen2 x2
Sony IMX530 MC245MG-SY-HDR Monochrome USB3


The camera models above include all their connector variants (e.g. -FL, -FV, -FF, -TC, -UB).

Exposure is defined by the XiApi parameter "XI_PRM_EXPOSURE"

In this mode, the trigger defines the start of each exposure, but the length of the exposure is defined by the XI_PRM_EXPOSURE parameter. Set exposure length using XI_PRM_EXPOSURE parameter and set XI_PRM_TRG_SELECTOR to XI_TRG_SEL_EXPOSURE_START.
The trigger can be a software trigger or a hardware trigger on a GPI. With a burst count of 5, the camera needs 5 triggers to deliver one frame.


C++:

// Set exposure
xiSetParamInt(xiH, XI_PRM_EXPOSURE, 1000);
// Set trigger source (software trigger or e.g. XI_TRG_EDGE_RISING for a GPI)
xiSetParamInt(xiH, XI_PRM_TRG_SOURCE, XI_TRG_SOFTWARE);
// Set trigger selector
xiSetParamInt(xiH, XI_PRM_TRG_SELECTOR, XI_TRG_SEL_EXPOSURE_START);
// Set the number of times of exposure in one frame
xiSetParamInt(xiH, XI_PRM_EXPOSURE_BURST_COUNT, 5);

XI_IMG image = {};
image.size = sizeof(XI_IMG);
xiStartAcquisition(xiH);
// Each trigger starts one sub-exposure
for (int i = 0; i < 5; i++)
    xiSetParamInt(xiH, XI_PRM_TRG_SOFTWARE, 1);
// The frame is delivered after the last trigger
xiGetImage(xiH, 5000, &image);

Python:

from ximea import xiapi

cam = xiapi.Camera()
cam.open_device()
img = xiapi.Image()

# Set exposure
cam.set_exposure(1000)
# Set trigger source (software trigger or e.g. 'XI_TRG_EDGE_RISING' for a GPI)
cam.set_trigger_source('XI_TRG_SOFTWARE')
# Set trigger selector
cam.set_trigger_selector('XI_TRG_SEL_EXPOSURE_START')
# Set the number of times of exposure in one frame
cam.set_exposure_burst_count(5)

cam.start_acquisition()
# Each trigger starts one sub-exposure
for i in range(5):
    cam.set_trigger_software(1)
# The frame is delivered after the last trigger
cam.get_image(img, timeout=5000)
print(list(img.exposure_sub_times_us))

cam.stop_acquisition()
cam.close_device()


Exposure defined by the length of the trigger pulse

In this mode, both the start of the exposure as well as the length of the exposure is defined by the trigger pulse. Set XI_PRM_TRG_SELECTOR to XI_TRG_SEL_EXPOSURE_ACTIVE. The exposure length will be defined by the trigger pulse length.
This mode requires a hardware trigger on a GPI.

C++:

// Set GPI1 as trigger input
xiSetParamInt(xiH, XI_PRM_GPI_SELECTOR, XI_GPI_PORT1);
xiSetParamInt(xiH, XI_PRM_GPI_MODE, XI_GPI_TRIGGER);
xiSetParamInt(xiH, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_RISING);
// Set trigger selector
xiSetParamInt(xiH, XI_PRM_TRG_SELECTOR, XI_TRG_SEL_EXPOSURE_ACTIVE);
// Set the number of times of exposure in one frame
xiSetParamInt(xiH, XI_PRM_EXPOSURE_BURST_COUNT, 5);

Python:

# Set GPI1 as trigger input
cam.set_gpi_selector('XI_GPI_PORT1')
cam.set_gpi_mode('XI_GPI_TRIGGER')
cam.set_trigger_source('XI_TRG_EDGE_RISING')
# Set trigger selector
cam.set_trigger_selector('XI_TRG_SEL_EXPOSURE_ACTIVE')
# Set the number of times of exposure in one frame
cam.set_exposure_burst_count(5)


Notes

Note 1 (FOT): In both of the above modes, there is a short period (FOT) after each exposure during which time the next exposure cannot start. The length of this period depends on the sensor:
  • Sony Pregius (IMX25x): FOT = 11 * line_period
  • Sony Pregius S (IMX53x, IMX54x): FOT = 8 * line_period

The line_period depends on various other parameters (e.g. bit depth, ROI, interface), see Line Period in the Camera performance calculator.

Example for MC245MG-SY-HDR at full resolution (Multi exposure Master Fast trigger mode):

Bit depth Line period FOT Max. trigger frequency
8 bit 13.454 µs ~108 µs ~9.07 kHz
12 bit 20.181 µs ~161 µs ~6.09 kHz

The maximum trigger frequency is calculated as 1 / (FOT + T_TGED + T_OFFSET + T_EXP_MIN), where T_TGED = 0.1 µs, T_OFFSET = 2.46 µs and the minimum exposure T_EXP_MIN = 0.05 µs. Longer exposures reduce the maximum trigger frequency accordingly.

Note 2: None of the above two modes support the start of exposure during readout (trigger overlap feature).

Note 3: Limitations of the IMX sensors in multi-exposure mode lead to an increase in noise in comparison to a single exposure frame.

Note 4: The multi exposure mode does not work ideally when ultra short exposure times are used (<15us).

Note 5 (trigger required): When XI_PRM_EXPOSURE_BURST_COUNT is bigger than 1, the camera works only with a trigger (XI_TRG_SEL_EXPOSURE_START or XI_TRG_SEL_EXPOSURE_ACTIVE). If no trigger source is set (free run), the camera does not deliver any images. If fewer triggers than the burst count arrive, no image is delivered (xiGetImage returns timeout).

Note 6 (image header): The exposure times of the sub-exposures are available in the image header:
  • C++: XI_IMG.exposure_sub_times_us[5]
  • Python: img.exposure_sub_times_us
    The array holds the first 5 sub-exposures, unused entries are 0. The field exposure_time_us contains the total exposure time of the frame (exposure * burst count).

Applications

A typical application is tracking a light spot in the dark, where the resulting image captures the trajectory of the point over time.

Another application is measurement with modulated (pulsed) illumination, similar to lock-in detection. The camera exposes only during selected phases of the light modulation, synchronized by the trigger signal, and accumulates many short sub-exposures into one frame. This increases the signal of weak, fast-modulated light while the amount of data and the frame rate stay low. Comparing frames taken at different phases (e.g. light on / light off) removes the background.