Reprinted from: https://blog.csdn.net/u012554092/article/details/77844076
Algorithm steps:
1. Construct an image gradient image.
2. Generate n initial water injection regions (prior knowledge or local gradient minimum) through certain rules.
3. Add water to the water injection area. When the two water injection areas are about to merge, record the boundary at this time.
4. The algorithm ends when the edge of the image is completely divided into n independent regions.
Schematic diagram of the algorithm process:
Reference blog:
OpenCV learning (7) watershed algorithm
Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission. https://blog.csdn.net/u012554092/article/details/77844076