From 8c8b1494c377ed8d6c158c88a4b972b3a51d0df3 Mon Sep 17 00:00:00 2001 From: Max Spier <68516760+Mixmix00@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:29:37 -0700 Subject: [PATCH] Fix error converting image color --- examples/facerec_from_webcam_faster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/facerec_from_webcam_faster.py b/examples/facerec_from_webcam_faster.py index e4a7bbd47..4b3b26423 100644 --- a/examples/facerec_from_webcam_faster.py +++ b/examples/facerec_from_webcam_faster.py @@ -48,7 +48,7 @@ small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25) # Convert the image from BGR color (which OpenCV uses) to RGB color (which face_recognition uses) - rgb_small_frame = small_frame[:, :, ::-1] + rgb_small_frame = np.ascontiguousarray(small_frame[:, :, ::-1]) # Find all the faces and face encodings in the current frame of video face_locations = face_recognition.face_locations(rgb_small_frame)