-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfinal.py
More file actions
executable file
·31 lines (20 loc) · 856 Bytes
/
Copy pathfinal.py
File metadata and controls
executable file
·31 lines (20 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
from scripts.Image import Image
import numpy as np
import os
video_container = "data/images"
video_list = os.listdir("%s" % video_container)
for video in video_list:
image_container = "%s/%s" % (video_container, video)
image_list = os.listdir("%s" % image_container)
interpolation_filename = "data/PIPELINE/dataimages%s" % video
interpolation = np.loadtxt(interpolation_filename, delimiter = ",")[::-1]
for i in xrange(0, len(image_list)):
static_image_filename = "%s/%s" % (image_container, image_list[i])
static_image = Image().load(static_image_filename)
try:
os.mkdir("data/PIPELINE/%s" % video)
except:
pass
final_image_filename = "data/PIPELINE/%s/%s" % (video, image_list[i])
static_image.saveFigWithTrajectory(final_image_filename, interpolation[0:i])