import cv2
import numpy as np
'''
getStructuringElement(): 返回指定形状和尺寸的结构元素
getStructuringElement(int shape, //核的形状 0:矩形 MORPH_RECT 1:十字交叉形 MORPH_CROSS 2: 椭圆 MORPH_ELLIPSE;
Size ksize,//核大小
Point anchor=Point(-1,-1) //核中心位置,默认位于形状中心处
);
'''
'''
腐蚀
cv2.erode(src, # 输入图像
kernel, # 卷积核
dst=None,
anchor=None,
iterations=None, # 迭代次数,默认1
borderType=None,
borderValue=None)
'''
def erode_image(img_path):
origin_img = cv2.imread(img_path) # 读取图片
gray_img = cv2.cvtColor