📜  cv2 断言失败 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:13.491000             🧑  作者: Mango

代码示例1
import cv
cv2.CascadeClassifier('haarcascade_frontalface_default.xml') # try downloading the xml file again and make sure to put it in the same directory
cap = cv2.Videocapture(0) # change this value to 1 or -1 or 0 based on your os
cv2.imread('image')# check the spelling and make sure that the image is in the same directory