shikeying
2024-01-30 1a56cbb4cc61382d67be150acb2c3a91a679a808
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.walker.openocr;
 
import com.walker.openocr.util.FaceItem;
 
/**
 * 人脸识别规范定义。
 * @author 时克英
 * @date 2024-01-30
 */
public interface FaceRecognize {
 
    /**
     * 人脸检测
     * <pre>
     *     图片类型
     * 1) BASE64:图片的base64值,base64编码后的图片数据,编码后的图片大小不超过2M;
     * 2) URL:图片的 URL地址( 可能由于网络等原因导致下载图片时间过长);
     * 3) FACE_TOKEN: 人脸图片的唯一标识,调用人脸检测接口时,会为每个人脸图片赋予一个唯一的FACE_TOKEN,同一张图片多次检测得到的FACE_TOKEN是同一个。
     * </pre>
     * @param image 图像内容,根据type定。
     * @param imageType 图像类型
     * @param option
     * @return
     */
    FaceDetectResult detect(String image, String imageType, Object option);
 
//    /**
//     * 两个人脸对比。
//     * @return
//     */
//    FaceMatchResult match();
 
    double matchTwoFace(FaceItem face1, FaceItem face2);
 
    double matchTwoImageFile(String file1, String file2);
 
    /**
     * 对比两张照片,判断是否同一人
     * @param photo_live_base64
     * @param imageBase64
     * @return
     */
    double matchTwoImageBase64(String photo_live_base64, String imageBase64);
 
    /**
     * 对比两张照片,判断是否同一人,增加了一个输入参数(活体级别)
     * @param photo_live_base64
     * @param imageBase64
     * @param livenessControl 活体检测选项:LOW/NORMAL/HIGH
     * @return
     */
    double matchTwoImageBase64(String photo_live_base64, String imageBase64, String livenessControl);
}