对python cv2批量灰度图片并保存的实例讲解 如下所示:importcv2#循环灰度图片并保存defgrayImg():forxinrange(1,38):#读取图片img=cv2.imread("C:\\User 灰度图片