SDK Analytics Configs

struct Metavision::JetMonitoringAlarmConfig

Jet monitoring alarm parameters.

Public Functions

bool is_valid() const

Basic validation.

Public Members

bool alarm_on_count = false

If true, an alarm will be raised if the jet count exceeds the expected_count value.

int max_expected_count = 0

Maximum expected number of jets.

bool alarm_on_cycle = false

Activate/deactivate alarm on cycle time.

float expected_cycle_ms = 0

Expected cycle time.

float cycle_tol_percentage = 0

Tolerance for estimated cycle time, in percentage of expected_cycle_ms.

struct Metavision::JetMonitoringAlgorithmConfig

Jet monitoring algorithm parameters.

Public Types

enum Orientation

Enum listing 4 possible nozzle orientations in the image reference frame.

The angle between the nozzle reference frame and the image reference frame must be inside {0; +-90; 180}

Values:

enumerator Down = 0
enumerator Up = 1
enumerator Left = 2
enumerator Right = 3

Public Members

Orientation nozzle_orientation = Down

Nozzle orientation.

cv::Rect detection_roi

Central ROI used to detect jets by identifying peaks in the event-rate.

struct JetMonitoringLoggerConfig

Jet monitoring logger parameters.

struct Metavision::LineClusterTrackingConfig

Struct representing the parameters used to instantiate a LineClusterTracker inside PsmAlgorithm.

Public Functions

LineClusterTrackingConfig() = default

Default constructor.

LineClusterTrackingConfig(unsigned int precision_time_us, unsigned int bitsets_buffer_size, unsigned int cluster_ths = 3, unsigned int num_clusters_ths = 4, unsigned int min_inter_clusters_distance = 1, float learning_rate = 1.f, float max_dx_allowed = 5.f, unsigned int max_nbr_empty_rows = 0)

Constructor.

Parameters
  • precision_time_us: Time duration between two asynchronous processes (us)

  • bitsets_buffer_size: Size of the bitset circular buffer (accumulation_time = bitsets_buffer_size *precision_time_us )

  • cluster_ths: Minimum width (in pixels) below which clusters of events are considered as noise

  • num_clusters_ths: Minimum number of cluster measurements below which a particle is considered as noise

  • min_inter_clusters_distance: Once small clusters have been removed, merge clusters that are closer than this distance. This helps dealing with dead pixels that could cut particles in half. If set to 0, do nothing

  • learning_rate: Ratio in the weighted mean between the current x position and the observation. This is used only when the particle is shrinking, because the front of the particle is always sharp while the trail might be noisy. 0.0 is conservative and does not take the observation into account, whereas 1.0 has no memory and overwrites the cluster estimate with the new observation. A value outside ]0,1] disables the weighted mean, and 1.0 is used instead.

  • max_dx_allowed: Caps x variation at this value. A negative value disables the clamping. This is used only when the particle is shrinking, because the front of the particle is always sharp while the trail might be noisy.

  • max_nbr_empty_rows: Number of consecutive empty measurements that is tolerated

struct Metavision::LineParticleTrackingConfig

Struct representing the parameters used to instantiate a LineParticleTracker inside PsmAlgorithm.

Public Functions

LineParticleTrackingConfig(bool is_going_down, unsigned int dt_first_match_ths, double tan_angle_ths = 1., double matching_ths = 0.5)

Constructor.

Parameters
  • is_going_down: True if the particle is falling, false if it’s going upwards

  • dt_first_match_ths: Maximum allowed duration to match the 2nd particle of a track

  • tan_angle_ths: Tangent of the angle with the vertical beyond which two particles on consecutive lines can’t be matched

  • matching_ths: Minimum similarity score in [0,1] needed to match two particles

struct Metavision::SpatterTrackerAlgorithmConfig

Configuration to instantiate a SpatterTrackerAlgorithmConfig.

Public Functions

SpatterTrackerAlgorithmConfig(int cell_width, int cell_height, timestamp accumulation_time, int untracked_threshold = 5, int activation_threshold = 10, bool apply_filter = true, int max_distance = 50, const int min_size = 1, const int max_size = std::numeric_limits<int>::max())

Constructor.

