From 3354d19b5c7e97ceb84eb82fb827dc0b4263a2bd Mon Sep 17 00:00:00 2001
From: Nataniel Ruiz <nruiz9@gatech.edu>
Date: 星期五, 15 六月 2018 03:26:21 +0800
Subject: [PATCH] Update README.md
---
code/test_on_video.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/code/test_on_video.py b/code/test_on_video.py
index c2e97db..7c51348 100644
--- a/code/test_on_video.py
+++ b/code/test_on_video.py
@@ -126,6 +126,7 @@
ret,frame = video.read()
if ret == False:
break
+ cv2_frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)
while True:
x_min, y_min, x_max, y_max = int(float(line[1])), int(float(line[2])), int(float(line[3])), int(float(line[4]))
@@ -145,7 +146,7 @@
x_max = min(frame.shape[1], x_max)
y_max = min(frame.shape[0], y_max)
# Crop face loosely
- img = frame[y_min:y_max,x_min:x_max]
+ img = cv2_frame[y_min:y_max,x_min:x_max]
img = Image.fromarray(img)
# Transform
--
Gitblit v1.8.0