소스 검색

fix color of best image

Blake Blackshear 5 년 전
부모
커밋
08174d8db2
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      detect_objects.py

+ 1 - 0
detect_objects.py

@@ -127,6 +127,7 @@ def main():
             best_frame = cameras[camera_name].get_best(label)
             if best_frame is None:
                 best_frame = np.zeros((720,1280,3), np.uint8)
+            best_frame = cv2.cvtColor(best_frame, cv2.COLOR_RGB2BGR)
             ret, jpg = cv2.imencode('.jpg', best_frame)
             response = make_response(jpg.tobytes())
             response.headers['Content-Type'] = 'image/jpg'