From 3e0d6320a4acdb3c73e0efb31ee57fb1534237b2 Mon Sep 17 00:00:00 2001
From: chenshijun <csj_sky@126.com>
Date: 星期三, 05 六月 2019 10:41:06 +0800
Subject: [PATCH] real time video
---
code/test_on_video_dlib.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/code/test_on_video_dlib.py b/code/test_on_video_dlib.py
index eefced7..8ae74fa 100644
--- a/code/test_on_video_dlib.py
+++ b/code/test_on_video_dlib.py
@@ -106,15 +106,19 @@
print(frame_num)
ret,frame = video.read()
+
if ret == False:
break
-
+
+ frame = cv2.resize(frame, (960, 540), interpolation=cv2.INTER_LINEAR)
+ print(frame.shape)
cv2_frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)
# Dlib detect
dets = cnn_face_detector(cv2_frame, 1)
for idx, det in enumerate(dets):
+ print('**********************yes****************************yes********************************yes************************************')
# Get x_min, y_min, x_max, y_max, conf
x_min = det.rect.left()
y_min = det.rect.top()
--
Gitblit v1.8.0