How to use OpenCV's connectedComponentsWithStats in Python?
<p>I am looking for an example of how to use OpenCV's <code>connectedComponentsWithStats()</code> function in Python. Note this is only available with OpenCV 3 or newer. The official documentation only shows the API for C++, even though the function exists when compiled for Python. I could not find it anywhere online.</p>