Skip to content

Commit

Permalink
Fix the color space of the output video in 'detectvideo.py'
Browse files Browse the repository at this point in the history
  • Loading branch information
wooruang committed Aug 5, 2020
1 parent e494e8a commit 87ee36d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions detectvideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,15 @@ def main(_argv):
info = "time: %.2f ms" %(1000*exec_time)
print(info)

result = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
if not FLAGS.dis_cv2_window:
cv2.namedWindow("result", cv2.WINDOW_AUTOSIZE)
result = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
cv2.imshow("result", result)
if cv2.waitKey(1) & 0xFF == ord('q'): break

if FLAGS.output:
result = cv2.cvtColor(result, cv2.COLOR_RGB2BGR)
out.write(result)

frame_id += 1

if __name__ == '__main__':
Expand Down

0 comments on commit 87ee36d

Please sign in to comment.