oskarastrom commited on
Commit
26b6ea3
·
1 Parent(s): 0df5c51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -6,6 +6,7 @@ from file_reader import File
6
  import numpy as np
7
  from aws_handler import upload_file
8
  from aris import create_metadata_table
 
9
 
10
  table_headers = ["TOTAL" , "FRAME_NUM", "DIR", "R", "THETA", "L", "TIME", "DATE", "SPECIES"]
11
  info_headers = [
@@ -47,6 +48,15 @@ state = {
47
  }
48
  result = {}
49
 
 
 
 
 
 
 
 
 
 
50
  # Start function, called on file upload
51
  def on_input(file_list):
52
 
 
6
  import numpy as np
7
  from aws_handler import upload_file
8
  from aris import create_metadata_table
9
+ import cv2
10
 
11
  table_headers = ["TOTAL" , "FRAME_NUM", "DIR", "R", "THETA", "L", "TIME", "DATE", "SPECIES"]
12
  info_headers = [
 
48
  }
49
  result = {}
50
 
51
+
52
+ vid_frames = np.random.rand(100, 100, 3)
53
+ out = cv2.VideoWriter("static/test_video.mp4", cv2.VideoWriter_fourcc(*'avc1'), 10, [ 100, 100 ] )
54
+ for j, frame in enumerate(vid_frames):
55
+ out.write(frame)
56
+ out.release()
57
+
58
+
59
+
60
  # Start function, called on file upload
61
  def on_input(file_list):
62