- 博客(3)
- 收藏
- 关注
原创 shutil 图像的批量重命名
import osimport shutilsource_image_path = ' \\'dest_image_path = ' \\'image_num = 1for 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
214
原创 python opencv 视频与图片的相互转换
1.python opencv 视频转图片import cv2vc=cv2.VideoCapture("video_path")c=1if vc.isOpened(): rval,frame=vc.read()else: rval=Falsewhile 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
276
原创 python opencv 批量修改图像尺寸
import cv2import osimage_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
1059
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人