# -*- coding: utf-8 -*-
import cv2
import os
import numpy
import cutHumanFace
def saveCutFace(filePath, pathSave = 'cutFace', normalizeWidth = 300, normalizeHeight = 300):
"""
:param filePath: string, 文件夹路径
"""
if not os.path.exists(savePath):
os.makedirs(savePath); #保存的文件夹
files = os.listdir(filePath); #列出目录下的所有文件
normalizeWidth = 100 #以100×100为大小
normalizeHeight = 100
for file in files:
normalizeFace = cv2.resize(cutFace, (normalizeWidth,normalizeHeight), interpolation=cv2.INTER_AREA);
cv2.imwrite(savePath, normalizeFace);