SDK CV Configs

struct Metavision::FrequencyClusteringAlgorithmConfig

Data needed to configure a FrequencyClusteringAlgorithm.

Public Functions

inline FrequencyClusteringAlgorithmConfig(int min_cluster_size, float max_frequency_diff, timestamp max_time_diff, float filter_alpha)

Constructor.

Parameters
  • min_cluster_size – Minimum size of a cluster to be output (in pixels)

  • max_frequency_diff – Maximum frequency difference for an input event to be associated to an existing cluster

  • max_time_diff – Maximum time difference to link an event to an existing cluster

  • filter_alpha – Filter weight for updating the cluster position with a new event

FrequencyClusteringAlgorithmConfig() = default

Default constructor.

struct Metavision::FrequencyEstimationConfig

Configuration used when estimating the frequency of periodic signals.

Public Functions

inline FrequencyEstimationConfig(unsigned int filter_length = 7, float min_freq = 10.f, float max_freq = 150.f, unsigned int diff_thresh_us = 1500, bool output_all_burst_events = false)

Constructor.

Note

Internally, the algorithm first estimates period using the events’ timestamps and then converts it to frequency. The decision-making criterion diff_thresh_us is then absolute in the period domain, instead of the frequency domain.

Parameters
  • filter_length – Number of measures of the same period before outputting an event

  • min_freq – Minimum frequency to output.

  • max_freq – Maximum frequency to output.

  • diff_thresh_us – Maximum difference (us) allowed between two consecutive periods to be considered the same.

  • output_all_burst_events – Whether all the events of a burst must be output or not

struct Metavision::PeriodEstimationConfig

Configuration used when estimating the period of periodic signals.

Public Functions

inline PeriodEstimationConfig(unsigned int filter_length = 7, float min_period = 6500, unsigned int max_period = 1e5, float diff_thresh_us = 1500, bool output_all_burst_events = false)

Constructor.

Parameters
  • filter_length – Number of measures of the same period before outputting an event

  • min_period – Minimum period (us) to output. Default value is 6500us, which corresponds to 153Hz

  • max_period – Maximum period (us) to output. Default value is 1e5us, which corresponds to 10Hz

  • diff_thresh_us – Maximum difference (us) allowed between two consecutive periods to be considered the same

  • output_all_burst_events – Whether all the events of a burst must be output or not

struct Metavision::SparseOpticalFlowConfig

Configuration to use with the sparse optical flow algorithm.

Public Functions

inline SparseOpticalFlowConfig(float distance_gain = 0.05f, float damping = 0.707f, float omega_cutoff = 5.f, unsigned int min_cluster_size = 5, timestamp max_link_time = 50000, bool match_polarity = true, bool use_simple_match = true, bool full_square = true, bool last_event_only = false, unsigned int size_threshold = 100000000)

Constructor.

Parameters
  • distance_gain – Distance gain of the low pass filter to compute the size of a cluster

  • damping – Damping parameter of the Luenberger estimator, will determine how fast the speed computation of a cluster will converge. It is related to the eigenvalues of the observer. The damping ratio influences the decay of the oscillations in the observer response. A value of 1 is for critical damping, while a value of 0 produces perfect oscillations. The system is underdamped for values lesser than 1 and overdamped for values greater than 1.

  • omega_cutoff – Parameter of the Luenberger estimator, will determine how fast the speed computation of a cluster will respond to changes in the system. It is related to the eigenvalues of the observer. A higher frequency results in faster convergence but may introduce more oscillations.

  • min_cluster_size – Minimal number of events hitting a cluster before it gets outputted

  • max_link_time – Maximum time in us for two events to be linked in time

  • match_polarity – Set to true to create mono-polarity clusters, otherwise it will use multi-polarity ones

  • use_simple_match – Set to false to use a costlier constant velocity match strategy

  • full_square – Set to true to check connectivity on the full 3x3 square around the events, otherwise it will use the 3x3 cross around it

  • last_event_only – Set to true to only check the connectivity with the last event added to the cluster referenced at every pixel positions

  • size_threshold – Threshold on the spatial size of a cluster before being outputted

