1.图片处理
注意没有缩进
import cv2 #读文件 imgpic=cv2.imread('F:/esint/smoking_Recognition/cigarette_voc/VOCdevkit/VOC2019/JPEGImages/000011.jpg',1) #输出文件 cv2.imshow("show",imgpic) cv2.waitKey(0) cv2.destroyAllWindows() #将文件写入本地 path_name='F:/esint/smoking_Recognition/test/starzhai' img_name = '%s/%s.jpg'%(path_name,'temp') cv2.imwrite(img_name,imgpic)