This commit is contained in:
yumoqing 2020-10-19 14:46:46 +08:00
parent 31a66b986f
commit 8b5a9de5b7

View File

@ -8,7 +8,8 @@ import cv2
facefilepath=os.path.dirname(cv2.__file__)
facepattern = '%s/%s' % (facefilepath, \
'data/haarcascade/haarcascade_frontalface_default.xml')
'data/haarcascade_frontalface_default.xml')
def set_res(cap, x,y):
cap.set(cv2.CAP_PROP_FRAME_WIDTH, int(x))
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, int(y))