FaceResult.java
2 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package com.huaheng.wms.facedete;
import android.graphics.PointF;
/**
* 作者:created by meixi
* 邮箱:13164716840@163.com
* 日期:2018/8/29 15
*/
public class FaceResult extends Object {
private PointF midEye;
private float eyeDist;
private float confidence;
private float pose;
private int id;
private long time;
public FaceResult() {
id = 0;
midEye = new PointF(0.0f, 0.0f);
eyeDist = 0.0f;
confidence = 0.4f;
pose = 0.0f;
time = System.currentTimeMillis();
}
public void setFace(int id, PointF midEye, float eyeDist, float confidence, float pose, long time) {
set(id, midEye, eyeDist, confidence, pose, time);
}
public void clear() {
set(0, new PointF(0.0f, 0.0f), 0.0f, 0.4f, 0.0f, System.currentTimeMillis());
}
public synchronized void set(int id, PointF midEye, float eyeDist, float confidence, float pose, long time) {
this.id = id;
this.midEye.set(midEye);
this.eyeDist = eyeDist;
this.confidence = confidence;
this.pose = pose;
this.time = time;
}
public float eyesDistance() {
return eyeDist;
}
public void setEyeDist(float eyeDist) {
this.eyeDist = eyeDist;
}
public void getMidPoint(PointF pt) {
pt.set(midEye);
}
public PointF getMidEye() {
return midEye;
}
public void setMidEye(PointF midEye) {
this.midEye = midEye;
}
public float getConfidence() {
return confidence;
}
public void setConfidence(float confidence) {
this.confidence = confidence;
}
public float getPose() {
return pose;
}
public void setPose(float pose) {
this.pose = pose;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
}