|
|
@@ -45,7 +45,9 @@ def gather_video(video_uuid):
|
|
|
fps = cap.get(5)
|
|
|
cap.release()
|
|
|
|
|
|
+ # List all frames and sort them in numeric order
|
|
|
frames = list(sorted([name for name in os.listdir(frames_dir) if name.endswith(".result.jpg")], key=lambda x:int(x.replace(".result.jpg", ""))))
|
|
|
+ # Read frames from file
|
|
|
img_array = [cv2.imread(frames_dir + i) for i in frames]
|
|
|
logging.debug("Frames total: %d" % (len(img_array)))
|
|
|
|