I’ve tried to follow this OpenCV facial mocap tutorial: https://www.youtube.com/watch?v=O7nNO3FLkLU
Anybody who has managed to get it working on Win 10 64-bit, please help!
I have installed opencv and dlib into the Blender 2.82 local Python directory.
Everything seems to be working fine but I get this error:
line 83, in modal cv2.error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
No matter what I do with that Python script on my Win 10 PC, I cannot get the camera window to popup and show the video feed.
I have tested the camera and Opencv from within Blender 2.82, and they work fine, I have used this peace of code and it pops up a window and shows my video feed, no problems:
import cv2 cv2.namedWindow("preview") vc = cv2.VideoCapture(0) if vc.isOpened(): # try to get the first frame rval, frame = vc.read() else: rval = False while rval: cv2.imshow("preview", frame) rval, frame = vc.read() key = cv2.waitKey(20) if key == 27: # exit on ESC break
Any help will be greatly appreciated - I am pulling my hair for the second day now!
I have contacted the author, but didn’t get any replies so far.