swtloc.utils.get_connected_components_with_stats

swtloc.utils.get_connected_components_with_stats(img: numpy.ndarray)[source]

Function to find the connected components alongside their stats using oepncv’s connectedComponentWithStats function for any given image.

Parameters

img (np.ndarray) – Input Image

Returns

Results of opencv connectedComponentsWithStats

Return type

(Tuple[int, np.ndarray, np.ndarray, np.ndarray])