Open mikechen66 opened 3 years ago
I tried the script again after installing dlib and related libraries. I can see my face with executing the the 1st section of the code. However, the script could not execute the rest of the lines of the code. So it is quite strange.
1. Only execute the lines of code
I can see the camera works correctly and show my face. But camera screen is keep shaking.
from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
....
face_cascade = cv2.CascadeClassifier('./cv2/data/haarcascade_frontalface_default.xml')
img_size = 299
# -cam = cv2.VideoCapture(0)
cam = cv2.VideoCapture(-1)
cv2.namedWindow("test")
2. Do not execute the rest of the line of the code.
The rest of the lines of code are not executed. It is quite strange.
while True:
ret,frame = cap.read(0)
frame = detect_face(frame)
frame = detect_eye(frame)
# gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
cv2.imshow('video face detect', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
Hello @mikechen66,
Can you please your order details as to from where have you purchased the book?
Thanks
I seems that the camera does not read images. The camera is a logitech new camera. It can show my image but could not capture images. So it quite strange.
AttributeError Traceback (most recent call last)