Concrete implementation for Ximea camera

Xiseq file parser (pymanip.video.ximea.xiseq)

class pymanip.video.ximea.xiseq.XiseqFile(filepath)[source]

Simple parser for Ximea Xiseq file.

Parameters

filepath (Path or str) – path to file

files()[source]

Iterate through files in sequence. Yields a dictionnary with keys timestamp, frame and filename.

Ximea Camera module (pymanip.video.ximea.camera)

This module implements the pymanip.video.ximea.Ximea_Camera using the Python module provided by Ximea.

class pymanip.video.ximea.camera.Ximea_Camera(serial_number=None, pixelFormat=None)[source]

Bases: Camera

Concrete pymanip.video.Camera class for Ximea camera.

async acquisition_async(num=inf, timeout=None, raw=False, initialising_cams=None, raise_on_timeout=True, wait_before_stopping=None)[source]

Concrete implementation of pymanip.video.Camera.acquisition_async() for the Ximea camera.

timeout in milliseconds.

Parameters
  • raw (bool (optional)) – if True, returns the XI_IMG object instead of a numpy array.

  • wait_before_stopping (async function (optional)) – async function to be awaited before stopping the acquisition_async

close()[source]

Close connection to the camera

get_exposure_time()[source]

This method gets the exposure time in seconds for the camera.

async get_image(loop, image, timeout=5000)[source]

Asynchronous version of xiapi.Camera.get_image method This function awaits for next image to be available in transport buffer. Color images are in BGR order (similar to OpenCV default). Attention: matplotlib expects RGB order.

Parameters
  • image (xiapi.Image) – Image instance to copy image to

  • timeout (int) – timeout in milliseconds

get_roi()[source]

Get ROI

get_trigger_mode()[source]

Returns True if external, False if software

property name

Camera name

set_auto_white_balance(toggle)[source]

Enable/Disable auto white balance

Parameters

toggle (bool) – True if auto white balance

set_downsampling(binning)[source]

Change image resolution by binning

set_exposure_time(seconds)[source]

This method sets the exposure time for the camera.

Parameters

seconds (float) – exposure in seconds.

set_frame_rate(framerate_fps)[source]

Sets the framerate in frames per seconds

set_limit_bandwidth(limit)[source]

Enable limit bandwidth (useful if there are several cameras acquiring simultaneously).

set_roi(roiX0=0, roiY0=0, roiX1=0, roiY1=0)[source]

This method sets the positions of the upper left corner (X0,Y0) and lower right (X1,Y1) corner of the ROI (region of interest) in pixels.

set_trigger_mode(external)[source]

Set external trigger (edge rising).

set_vertical_skipping(factor)[source]

Set vertical skipping

xidngFillMetadataFromCameraParams()[source]

Fills entire metadata structure with current camera parameter values obtained from xiGetParam calls.

xidngStore(filename, img, camera_metadata)[source]

Saves the image into the file in DNG image file format. Does not support images in planar RGB and Transport formats.