def fill_color_demo(image):
copyImg = image.copy()
h, w = image.shape[:2]
mask = np.zeros([h+2, w+2], np.uint8)
# 参数:原图,mask图,起始点,起始点值减去该值作为最低值,起始点值加上该值作为最高值,彩色图模式
cv.floodFill(copyImg, mask, (30, 30),
cv.FLOODFILL_FIXED_RANGE和cv.FLOODFILL_MASK_ONLY
最新推荐文章于 2022-10-08 13:56:57 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)