|
@@ -0,0 +1,64 @@
|
|
|
+package cn.com.qmth.examcloud.starters.face.verify.model.param;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 人脸相关接口的常用参数
|
|
|
+ */
|
|
|
+public class FaceApiParam implements Serializable {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 3440291316492301402L;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 人脸API类型
|
|
|
+ */
|
|
|
+ private FaceApiType apiType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 人脸图片集合
|
|
|
+ */
|
|
|
+ private ImageParm[] images;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自定义人脸相似度期望通过的阈值
|
|
|
+ */
|
|
|
+ private Double expectFaceCompareScore;
|
|
|
+
|
|
|
+ public FaceApiParam(FaceApiType apiType) {
|
|
|
+ if (apiType == null) {
|
|
|
+ throw new IllegalArgumentException("人脸API类型不能为空!");
|
|
|
+ }
|
|
|
+ this.apiType = apiType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public FaceApiParam apiType(FaceApiType apiType) {
|
|
|
+ if (apiType == null) {
|
|
|
+ throw new IllegalArgumentException("人脸API类型不能为空!");
|
|
|
+ }
|
|
|
+ this.apiType = apiType;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public FaceApiParam images(ImageParm... images) {
|
|
|
+ this.images = images;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public FaceApiParam expectFaceCompareScore(Double expectFaceCompareScore) {
|
|
|
+ this.expectFaceCompareScore = expectFaceCompareScore;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public FaceApiType getApiType() {
|
|
|
+ return apiType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public ImageParm[] getImages() {
|
|
|
+ return images;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Double getExpectFaceCompareScore() {
|
|
|
+ return expectFaceCompareScore;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|