Parameters
  • cell_width: Width of cells used for clustering

  • cell_height: Height of cells used for clustering

  • accumulation_time: Time to accumulate events and process

  • untracked_threshold: Maximum number of times a spatter_cluster can stay untracked before being removed

  • activation_threshold: Threshold distinguishing an active cell from inactive cells (i.e. minimum number of events in a cell to consider it as active)

  • apply_filter: If true, than applying a simple filter to remove crazy pixels

  • max_distance: Max distance for clusters association (in pixels)

  • min_size: Minimum object size (in pixels) - minimum of the object’s width and height should be larger than this value

  • max_size: Maximum object size (in pixels) - maximum of the object’s width and height should be smaller than this value

struct Metavision::TrackingConfig

Structure used to configure the TrackingAlgorithm.

Public Types

enum ClusterMaker

Defines the type of cluster maker used by the TrackingAlgorithm.

Values:

enumerator SIMPLE_GRID
enumerator MEDOID_SHIFT
enum DataAssociation

Defines type of data association used by the TrackingAlgorithm.

Values:

enumerator NEAREST
enumerator IOU
enum Initializer

Defines the type of initializer used by the TrackingAlgorithm. Only one method implemented for now.

Values:

enumerator SIMPLE
enum MotionModel

Defines the type of motion model used by the TrackingAlgorithm.

Values:

enumerator SIMPLE
enumerator INSTANT
enumerator SMOOTH
enumerator KALMAN
enum KalmanModel

Defines the Kalman motion model used by the TrackingAlgorithm.

Values:

enumerator CONSTANT_VELOCITY
enumerator CONSTANT_ACCELERATION
enum KalmanPolicy

Defines the Kalman policy model used by the TrackingAlgorithm.

Values:

enumerator ADAPTIVE_NOISE
enumerator MEASUREMENT_TRUST
enum Tracker

Defines the type of tracker used by the TrackingAlgorithm.

Values:

enumerator ELLIPSE
enumerator CLUSTERKF

Public Members

bool print_timings_ = false

If enabled, displays a profiling summary.

ClusterMaker cluster_maker_ = ClusterMaker::SIMPLE_GRID

Type of cluster maker to use.

int cell_width_ = 10

Grid clustering cell’s width (in pixels).

int cell_height_ = 10

Grid clustering cell’s height (in pixels).

timestamp cell_deltat_ = 1000

Grid clustering cell’s time delta (in us).

int activation_threshold_ = 5

Minimum number of events needed to activate the grid.

float medoid_shift_spatial_dist_ = 5

Maximum spatial distance (using Manhattan distance) for two events to be in the same cluster.

timestamp medoid_shift_temporal_dist_ = 10000

Maximum temporal distance for two events to be in the same cluster.

int medoid_shift_min_size_ = 2

Minimum width and height for a cluster to be considered valid and given to the tracking engine.

DataAssociation data_association_ = DataAssociation::IOU

Type of data association to use.

double max_dist_ = 150.

Maximum distance between cluster’s centroid and tracker’s position.

double iou_max_dist_ = 150.

Maximum distance between cluster’s centroid and tracker’s position.

Initializer initializer_ = Initializer::SIMPLE

Type of initializer to use.

MotionModel motion_model_ = MotionModel::SIMPLE

Type of motion model to use.

double kalman_motion_model_pos_trans_std_ = 0.0001

Standard deviation of the transition noise for the tracker’s position.

double kalman_motion_model_vel_trans_std_ = 0.05

Standard deviation of the transition noise for the tracker’s velocity.

double kalman_motion_model_acc_trans_std_ = 1e-9

Standard deviation of the transition noise for the tracker’s acceleration.

double kalman_motion_model_pos_obs_std_ = 100

Standard deviation of the observation noise for the tracker’s position.

double kalman_motion_model_init_factor_ = 1e12

Factor to multiply to noise variance at initialization.

double kalman_motion_model_avg_events_per_pixel_ = 1

Expected average events per pixel rate in events/us.

timestamp kalman_motion_model_min_dt_ = 1000

Minimal timestep at which to compute Kalman filter.

KalmanPolicy kalman_motion_model_policy_ = KalmanPolicy::ADAPTIVE_NOISE

Policy used in the Kalman Filter.

KalmanModel kalman_motion_model_motion_model_ = KalmanModel::CONSTANT_VELOCITY

Motion model used in the Kalman filter.

Tracker tracker_ = Tracker::CLUSTERKF

Type of tracker to use.

timestamp delta_ts_for_prediction_ = 5000

Delta ts (in us) for the position prediction.

timestamp ts_to_stop_ = 100000

Time (in us) to wait without having updated a tracker before deleting it.