5.3.4.1. Function _CCL_LSL_apply

5.3.4.1.1. Function Documentation

uint32_t _CCL_LSL_apply(uint32_t **CCL_data_er, uint32_t **CCL_data_era, uint32_t **CCL_data_rlc, uint32_t *CCL_data_eq, uint32_t *CCL_data_ner, const uint8_t **img, uint32_t **labels, const int i0, const int i1, const int j0, const int j1)

Compute the Light Speed Labeling (LSL) algorithm.

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

  • CCL_data_era – Relative <-> absolute labels equivalences (2D array \([i1 - i0 + 1][j1 - j0 + 1]\)).

  • CCL_data_rlc – Run-length coding (2D array \([i1 - i0 + 1][j1 - j0 + 1]\)).

  • CCL_data_eq – Table of equivalence (1D array \([(i1 - i0 + 1) * (j1 - j0 + 1)]\)).

  • CCL_data_ner – Number of relative labels (1D array \([i1 - i0 + 1]\)).

  • img – Input binary image (2D array \([i1 - i0 + 1][j1 - j0 + 1]\), \(\{0,1\}\) has to be coded as \(\{0,255\}\)).

  • labels – Output labels (2D array \([i1 - i0 + 1][j1 - j0 + 1]\). The labels are in \([1;2^{32} -1]\) and 0 value means no label).

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

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

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

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

Returns

Number of labels.