我正在使用以下代碼一次性調整多個圖像的大小,但cv2.imwrite("resized_"+image, re)會引發語法錯誤。期待您的回答import cv2,globimages=glob.glob("*.jpg")for image in images: img=cv2.imread(image,1) re=cv2.resize(img,(int(img.shape[1]/4),int(img.shape[0]/4)) cv2.imwrite("resized_"+image, re)
cv2.imwrite("resized_"+image, re) 拋出語法錯誤
慕蓋茨4494581
2022-10-11 10:56:08