- 博客(6)
- 收藏
- 关注
原创 人脸识别要先训练数要自己训练据在里面了库要自己下pycharm
‘’’ import os import cv2 from PIL import Image import numpy as np def getImageAndLabel(path): # 储存人脸数据 facesSamples = [] # 储存姓名数据 ids = [] # 储存图片信息(通过路径将 图片全部存储到变量imagePaths中) imagePaths = [os.path.join(path, f) for f in os.listdir(path)] # 加载分类器 face_dete
2022-04-21 20:27:35 193
原创 python打开摄像头
import cv2 mn=cv2.VideoCapture (0) mn.set(3,640) mn.set(4,480) mn.set(10,100) while True: success, img = mn.read() cv2.imshow(“video”, img) if cv2.waitKey(1) & 0xff == ord(‘q’): break
2022-04-21 20:14:09 3070
原创 python视频播放视频要自己导
import cv2 kg = cv2.VideoCapture(“9999.mp4”)视频的名字 while True: success, img = kg.read() cv2.imshow(“9999”, img) if cv2.waitKey(10) & 0xff == ord(‘q’): break
2022-04-21 19:33:54 3172
原创 人脸保存python库要自己下
import os import cv2 from PIL import Image import numpy as np def getImageAndLabel(path): facesSamples = [] ids = [] imagePaths = [os.path.join(path, f) for f in os.listdir(path)] face_detector = cv2.CascadeClassifier( ‘C:/Users/ASUS-PC/PycharmProjects/pyt
2022-04-20 20:09:31 298
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人