Public Members

float distance_gain

Gain of the low pass filter to compute the size of a CCL.

float damping

Parameter of the Luenberger estimator, will determine how fast the speed computation of a CCL will converge. The damping ratio influences the decay of the oscillations in the observer response.

float omega_cutoff

Parameter of the Luenberger estimator, will determine how fast the speed computation of a CCL will respond to changes in the system. A higher frequency results in faster convergence but may introduce more oscillations.

unsigned int min_cluster_size

Minimal number of events hitting a cluster before it gets outputted.

Maximum time difference in us for two events to be linked in time.

bool match_polarity

Decide if we have multi-polarity cluster or mono polarity ones.

bool use_simple_match

If false, will use a (costlier) constant velocity match strategy.

bool full_square

If true, check connectivity on the full 3x3 square around the events, otherwise just the 3x3 cross around it

bool last_event_only

If true will only check the connectivity with the last event added to the cluster referenced at every pixel positions

unsigned int size_threshold

Threshold on the spatial size of a cluster (in pixels). Maximum distance allowed from the estimated center of the cluster to the last event added to it

struct Metavision::TimeGradientFlowAlgorithmConfig

Structure representing the configuration of the time gradient flow algorithm.

Public Functions

inline TimeGradientFlowAlgorithmConfig(uint8_t radius = 3, float min_flow_mag = 0.f, uint8_t bit_cut = 0)

Initializing constructor.

Parameters
  • radius – Spatial radius for flow analysis

  • min_flow_mag – Minimum flow magnitude to be observed

  • bit_cut – Number of bits to remove to compare timestamps (used to accelerate processing)

Public Members

uint8_t local_radius

Matching spatial search radius. The event received will provide the center of the analyzed neighborhood. The pixels at the local_radius distance on the left, right, top and bottom will be used to compute optical flow, not the pixels in-between. The further the distance, the more the flow estimate is regularized but also the more subject to association error.

float min_norm

Minimal flow norm estimated to produce an opticalFlowEvent (the actual value used is 1.f/(min_norm*min_norm) to get a value in pix/s)

uint8_t bit_cut

Number of bits to remove to compare timestamps (used to accelerate processing)

struct Metavision::TripletMatchingFlowAlgorithmConfig

Structure representing the configuration of the triplet matching algorithm.

Public Functions

TripletMatchingFlowAlgorithmConfig() = default

Default constructor.

inline TripletMatchingFlowAlgorithmConfig(float radius, timestamp dt_min, timestamp dt_max)

Initializing constructor.

Parameters
  • radius – Spatial radius to search for event matches

  • dt_min – Minimum time difference for event matches

  • dt_max – Maximum time difference for event matches

inline TripletMatchingFlowAlgorithmConfig(float radius, float min_flow_mag, float max_flow_mag)

Initializing constructor.

Parameters
  • radius – Spatial radius to search for event matches

  • min_flow_mag – Minimum flow magnitude to be observed, will be converted to a constraint on matches time difference

  • max_flow_mag – Maximum flow magnitude to be observed, will be converted to a constraint on matches time difference

Public Members

float radius

Matching spatial search radius. Higher values robustify and regularize estimated visual flow, but increase search area and number of potential matches, hence reduce efficiency. Note that this radius relates to the spatial search for event matching, but that the flow is actually estimated from 2 matches, so potentially twice this area.

timestamp dt_max

Matching temporal upper bound. Higher values lower minimum observable visual flow, but increase search area and number of potential matches, hence reduce efficiency.

timestamp dt_min

Matching temporal lower bound. Higher values reduce influence of noise when searching for matches in the past, by better filtering lateral observations of the same edge, but reduce the maximum observable visual flow.