Function connectedComponents

Connected components of a binary mask; returns component labels and count.

ulong connectedComponents(
  scope const(ubyte)[] mask,
  ulong w,
  ulong h,
  ref uint[] labels
) @safe;