Omnibus commited on
Commit
e67c7b7
·
1 Parent(s): feba5d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -50,13 +50,14 @@ def capture_function(vid=None,frame_count=None):
50
  capture.set(cv2.CAP_PROP_POS_FRAMES, i)
51
  ret, frame_f = capture.read(i)
52
  frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
53
- im_file = cv2.imwrite(f'{uid}-{i}.png')
54
  fbox.append(f'{uid}-{i}.png')
55
 
56
  capture.set(cv2.CAP_PROP_POS_FRAMES, int(frame_count)-1)
57
  ret, frame_f = capture.read()
58
  frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
59
- fbox.append(frame_ff)
 
60
  capture.release()
61
  return fbox,fbox
62
 
 
50
  capture.set(cv2.CAP_PROP_POS_FRAMES, i)
51
  ret, frame_f = capture.read(i)
52
  frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
53
+ cv2.imwrite(f'{uid}-{i}.png',frame_ff)
54
  fbox.append(f'{uid}-{i}.png')
55
 
56
  capture.set(cv2.CAP_PROP_POS_FRAMES, int(frame_count)-1)
57
  ret, frame_f = capture.read()
58
  frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
59
+ cv2.imwrite(f'{uid}-{int(frame_count)-1}.png',frame_ff)
60
+ fbox.append(f'{uid}-{int(frame_count)-1}.png')
61
  capture.release()
62
  return fbox,fbox
63