FaceEngineService.java 912 Bytes
package com.arcsoft.facedemo.service;

import com.arcsoft.facedemo.base.ImageInfo;
import com.arcsoft.facedemo.dto.FaceUserInfo;
import com.arcsoft.facedemo.dto.ProcessInfo;
import com.arcsoft.face.FaceInfo;

import java.util.List;
import java.util.concurrent.ExecutionException;


public interface FaceEngineService {

    void addFaceToCache(Integer groupId, FaceUserInfo userFaceInfo) throws ExecutionException;


    List<FaceInfo> detectFaces(ImageInfo imageInfo);

    List<ProcessInfo> process(ImageInfo imageInfo);

    /**
     * 人脸特征
     * @param imageInfo
     * @return
     */
    byte[] extractFaceFeature(ImageInfo imageInfo) throws InterruptedException;

    /**
     * 人脸比对
     * @param groupId
     * @param faceFeature
     * @return
     */
    List<FaceUserInfo> compareFaceFeature(byte[] faceFeature, Integer groupId) throws InterruptedException, ExecutionException;



}