Skip to content

Commit 87ee36d

Browse files
committed
Fix the color space of the output video in 'detectvideo.py'
1 parent e494e8a commit 87ee36d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

detectvideo.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,15 @@ def main(_argv):
109109
info = "time: %.2f ms" %(1000*exec_time)
110110
print(info)
111111

112+
result = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
112113
if not FLAGS.dis_cv2_window:
113114
cv2.namedWindow("result", cv2.WINDOW_AUTOSIZE)
114-
result = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
115115
cv2.imshow("result", result)
116116
if cv2.waitKey(1) & 0xFF == ord('q'): break
117117

118118
if FLAGS.output:
119-
result = cv2.cvtColor(result, cv2.COLOR_RGB2BGR)
120119
out.write(result)
121-
120+
122121
frame_id += 1
123122

124123
if __name__ == '__main__':

0 commit comments

Comments
 (0)