The watershed algorithm of image segmentation is used when we have initial segmented points and want to automatically fill surrounding areas with the same segmentation class. These initial segmented points are called seeds, and they should be set manually, but in some cases, it's possible to automatically assign them. This recipe shows how to implement the watershed segmentation algorithm in OpenCV.
Image segmentation using segment seeds - the watershed algorithm
Getting ready
Install the OpenCV 3.x Python API package and the matplotlib package.
How to do it...
- Import...