importnumpyasnpimportsysdefconv_(img,conv_filter):filter_size=conv_filter.shape[1]result=np.zeros((img.shape))#循环遍历图像以使用卷积运算forrinnp.uint16(np.arange(filter_size/2.0,img.shape[0]-filter_size/2.0+1)):forcinnp.uint16(np.arange(filter_size/2.0,img.shape[1]-filter_s
1