形状描边修复
This commit is contained in:
@ -1191,6 +1191,10 @@ class ImageFilterImplement:
|
||||
|
||||
# 创建描边图像
|
||||
stroke_img = np.zeros_like(img)
|
||||
|
||||
# 如果没有轮廓,直接返回原图
|
||||
if not expanded_contours[0].any():
|
||||
return image
|
||||
cv2.fillPoly(stroke_img, expanded_contours, ColorHandle.parse_color(stroke_color) + (255,))
|
||||
|
||||
# 轮廓图像转为PIL格式
|
||||
|
||||
Reference in New Issue
Block a user