人脸识别课程设计及代码示例
-- coding: utf-8 --
from future import unicode_literals
import os
import numpy as np
import cv2 as cv
import sklearn.preprocessing as sp
fd = cv.CascadeClassifier('../data/haar/face.xml')
def search_faces(directory):
directory = os.path.normpath(directory)
if not os.path.isdir(directory):
raise IOError("The directory '" + directory + "' doesn't exist!")
faces = {}
for curdir, subdirs, files in os.walk(directory):
# 在此处添加代码示例
用户评论