- 博客(3)
- 收藏
- 关注
原创 shutil 图像的批量重命名
import os import shutil source_image_path = ' \\' dest_image_path = ' \\' image_num = 1 for image in os.listdir(source_image_path): sin_image_path = source_image_path+image new_image_name = '2020_'+str(image_num) new_image_path = dest_image_pa.
2020-09-03 09:47:40
235
原创 python opencv 视频与图片的相互转换
1.python opencv 视频转图片 import cv2 vc=cv2.VideoCapture("video_path") c=1 if vc.isOpened(): rval,frame=vc.read() else: rval=False while rval: rval,frame=vc.read() cv2.imwrite('save_image_path/'+str(c)+'.jpg',frame) c=c+1 cv2.waitKey(...
2020-09-02 10:08:50
302
原创 python opencv 批量修改图像尺寸
import cv2 import os image_size_h = 640 # 设定宽 image_size_w = 850 # 设定长 source_path = "G:\\ca\\car_face\\" # 源文件路径 target_path = "G:\ca\\resize_car_face\\" # 输出目标文件路径 if not os.path.exists(target_path): os.makedirs(target_path) image_list = os.l.
2020-08-21 10:19:36
1086
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