5.3.4.41. Function features_filter_surface

5.3.4.41.1. Function Documentation

uint32_t features_filter_surface(const uint32_t **in_labels, uint32_t **out_labels, const int i0, const int i1, const int j0, const int j1, RoI_basic_t *RoIs_basic, const size_t n_RoIs, const uint32_t S_min, const uint32_t S_max)

This function performs a surface thresholding as follow: if \( S_{min} > S \) or \( S > S_{max}\), then the corresponding RoIs_id is set to 0.

See also

RoI_basic_t for more explanations about the features.

Parameters
  • in_labels – Input 2D array of labels ( \([i1 - i0 + 1][j1 - j0 + 1]\)).

  • out_labels – Output 2D array of labels ( \([i1 - i0 + 1][j1 - j0 + 1]\)). out_labels can be NULL, this way only the features will be updated. out_labels can also be the same pointer as in_labels, this way the output labels will be computed in place.

  • i0 – First \(y\) index in the labels (included).

  • i1 – Last \(y\) index in the labels (included).

  • j0 – First \(x\) index in the labels (included).

  • j1 – Last \(x\) index in the labels (included).

  • RoIs_basic – Features.

  • n_RoIs – Number of connected-components (= number of RoIs) in the 2D array of in_labels.

  • S_min – Minimum morphological threshold.

  • S_max – Maximum morphological threshold.

Returns

Number of labels after filtering.