Browse Source

some comments

LeoDu 4 years ago
parent
commit
8a4e3a8422
1 changed files with 2 additions and 0 deletions
  1. 2 0
      backend_refactor/service/video_analyzer.py

+ 2 - 0
backend_refactor/service/video_analyzer.py

@@ -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)))