Camera control

class hsi.HSCamera(input)

The camera interface type.

This type can represent either a real camera (through a TCP or GigE connection) or a simulated image-based camera.

classmethod __new__(*args, **kwargs)
get_bands()

Get the current band selection.

Returns:

List of band selections.

Return type:

list[BandSelection]

get_config()

Get the hyperspectral camera configuration.

Returns:

The configuration object.

Return type:

HSCameraConfig

get_crop()

Get the current crop settings.

Returns:

The current crop information.

Return type:

CropInfo

get_exposure()

Get the exposure time in microseconds.

Returns:

Exposure time in microseconds.

Return type:

int

get_framerate()

Get the current framerate.

Returns:

The framerate.

Return type:

float

get_framerate_list()

Get the possible framerates.

Returns:

Either a min/max framerate range or a list of possible discrete values.

Return type:

dict | list

get_horizontal_binning()

Get the horizontal binning factor.

Returns:

The current horizontal binning factor.

Return type:

int

get_vertical_binning()

Get the vertical binning factor.

Returns:

The current vertical binning factor.

Return type:

int

get_wavelengths()

Get the wavelengths of the camera’s spectral bands.

Returns:

List of wavelengths in nanometers.

Return type:

list[float]

set_bands(value)

Set the bands configuration.

Parameters:

value (list[BandSelection]) – The new band selections.

Returns:

The actual set band selections.

Return type:

list[BandSelection]

set_config(value)

Set the hyperspectral camera configuration.

Parameters:

value (HSCameraConfig) – The new configuration.

Returns:

The actual set configuration.

Return type:

HSCameraConfig

set_exposure(value)

Set the exposure time.

Parameters:

value (int) – The new exposure time in microseconds.

Returns:

The actual set value.

Return type:

int

set_framerate(value)

Set the current framerate.

Parameters:

value (float) – The desired framerate.

Returns:

The framerate that was set on the camera.

Return type:

float

set_horizontal_binning(value)

Set the horizontal binning factor.

Parameters:

value (int) – The desired horizontal binning factor.

Returns:

The actual horizontal binning factor set on the camera.

Return type:

int

set_horizontal_crop(start, end)

Set the horizontal crop boundaries.

Parameters:
  • start (int) – The start position of the crop.

  • end (int) – The end position of the crop.

Returns:

The actual set horizontal crop.

Return type:

HorizontalCrop

set_vertical_binning(value)

Set the vertical binning factor.

Parameters:

value (int) – The desired vertical binning factor.

Returns:

The actual vertical binning factor set on the camera.

Return type:

int

to_hs_image()

Convert to HSImage.

Returns:

Hyperspectral image.

Return type:

HSImage

__module__ = 'builtins'