摘要: OpenCV(3.4.1) Error: Unspecified error (could not find a writer for the specified extension) in imwrite_, file /home/caros/Downloads/opencv-3.4.1/modu 阅读全文
posted @ 2021-10-26 13:26 Tomorrow1126 阅读(934) 评论(0) 推荐(0) 编辑
摘要: python从路径中获取文件名的三种方式 方法一:split s=r"C:\Users\Desktop\lesson\python\calss1.py" s.split("\\")[-1] #输出为 class1.py 方法二:rfinds=r"C:\Users\Desktop\lesson\pyt 阅读全文
posted @ 2021-10-26 13:23 Tomorrow1126 阅读(8520) 评论(0) 推荐(0) 编辑
摘要: 1 import os 2 3 for filename in os.listdir(r"./file"): #listdir的参数是文件夹的路径 4 print ( filename) #此时的filename是文件夹中文件的名称 5 filename就是循环读取到的图片的名称 阅读全文
posted @ 2021-10-26 13:20 Tomorrow1126 阅读(2664) 评论(0) 推荐(0) 编辑