public FaceDetectionService() { _age = new FaceAge(AppConfigurations.AppId, AppConfigurations.AgeKey); // 年龄识别 _gender = new FaceGender(AppConfigurations.AppId, AppConfigurations.GenderKey); // 性别识别 //// 图片检测人脸 _detection = LocatorFactory.GetDetectionLocator(AppConfigurations.AppId, AppConfigurations.FdKey, _age, _gender) as FaceDetection; _traking = LocatorFactory.GetTrackingLocator(AppConfigurations.AppId, AppConfigurations.FtKey, _age, _gender) as FaceTracking; _recognize = new FaceRecognize(AppConfigurations.AppId, AppConfigurations.FrKey); _processor = new FaceProcessor(_detection, _recognize); _personFaceRepository = new PersonFaceRepository(); }
int i = 0; // 图片处理计数器 public FrmFacePhoto() { InitializeComponent(); _personFaceRepository = new PersonFaceRepository(); _faceDetectionService = new FaceDetectionService(); }
private void Init() { _faceDetectionService = new FaceDetectionService(); _personFaceRepository = new PersonFaceRepository(); _cache = _personFaceRepository.GetAllPersonFaces(); }