import cv2 import numpy as np import matplotlib.pyplot as plt mask=cv2.imread("C:/Users/lenovo/Desktop/result/01_gtx.tif",0)#读取标签图像 plt.imshow(mask, cmap='gray') plt.show() mask_fuzzy=cv2.GaussianBlur(mask,(35,35),0) #高斯模糊 矩阵大小必须是奇数 plt.imshow(mask_fuzzy, cmap='gray') plt.show()