5.3.4.10. Function _kNN_match

5.3.4.10.1. Function Documentation

void _kNN_match(float **data_distances, uint32_t **data_nearest, uint32_t *data_conflicts, const uint32_t *RoIs0_id, const uint32_t *RoIs0_S, const float *RoIs0_x, const float *RoIs0_y, uint32_t *RoIs0_next_id, const size_t n_RoIs0, const uint32_t *RoIs1_id, const uint32_t *RoIs1_S, const float *RoIs1_x, const float *RoIs1_y, uint32_t *RoIs1_prev_id, const size_t n_RoIs1, const int k, const uint32_t max_dist, const float min_ratio_S)

Compute associations between RoIs at \(t - 1\) and RoIs at \(t\).

Parameters
  • data_distances – 2D array of euclidean distances.

  • data_nearest – 2D array of ranks.

  • data_conflicts – 1D array of conflicts. The conflicts are filled only if the FMDT_ENABLE_DEBUG macro is defined.

  • RoIs0_id – Array of RoI unique identifiers (at \(t -1\)).

  • RoIs0_S – Array of RoI surfaces (at \(t -1\)).

  • RoIs0_x – Array of centroids abscissa (at \(t -1\)).

  • RoIs0_y – Array of centroids ordinate (at \(t -1\)).

  • RoIs0_next_id – Array of RoI identifiers at \(t -1 + 1 = t\).

  • n_RoIs0 – Number of connected-components (= number of RoIs) (at \(t -1\)).

  • RoIs1_id – Array of RoI unique identifiers (at \(t\)).

  • RoIs1_S – Array of RoI surfaces (at \(t\)).

  • RoIs1_x – Array of centroids abscissa (at \(t\)).

  • RoIs1_y – Array of centroids ordinate (at \(t\)).

  • RoIs1_prev_id – Array of RoI identifiers at \(t - 1\).

  • n_RoIs1 – Number of connected-components (= number of RoIs) (at \(t\)).

  • k – Number of ranks considered for RoI associations.

  • max_dist – Maximum distance between 2 RoIs to make the association.

  • min_ratio_S – Minimum ratio between two RoIs. \( r_S = RoI_{S}^j / RoI_{S}^i\), if \(r_S < r_S^{min}\) then the association is not made.