lsh
1
大学生编成新人随便说
import cv2 as cv
from time import sleep
img = cv.imread('./imgs/1.png')
def face_detect_demo():
gery = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
face_detect = cv.CascadeClassifier
face = face_detect.detectMultiScale(gery)
for x,y,m,h in face:
cv.rectangle(img, (x, y), color=(0, 0, 255), thickness=3)
cv.imshow('result.png', img)
face_detect_demo()
cv.waitKey(0)
cv.destroyAllWindows()
this is an english-speaking forum.
do you need a forum in your native language?
lsh
3
That must be necessary!
那肯定需要啊!
Thank you!
谢谢你!
berak
4
btw, you need to load a pretrained xml cascade file to make it work
lsh
5
谢谢你说明,我清楚我一定缺了点东西
主要是我ubuntu没有下载opencv
只下载了个阉割版opencv-python
在poencv-python中没有你说的训练的 xml 级联文件
(如果说的不对,请随便指正)
berak
6