Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FRAME_WIDTH = 1280
- FRAME_HEIGHT = 720
- def writeVideo(dir_path, fps, out_video_name):
- fourcc = cv2.VideoWriter_fourcc(*'MJPG')
- videoWriter = cv2.VideoWriter(out_video_name, fourcc, fps, (FRAME_WIDTH, FRAME_HEIGHT))
- img_list = os.listdir(dir_path)
- for img in img_list:
- print('cur img:' + img)
- img12 = cv2.imread(os.path.join(dir_path, img))
- videoWriter.write(img12)
- videoWriter.release()
Add Comment
Please, Sign In to add comment