HAL Python bindings API
The Device
object of metavision_hal
allows a user to access the camera features by requesting access
to a facility using one of the call listed below. Note that facilities availability depends on the device type
(camera or RAW file) and on the Prophesee sensor generation.
Facility Name |
Method |
Camera (sensor) availability |
RAW File availability |
---|---|---|---|
Anti-flicker |
get_i_antiflicker_module() |
Gen4.1 and IMX636 |
No |
Camera Synchronization |
get_i_camera_synchronization() |
Yes |
No |
Digital Crop |
get_i_digital_crop() |
Gen4.1 and IMX636 |
No |
Digital Event Mask |
get_i_digital_event_mask() |
Gen4.1 and IMX636 |
No |
Event Rate Control (ERC) |
get_i_erc_module() |
Gen4 Gen4.1, IMX636 |
No |
Event Rate Noise Filter |
get_i_event_rate() |
Gen3.1 only |
No |
Event Trail Filter (STC, Trail) |
get_i_event_trail_filter_module() |
Gen4.1 and IMX636 |
No |
Events Stream |
get_i_events_stream() |
Yes |
Yes |
Event Stream Decoder |
get_i_events_stream_decoder() |
Yes |
Yes |
Geometry |
get_i_geometry() |
Yes |
Yes |
HAL Software Info |
get_i_hal_software_info() |
Yes |
Yes |
Hardware Identification |
get_i_hw_identification() |
Yes |
Yes |
Hardware Register |
get_i_hw_register() |
Yes |
No |
Biases |
get_i_ll_biases() |
Yes |
No |
Monitoring |
get_i_monitoring() |
Dead Time available on Gen41 and IMX636 |
No |
Plugin Software Info |
get_i_plugin_software_info() |
Yes |
Yes |
ROI |
get_i_roi() |
Yes |
No |
Trigger In |
get_i_trigger_in() |
Yes |
No |
Trigger Out |
get_i_trigger_out() |
Yes |
No |
Those methods can be used with an SDK Core EventsIterator
that can be constructed
from a HAL device. Here is an example where we create an event iterator on a camera on which we disabled ERC:
from metavision_core.event_io.raw_reader import initiate_device
from metavision_core.event_io import EventsIterator
# first we create a HAL device
device = initiate_device(path=args.input_path)
if device.get_i_erc_module(): # we test if the facility is available on this device before using it
device.get_i_erc_module().enable(False)
# now we can create an EventsIterator from the Device
mv_iterator = EventsIterator.from_device(device=device)
for evs in mv_iterator:
any_algo.process_events(evs)
# Note that it is not recommended to leave a device in the global scope. So either create the HAL device in a
# function or delete it explicitly afterwards. Otherwise, it could result in an undefined behaviour.
del device
-
class
metavision_hal.
DeviceConfig
(*args, **kwargs) Class storing a map of (key,values) that can be used to customize how a device should be opened.
- warning
The class stores values as string for ease of use, so proper care should be taken to make sure that the value can be properly parsed when calling one of the functions to get the (typed) value
- see
DeviceDiscovery::list_device_config_options
- see
DeviceDiscovery::open
Overloaded function.
__init__(self: metavision_hal.DeviceConfig) -> None
__init__(self: metavision_hal.DeviceConfig, arg0: metavision_hal.DeviceConfig) -> None
-
get
(self: metavision_hal.DeviceConfig, arg0: str, arg1: str) → str
-
set
(self: metavision_hal.DeviceConfig, arg0: str, arg1: str) → None
-
class
metavision_hal.
DeviceDiscovery
Discovery of connected device.
-
static
list
() → List[str] Lists serial numbers of available sources, including remote cameras.
-
static
list_available_sources
() → List[Metavision::CameraDescription] Lists available sources, including remote cameras.
-
static
list_available_sources_local
() → List[Metavision::CameraDescription] Lists only local available sources.
- note
A source is considered local if we communicate directly with it.
-
static
list_available_sources_remote
() → List[Metavision::CameraDescription] Lists only remote available sources.
- note
A source is considered remote if it is part of another SoC and hence communication is indirect.
-
static
list_local
() → List[str] Lists serial numbers of local available sources.
- note
A camera is considered local if we communicate directly with it.
-
static
list_remote
() → List[str] Lists serial numbers of remote available sources.
- note
A camera is considered remote if it is part of another SoC and hence communication is indirect.
-
static
open
(*args, **kwargs) Overloaded function.
open(serial: str) -> Metavision::Device
Builds a new Device.
- serial
Serial number of the camera to open. If it is an empty string, the first available camera will be opened
- return
A new Device
open(serial: str, config: Metavision::DeviceConfig) -> Metavision::Device
Builds a new Device.
- serial
Serial number of the camera to open. If it is an empty string, the first available camera will be opened
- config
Configuration used to build the camera
- return
A new Device
-
static
open_raw_file
(*args, **kwargs) Overloaded function.
open_raw_file(raw_file: str) -> Metavision::Device
Builds a new Device from file.
- raw_file
Path to the file to open
- return
A new Device
open_raw_file(raw_file: str, file_config: Metavision::RawFileConfig) -> Metavision::Device
Builds a new Device from file.
- raw_file
Path to the file to open
- file_config
Configuration describing how to read the file (see RawFileConfig)
- return
A new Device
-
static
-
class
metavision_hal.
I_AntiFlickerModule
Anti-flicker module.
-
class
AntiFlickerMode
(self: metavision_hal.I_AntiFlickerModule.AntiFlickerMode, value: int) → None Members:
BandStop
BandPass
-
property
name
-
property
-
enable
(self: metavision_hal.I_AntiFlickerModule, b: bool) → bool Toggles Anti-flicker activation.
- b
Desired state. b = true means Anti-flicker active, and b = false means Anti-flicker inactive.
- note
When Anti-flicker is inactive, all the events generated by the sensor are transmitted. Potential bandwidth limitation might occur.
- return
true on success
-
get_band_high_frequency
(self: metavision_hal.I_AntiFlickerModule) → int Gets highest frequency of the band.
-
get_band_low_frequency
(self: metavision_hal.I_AntiFlickerModule) → int Gets lowest frequency of the band.
-
get_duty_cycle
(self: metavision_hal.I_AntiFlickerModule) → float Gets the duty cycle for Antiflicker filter.
- return
The duty cycle for Antiflicker filter as a percentage
-
get_filtering_mode
(self: metavision_hal.I_AntiFlickerModule) → Metavision::I_AntiFlickerModule::AntiFlickerMode Gets filtering mode.
-
get_frequency_band
(self: metavision_hal.I_AntiFlickerModule) → Tuple[int, int] Gets frequency band setting.
-
get_max_supported_frequency
(self: metavision_hal.I_AntiFlickerModule) → int Gets maximum supported frequency.
-
get_min_supported_frequency
(self: metavision_hal.I_AntiFlickerModule) → int Gets minimum supported frequency.
-
is_enabled
(self: metavision_hal.I_AntiFlickerModule) → bool Returns Anti-flicker activation state.
- return
The Anti-flicker state
-
set_duty_cycle
(self: metavision_hal.I_AntiFlickerModule, percent_activity: float) → bool Sets the duty cycle for Antiflicker filter.
- duty_cycle
Target duty cycle of Antiflicker filter as a percentage
- return
true on success, false otherwise
-
set_filtering_mode
(self: metavision_hal.I_AntiFlickerModule, arg0: Metavision::I_AntiFlickerModule::AntiFlickerMode) → bool Sets the anti-flicker filtering mode.
- mode
Anti-flicker mode
- note
Facility might be reset if parameter is changed while enabled
- return
true on success
-
set_frequency_band
(self: metavision_hal.I_AntiFlickerModule, min_freq: int, max_freq: int) → bool Sets anti-flicker parameters.
Defines the frequency band to be kept or removed in the range [min_supported_freq, max_supported_freq] Hz where minimum and maximum supported frequencies can be obtained with get_min_supported_frequency
- low_freq
Lowest frequency of the band (in Hz)
- high_freq
Highest frequency of the band (in Hz)
- note
Facility might be reset if parameter is changed while enabled :exception: if frequencies are outside of the range [min_supported_freq, max_supported_freq] Hz
- return
true on success
-
class
-
class
metavision_hal.
I_CameraSynchronization
Facility that controls the camera mode (standalone, master or slave)
-
set_mode_master
(self: metavision_hal.I_CameraSynchronization) → bool Sets the camera as master.
The camera sends clock signal to another device
- warning
This function must be called before starting the camera
- return
true on success
-
set_mode_slave
(self: metavision_hal.I_CameraSynchronization) → bool Sets the camera as slave.
The camera receives the clock from another device
- warning
This function must be called before starting the camera
- return
true on success
-
set_mode_standalone
(self: metavision_hal.I_CameraSynchronization) → bool Sets the camera in standalone mode.
The camera does not interact with other devices.
- warning
This function must be called before starting the camera
- return
true on success
-
-
class
metavision_hal.
I_Decoder
Interface for decoding a stream of events.
This class is meant to receive raw data from the camera, and dispatch parts of the buffer to instances of I_EventDecoder for specific event types.
-
add_time_callback
(self: metavision_hal.I_Decoder, cb: object) → None Adds a function that will be called from time to time, giving current timestamp.
- cb
Callback to add
- return
ID of the added callback
- note
This method is not thread safe. You should add/remove the various callback before starting the streaming
- note
It’s not allowed to add/remove a callback from the callback itself
-
decode
(self: metavision_hal.I_Decoder, RawData: numpy.ndarray[numpy.uint8]) → None Decodes raw data. Identifies the events in the buffer and dispatches it to the instance Event Decoder corresponding to each event type
- Parameters
RawData – Numpy array of Events
-
get_last_timestamp
(self: metavision_hal.I_Decoder) → int Gets the timestamp of the last event.
- return
Timestamp of the last event
-
remove_callback
(self: metavision_hal.I_Decoder, callback_id: int) → bool Removes a previously registered time callback.
- callback_id
Callback ID
- return
true if the callback has been unregistered correctly, false otherwise.
- note
This method is not thread safe. You should add/remove the various callback before starting the streaming
-
-
class
metavision_hal.
I_DigitalCrop
Digital Crop feature All pixels outside of the cropping region will be dropped by the sensor.
-
enable
(self: metavision_hal.I_DigitalCrop, arg0: bool) → bool Applies Digital Crop.
- state
If true, enables Digital Crop. If false, disables it
- return
true on success
-
get_window_region
(self: metavision_hal.I_DigitalCrop) → Tuple[int, int, int, int] Gets the digital crop window region currently defined.
- return
digital crop window region currently defined
-
is_enabled
(self: metavision_hal.I_DigitalCrop) → bool Returns Digital Crop activation state.
- return
The Digital Crop state
-
set_window_region
(self: metavision_hal.I_DigitalCrop, arg0: Tuple[int, int, int, int], arg1: bool) → bool Defines digital crop window region.
- region
The region of pixels that should be cropped
- reset_origin
If true, the origin of the event output coordinates will shift to the Crop Window start
- warning
When reset_origin is true, start_x must be a multiple of 32 and end_x a multiple of 31, if not then the function will fail and return false.
- return
true on success
-
-
class
metavision_hal.
I_DigitalEventMask
Interface for Digital Event Mask commands.
-
get_pixel_masks
(self: metavision_hal.I_DigitalEventMask) → List[Metavision::I_DigitalEventMask::I_PixelMask] Get all available masks.
- return
a list of pixel masks pointer
-
-
class
metavision_hal.
I_ErcModule
Interface for Event Rate Controller (ERC) commands.
-
enable
(self: metavision_hal.I_ErcModule, b: bool) → bool Toggles ERC activation.
- b
Desired state. b = true means ERC active, and b = false means ERC inactive.
- note
When ERC is inactive, all the events generated by the sensor are transmitted. Potential bandwidth limitation might occur.
- return
true on success
-
get_cd_event_count
(self: metavision_hal.I_ErcModule) → int Gets the maximum number of events that ERC will transmit over the count period.
- return
The maximum event count
- note
See set_cd_event_count to define the event count parameter.
-
get_cd_event_rate
(self: metavision_hal.I_ErcModule) → int Gets the CD event rate set point of the ERC.
- return
The event rate expressed in events per second
- note
See set_cd_event_rate to define the event rate target.
-
get_max_supported_cd_event_count
(self: metavision_hal.I_ErcModule) → int Gets the maximum supported value for cd_event_count setting.
-
get_max_supported_cd_event_rate
(self: metavision_hal.I_ErcModule) → int Gets the maximum supported value for cd_event_rate setting.
-
get_min_supported_cd_event_count
(self: metavision_hal.I_ErcModule) → int Gets the minimum supported value for cd_event_count setting.
-
get_min_supported_cd_event_rate
(self: metavision_hal.I_ErcModule) → int Gets the minimum supported value for cd_event_rate setting.
-
is_enabled
(self: metavision_hal.I_ErcModule) → bool Returns ERC activation state.
- return
The ERC state
-
set_cd_event_count
(self: metavision_hal.I_ErcModule, event_count: int) → bool Sets the maximum number of events that ERC block should let pass over the count period.
- event_count
The desired maximum number of event per reference period
- note
If you wish to parameterize the ERC with a set point expressed with an event rate use set_cd_event_rate instead. The 2 methods operate on the same register and conversions are managed automatically.
- return
true on success
-
set_cd_event_rate
(self: metavision_hal.I_ErcModule, events_per_sec: int) → bool Sets the target CD event rate of the ERC.
- events_per_sec
Event rate expressed in events per second
- note
Event rate is computed by ERC block as the number of events generated by the sensor divided by the count period. To get the count period value, see get_count_period.
- note
This method and set_cd_event_count operate over the same register. It is Expected that after parameterizing ERC using event rate, result of get_cd_event_count also changes.
- return
true on success
-
-
class
metavision_hal.
I_EventRateNoiseFilterModule
Interface for accessing the sensor level event rate based on noise filtering of a sensor.
This sensor level noise filter is based on the event rate only. If enabled, the sensor will transfer data if and only if the event rate is above a given event rate. It avoids streaming background noise information without relevant activity information.
-
enable
(self: metavision_hal.I_EventRateNoiseFilterModule, enable_filter: bool) → bool Enables/disables the noise filter.
- enable_filter
Whether to enable the noise filtering
-
get_event_rate_threshold
(self: metavision_hal.I_EventRateNoiseFilterModule) → int Gets the event rate threshold in Kevt/s below which no events are streamed.
- return
Event rate threshold in Kevt/s
-
set_event_rate_threshold
(self: metavision_hal.I_EventRateNoiseFilterModule, threshold_Kev_s: int) → bool Sets the event rate threshold. Below this threshold, no events are streamed.
- threshold_Kev_s
Event rate threshold in Kevt/s
- return
true if the input value was correctly set (i.e. it falls in the range of acceptable values for the sensor)
-
-
class
metavision_hal.
I_EventTrailFilterModule
Noise filter module.
-
enable
(self: metavision_hal.I_EventTrailFilterModule, state: bool) → bool Enables the EventTrailFilterModule with previously configured settings. Filtering type and threshold should be set before enabling.
- state
If true, enables the module. If false, disables it
- return
true on success
-
get_max_supported_threshold
(self: metavision_hal.I_EventTrailFilterModule) → int Gets the maximum supported value for event trail filtering threshold delay (in microseconds)
- return
The maximum supported threshold value
-
get_min_supported_threshold
(self: metavision_hal.I_EventTrailFilterModule) → int Gets the minimum supported value for event trail filtering threshold delay (in microseconds)
- return
The minimum supported threshold value
-
get_threshold
(self: metavision_hal.I_EventTrailFilterModule) → int Gets the event trail filtering threshold delay (in microseconds)
- return
The event trail filtering threshold
-
is_enabled
(self: metavision_hal.I_EventTrailFilterModule) → bool Returns EventTrailFilterModule activation state.
- return
The EventTrailFilterModule state
-
set_stc_cut_trail_filter
(self: metavision_hal.I_EventTrailFilterModule) → bool Sets the EventTrailFilterModule filter mode to STC_CUT_TRAIL
This filter keeps the second event within a burst of events with the same polarity Returns true on success, false if filter type is not supported
-
set_threshold
(self: metavision_hal.I_EventTrailFilterModule, threshold: int) → bool Sets the event trail filtering threshold delay.
- threshold
Delay (in microseconds) between two bursts of events
- note
Facility might be reset if parameter is changed while enabled
- return
true on success
-
set_trail_filter
(self: metavision_hal.I_EventTrailFilterModule) → bool Sets the EventTrailFilterModule filter mode to TRAIL
This filter keeps the first event within a burst of events with the same polarity Returns true on success, false if filter type is not supported
-
-
class
metavision_hal.
I_EventsStream
Class for getting buffers from cameras or files.
-
get_latest_raw_data
(self: metavision_hal.I_EventsStream) → numpy.ndarray[numpy.uint8] Gets latest raw data from the event buffer.
Gets raw data from the event buffer received since the last time this function was called.
- Returns
Numpy array of Events
-
log_raw_data
(self: metavision_hal.I_EventsStream, f: str) → bool Enables the logging of the stream of events in the input file f.
This methods first writes the header retrieved through I_HW_Identification. Buffers of data are then written each time get_latest_raw_data is called (i.e. in the same thread it is called).
- f
The file to log into
- return
true if the file could be opened for writing, false otherwise or if the file name f is the same as the one read from
- warning
The writing of each buffer of event will have to be triggered by calls to get_latest_raw_data
-
poll_buffer
(self: metavision_hal.I_EventsStream) → int Returns a value that informs if some events are available in the buffer from the camera or the file.
- return
Value that informs if some events are available in the buffer - 1 if there are events available - 0 if no events are available - -1 if an error occurred or no more events will ever be available (like when reaching end of file)
-
start
(self: metavision_hal.I_EventsStream) → None Starts streaming events.
-
stop
(self: metavision_hal.I_EventsStream) → None Stops streaming events.
-
stop_log_raw_data
(self: metavision_hal.I_EventsStream) → None Stops logging RAW data.
Does nothing if no recording has been started
-
wait_next_buffer
(self: metavision_hal.I_EventsStream) → int Returns a value that informs if some events are available in the buffer from the camera and blocks waiting until more events are available.
- return
Value that informs if some events are available in the buffer - 1 if there are events available - -1 if an error occurred or no more events will ever be available (like when reaching end of file)
-
-
class
metavision_hal.
I_Geometry
Class to access information on the size of the sensor.
-
get_height
(self: metavision_hal.I_Geometry) → int Returns height of the sensor in pixels.
- return
Sensor’s height
-
get_width
(self: metavision_hal.I_Geometry) → int Returns width of the sensor in pixels.
- return
Sensor’s width
-
-
class
metavision_hal.
I_HALSoftwareInfo
Class that provides information about the HAL software.
-
get_software_info
(self: metavision_hal.I_HALSoftwareInfo) → metavision_sdk_base.SoftwareInfo Gets plugin’s software information.
- return
The plugin’s software information
-
-
class
metavision_hal.
I_HW_Identification
Facility to provide information about the available system.
-
get_available_data_encoding_formats
(self: metavision_hal.I_HW_Identification) → List[str] Returns the name of the available data encoding formats.
- return
The available data encoding formats
- note
Currently the available formats are: - EVT2 - EVT21 - EVT3
-
get_connection_type
(self: metavision_hal.I_HW_Identification) → str Returns the connection with the camera as a string.
- return
A string providing the type of connection with the available camera
-
get_current_data_encoding_format
(self: metavision_hal.I_HW_Identification) → str Returns the name of the currently used data encoding format.
- return
The currently used data encoding format
- see
get_available_data_encoding_formats
-
get_integrator
(self: metavision_hal.I_HW_Identification) → str Returns the integrator name.
- return
Name of the integrator
-
get_sensor_info
(self: metavision_hal.I_HW_Identification) → Metavision::I_HW_Identification::SensorInfo Returns the detail about the available sensor.
- return
The sensor information
-
get_serial
(self: metavision_hal.I_HW_Identification) → str Returns the serial number of the camera.
- return
Serial number as a string
-
get_system_id
(self: metavision_hal.I_HW_Identification) → int Returns the system id of the camera.
- return
The system id as an integer
- note
This number can be used to check the compatibility of biases file
-
get_system_info
(self: metavision_hal.I_HW_Identification) → dict Returns all available information.
- return
Map of key-value
- note
The purpose of this function is mainly for debug and display system information The class provides a basic implementation that can be enriched by inherit class
-
-
class
metavision_hal.
I_HW_Register
Interface facility for writing/reading hardware registers.
-
read_register
(*args, **kwargs) Overloaded function.
read_register(self: metavision_hal.I_HW_Register, address: int) -> int
Reads register.
- address
Address of the register to read
- return
Value read
read_register(self: metavision_hal.I_HW_Register, address: str) -> int
Reads register.
- address
Address of the register to read
- return
Value read
read_register(self: metavision_hal.I_HW_Register, address: str, bitfield: str) -> int
Reads register.
- address
Address of the register to read
- bitfield
Bit field of the register to read
- return
Value read
-
write_register
(*args, **kwargs) Overloaded function.
write_register(self: metavision_hal.I_HW_Register, address: int, v: int) -> None
Writes register.
- address
Address of the register to write
- v
Value to write
write_register(self: metavision_hal.I_HW_Register, address: str, v: int) -> None
Writes register.
- address
Address of the register to write
- v
Value to write
write_register(self: metavision_hal.I_HW_Register, address: str, bitfield: str, v: int) -> None
Writes register.
- address
Address of the register to write
- bitfield
Bit field of the register to write
- v
Value to write
-
-
class
metavision_hal.
I_LL_Biases
Interface facility for Low Level Biases.
-
get
(self: metavision_hal.I_LL_Biases, bias_name: str) → int Gets bias value.
- bias_name
Name of the bias whose value to get
- return
The bias value
-
get_all_biases
(self: metavision_hal.I_LL_Biases) → dict Gets all biases values.
- return
A map containing the biases values
-
set
(self: metavision_hal.I_LL_Biases, bias_name: str, bias_value: int) → bool Sets bias value.
- bias_name
Bias to set
- bias_value
Value to set the bias to
- return
true on success
-
-
class
metavision_hal.
I_Monitoring
Interface facility to monitor sensor parameters (such as temperature and illumination)
-
get_illumination
(self: metavision_hal.I_Monitoring) → int Gets illumination.
- return
Sensor’s illumination (in lux) or throw on Error
-
get_pixel_dead_time
(self: metavision_hal.I_Monitoring) → int Gets Pixel Dead Time (aka. "refractory period"). This is the minimum time latency between the generation of 2 events by a pixel.
- return
Estimated dead time (in us) throw on Error
-
get_temperature
(self: metavision_hal.I_Monitoring) → int Gets temperature.
- return
Sensor’s temperature (in C) or throw on Error
-
-
class
metavision_hal.
I_PixelMask
Interface for Digital Pixel Mask commands.
- Note
Each mask can be associated with a pixel and enabled/disabled on demand
-
get_mask
(self: metavision_hal.I_PixelMask) → Tuple[int, int, bool] Get the current mask settings.
- return
a tuple that packs the X and Y pixel coordinates and a boolean defining whether the mask is enabled
-
set_mask
(self: metavision_hal.I_PixelMask, arg0: int, arg1: int, arg2: bool) → bool Set coordinate for the pixel to be masked.
- x
the pixel horizontal coordinate
- y
the pixel vertical coordinate
- enabled
when true, the mask will prevent pixel from generating CD event
- return
true on success
-
class
metavision_hal.
I_PluginSoftwareInfo
Provides information about the Plugin software.
-
get_plugin_name
(self: metavision_hal.I_PluginSoftwareInfo) → str Gets plugin name.
- return
The plugin name
-
get_software_info
(self: metavision_hal.I_PluginSoftwareInfo) → metavision_sdk_base.SoftwareInfo Gets HAL’s software information.
- return
HAL’s software information
-
-
class
metavision_hal.
I_ROI
Interface facility for ROI (Region Of Interest)
-
class
Mode
(self: metavision_hal.I_ROI.Mode, value: int) → None Members:
ROI
RONI
-
property
name
-
property
-
class
Window
(*args, **kwargs) Defines a simple rectangular window.
Overloaded function.
__init__(self: metavision_hal.I_ROI.Window, arg0: metavision_hal.I_ROI.Window) -> None
__init__(self: metavision_hal.I_ROI.Window, arg0: int, arg1: int, arg2: int, arg3: int) -> None
Creates a window defined by the corners {(x, y), (x + width, y + height)}.
-
to_string
(self: metavision_hal.I_ROI.Window) → str Returns the window as a string.
- return
Human readable string representation of a window
-
enable
(self: metavision_hal.I_ROI, enable: bool) → bool Applies ROI.
- state
If true, enables ROI. If false, disables it
- warning
At least one ROI should have been set before calling this function
- return
true on success
-
get_max_supported_windows_count
(self: metavision_hal.I_ROI) → int Gets the maximum number of windows.
- return
the maximum number of windows that can be set via set_windows
-
set_lines
(self: metavision_hal.I_ROI, cols: list, rows: list) → None
-
set_mode
(self: metavision_hal.I_ROI, mode: Metavision::I_ROI::Mode) → bool Sets the window mode.
- mode
window mode to set (ROI or RONI)
- return
true on success
-
set_window
(self: metavision_hal.I_ROI, roi: Metavision::I_ROI::Window) → bool Sets a window.
The window will be applied according to the current mode (ROI or RONI) :window: window to set
- return
true on success
-
set_windows
(self: metavision_hal.I_ROI, roi_list: list) → None
-
class
-
class
metavision_hal.
I_TriggerIn
Interface to handle external trigger signals.
-
class
Channel
(self: metavision_hal.I_TriggerIn.Channel, value: int) → None Members:
MAIN
AUX
LOOPBACK
-
property
name
-
property
-
disable
(self: metavision_hal.I_TriggerIn, channel: metavision_hal.I_TriggerIn.Channel) → bool Disables external trigger monitoring.
- channel
external trigger channel to disable
- return
true if external trigger monitoring was successfully disabled, false otherwise
-
enable
(self: metavision_hal.I_TriggerIn, channel: metavision_hal.I_TriggerIn.Channel) → bool Enables external trigger monitoring.
- channel
external trigger channel to enable
- return
true if external trigger monitoring was successfully enabled, false otherwise
- warning
External trigger monitoring is disabled by default on camera start
-
get_available_channels
(self: metavision_hal.I_TriggerIn) → Dict[metavision_hal.I_TriggerIn.Channel, int] Returns the map of available channels.
- The returned map lists the available channels and gives the mapping between the Channel enum and the numeric value that can be found in the corresponding event id field
- see
Metavision::EventExtTrigger
- return
a map of available channels
-
is_enabled
(self: metavision_hal.I_TriggerIn, channel: metavision_hal.I_TriggerIn.Channel) → bool Checks if external trigger monitoring is enabled.
- channel
external trigger channel to check
- return
true if external trigger monitoring is enabled, False otherwise
-
class
-
class
metavision_hal.
I_TriggerOut
Internal interface for trigger out signal configuration.
- Note
The trigger out signal is a binary signal
-
disable
(self: metavision_hal.I_TriggerOut) → bool Disables the trigger out.
-
enable
(self: metavision_hal.I_TriggerOut) → bool Enables the trigger out.
- return
true if trigger was successfully enabled, false otherwise
-
set_duty_cycle
(self: metavision_hal.I_TriggerOut, period_ratio: float) → bool Sets the duty cycle of the trigger out signal i.e. the pulse duration.
The duty cycle represents the part of the signal, during which its value is 1 (0 otherwise). Duty cycle represents the quantity pulse_width_us/period_us and thus must be in the range [0, 1]. The period is set with set_period.
Setting a duty cycle of 0.5 (50%) means that the value of the signal is 1 during the first half of each period, and 0 during the second half.
- period_ratio
the ratio representing pulse_width_us/period_us which must be in the range [0,1] (value is clamped in this range otherwise)
- return
true on success
-
set_period
(self: metavision_hal.I_TriggerOut, period_us: int) → bool Sets the trigger out signal period (in us)
- period_us
the period to set (in us)
- return
true on success
-
class
metavision_hal.
RawFileConfig
(*args, **kwargs) RAW files configuration’s options.
Overloaded function.
__init__(self: metavision_hal.RawFileConfig) -> None
__init__(self: metavision_hal.RawFileConfig, arg0: metavision_hal.RawFileConfig) -> None
-
property
do_time_shifting
Take the first timer high of the file as origin of time.
-
property
n_events_to_read
Number of events_byte_size blocks to read. At each read, n_events_to_read_*sizeof(RAW_event) bytes are read. :warning: sizeof(RAW_event) is defined by the events format contained in the RAW file read.
-
property
n_read_buffers
The maximum number of buffers to allocate and use for reading. Each buffer contains at most n_events_to_read_ RAW events. The maximum memory allocated to read the RAW file will be read_buffers_count_ * n_events_to_read_ * sizeof(RAW_event). One can use this parameters to have a finer control on offline memory usage
-
class
metavision_hal.
RawFileHeader
(*args, **kwargs) A dedicated class to handle RAW file headers and handle easily their mandatory fields.
Overloaded function.
__init__(self: metavision_hal.RawFileHeader) -> None
__init__(self: metavision_hal.RawFileHeader, arg0: metavision_hal.RawFileHeader) -> None
__init__(self: metavision_hal.RawFileHeader, arg0: dict) -> None
- Parameters
dict (dictionary) – a python dictionary holding key value pairs of string types.
-
get_camera_integrator_name
(self: metavision_hal.RawFileHeader) → str Gets the integrator name of the source used to generate the RAW file.
- return
Returns the integrator name if any, or an empty string otherwise
-
get_plugin_integrator_name
(self: metavision_hal.RawFileHeader) → str Gets the integrator name of the plugin used to generate the RAW file.
- return
Returns the integrator name if any, or an empty string otherwise
-
get_plugin_name
(self: metavision_hal.RawFileHeader) → str Gets the name of the plugin to use to read the RAW file.
- return
Returns the name of the plugin if any, or an empty string otherwise
-
set_camera_integrator_name
(self: metavision_hal.RawFileHeader, integrator_name: str) → None Sets the name of the integrator of the source used to generate the RAW file.
- integrator_name
Name of the integrator
-
set_plugin_integrator_name
(self: metavision_hal.RawFileHeader, integrator_name: str) → None Sets the name of the integrator of the plugin used to generate the RAW file.
- integrator_name
Name of the integrator
-
set_plugin_name
(self: metavision_hal.RawFileHeader, plugin_name: str) → None Sets the name of the plugin to use to read the RAW file.
- plugin_name
Name of the plugin
-
class
metavision_hal.
SensorInfo
Information about the type of sensor available.
Examples for Gen3.1 Sensor: - major_version = 3 - minor_version = 1
-
property
major_version
Sensor Generation.
-
property
minor_version
Sensor Revision.
-
property
name
Sensor Name.
-
property
-
metavision_hal.
get_hal_software_info
() → metavision_sdk_base.SoftwareInfo
-
class
metavision_hal.
ConnectionType
(self: metavision_hal.ConnectionType, value: int) → None Members:
MIPI_LINK
USB_LINK
NETWORK_LINK
PROPRIETARY_LINK