(data, json_path)
| 24 | return data |
| 25 | |
| 26 | def dump_json(data, json_path): |
| 27 | with open(json_path, 'w') as f: |
| 28 | json.dump(data, f, indent=2) |
| 29 | print("Dumped to: {}".format(json_path)) |
| 30 | |
| 31 | def img_path_list_to_video(img_path_list, out_path='test.mp4', fps=10): |
| 32 | writer = imageio.get_writer(out_path, fps=fps) |