marcotam commited on
Commit
a010e64
·
1 Parent(s): 8b7e8ae

Upload webapp.py

Browse files
Files changed (1) hide show
  1. webapp.py +4 -4
webapp.py CHANGED
@@ -137,6 +137,10 @@ def main():
137
  # Grab a single frame of video
138
  ret, frame = camera.read()
139
 
 
 
 
 
140
  if ret is not None:
141
  ret, buffer = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY),30])
142
 
@@ -144,10 +148,6 @@ def main():
144
 
145
  s.sendto((x_as_bytes),(server_ip, server_port))
146
 
147
- frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
148
-
149
- FRAME_WINDOW.image(frame)
150
-
151
  # camera.release()
152
  # if ret:
153
  # # ret, buffer = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY)])
 
137
  # Grab a single frame of video
138
  ret, frame = camera.read()
139
 
140
+ frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
141
+
142
+ FRAME_WINDOW.image(frame)
143
+
144
  if ret is not None:
145
  ret, buffer = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY),30])
146
 
 
148
 
149
  s.sendto((x_as_bytes),(server_ip, server_port))
150
 
 
 
 
 
151
  # camera.release()
152
  # if ret:
153
  # # ret, buffer = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY)])