Replies: 1 comment
-
Does your camera open whenever you are running this program? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
from keras.models import load_model
import cv2
from keras.preprocessing import image
from keras_preprocessing.image import img_to_array
from time import sleep
face_classifier = cv2.CascadeClassifier(r'haarcascade_frontalface_default.xml')
classifier =load_model(r'best_model.h5')
emotion_labels = ['Angry','Disgust','Fear','Happy','Neutral', 'Sad', 'Surprise']
cap = cv2.VideoCapture(0)
while True:
frame = cap.read()
labels = []
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
OpenCV(4.6.0) 👎 error: (-5:Bad argument) in function 'cvtColor'
Overload resolution failed:
src is not a numerical tuple
Expected Ptrcv::UMat for argument 'src'
*Getting above error while run that part of program
note: this is not a complete program.
Beta Was this translation helpful? Give feedback.
All reactions