cv.connectedComponents - MATLAB File Help
cv.connectedComponents

Computes the connected components labeled image of boolean image

[labels,N] = cv.connectedComponents(image)
[labels,N,stats,centroids] = cv.connectedComponents(image)
[...] = cv.connectedComponents(..., 'OptionName', optionValue, ...)

Input

Output

Options

The last two optional output arguments are only computed if requested.

This function uses parallel version of both Grana and Wu's algorithms (statistics included) if at least one allowed parallel framework is enabled and if the rows of the image are at least twice the number returned by cv.Utils.getNumberOfCPUs.

References

[Wu]:

"Two Strategies to Speed up Connected Components Algorithms", Kesheng Wu, et al (the SAUF (Scan array union find) variant using decision trees)

[Grana]:

"Optimized Block-based Connected Components Labeling with Decision Trees", Costantino Grana et al

See also