Skip to main content

voronoi_otsu_label

Function voronoi_otsu_label 

Source
pub fn voronoi_otsu_label(
    src: GrayView<'_>,
    out_labels: &mut [u16],
) -> Result<usize, CvError>
Expand description

Voronoi–Otsu label map: split touching bright objects.

  • Threshold via Otsu on src.
  • Distance transform on foreground (pixels > thresh).
  • Peaks of distance become markers; watershed on inverted distance.
  • out_labels receives object ids (0 = background).