提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 260611 |
|
5 |
* @description 特征建模失败错误码 |
|
6 |
* @origin autoTool |
|
7 |
* @date 2023/06/28 14:07:32 |
|
8 |
*/ |
|
9 |
public enum EM_FEATURE_ERROR_CODE { |
|
10 |
/** |
|
11 |
* 成功 |
|
12 |
*/ |
|
13 |
EM_FEATURE_ERROR_SUCCESS(0,"成功"), |
|
14 |
/** |
|
15 |
* 未知 |
|
16 |
*/ |
|
17 |
EM_FEATURE_ERROR_UNKNOWN(1,"未知"), |
|
18 |
/** |
|
19 |
* 图片格式问题 |
|
20 |
*/ |
|
21 |
EM_FEATURE_ERROR_IMAGE_FORMAT_ERROR(2,"图片格式问题"), |
|
22 |
/** |
|
23 |
* 无目标或不够清晰 |
|
24 |
*/ |
|
25 |
EM_FEATURE_ERROR_NOFACE_OR_NOTCLEAR(3,"无目标或不够清晰"), |
|
26 |
/** |
|
27 |
* 多个目标 |
|
28 |
*/ |
|
29 |
EM_FEATURE_ERROR_MULT_FACES(4,"多个目标"), |
|
30 |
/** |
|
31 |
* 图片解码失败 |
|
32 |
*/ |
|
33 |
EM_FEATURE_ERROR_IMAGH_DECODE_FAILED(5,"图片解码失败"), |
|
34 |
/** |
|
35 |
* 不推荐入库 |
|
36 |
*/ |
|
37 |
EM_FEATURE_ERROR_NOT_SUGGEST_STORAGE(6,"不推荐入库"), |
|
38 |
/** |
|
39 |
* 数据库操作失败 |
|
40 |
*/ |
|
41 |
EM_FEATURE_ERROR_DATABASE_OPERATE_FAILED(7,"数据库操作失败"), |
|
42 |
/** |
|
43 |
* 获取图片失败 |
|
44 |
*/ |
|
45 |
EM_FEATURE_ERROR_GET_IMAGE_FAILED(8,"获取图片失败"), |
|
46 |
/** |
|
47 |
* 系统异常(如Licence失效、建模分析器未启动导致的失败) |
|
48 |
*/ |
|
49 |
EM_FEATURE_ERROR_SYSTEM_EXCEPTION(9,"系统异常(如Licence失效、建模分析器未启动导致的失败)"), |
|
50 |
/** |
|
51 |
* 目标宽度过小 |
|
52 |
*/ |
|
53 |
EM_FEATURE_ERROR_UNDERSIZED_WIDTH(10,"目标宽度过小"), |
|
54 |
/** |
|
55 |
* 目标眼瞳间距过小 |
|
56 |
*/ |
|
57 |
EM_FEATURE_ERROR_UNDERSIZED_INTERPUPILLARY_DISTANCE(11,"目标眼瞳间距过小"), |
|
58 |
/** |
|
59 |
* 目标脸对齐分数过低 |
|
60 |
*/ |
|
61 |
EM_FEATURE_ERROR_FACE_ALIGNMENT_SCORE_LOW(12,"目标脸对齐分数过低"), |
|
62 |
/** |
|
63 |
* 目标俯仰角过大 |
|
64 |
*/ |
|
65 |
EM_FEATURE_ERROR_OVERSIZED_FACE_PITCH_ANGLE(13,"目标俯仰角过大"), |
|
66 |
/** |
|
67 |
* 目标偏航角过大 |
|
68 |
*/ |
|
69 |
EM_FEATURE_ERROR_OVERSIZED_FACE_YAW_ANGLE(14,"目标偏航角过大"), |
|
70 |
/** |
|
71 |
* 目标滚转角过大 |
|
72 |
*/ |
|
73 |
EM_FEATURE_ERROR_OVERSIZED_FACE_ROLL_ANGLE(15,"目标滚转角过大"), |
|
74 |
/** |
|
75 |
* 目标质量分过低 |
|
76 |
*/ |
|
77 |
EM_FEATURE_ERROR_FACE_QUALITY_LOW(16,"目标质量分过低"), |
|
78 |
/** |
|
79 |
* 目标清晰度过低 |
|
80 |
*/ |
|
81 |
EM_FEATURE_ERROR_FACE_DEFINITION_LOW(17,"目标清晰度过低"), |
|
82 |
/** |
|
83 |
* 目标眼部遮挡 |
|
84 |
*/ |
|
85 |
EM_FEATURE_ERROR_EYE_OCCLUSION(18,"目标眼部遮挡"), |
|
86 |
/** |
|
87 |
* 目标额头遮挡 |
|
88 |
*/ |
|
89 |
EM_FEATURE_ERROR_FOREHEAD_OCCLUSION(19,"目标额头遮挡"), |
|
90 |
/** |
|
91 |
* 目标嘴巴遮挡 |
|
92 |
*/ |
|
93 |
EM_FEATURE_ERROR_MOUTH_OCCLUSION(20,"目标嘴巴遮挡"), |
|
94 |
/** |
|
95 |
* 目标不完整 |
|
96 |
*/ |
|
97 |
EM_FEATURE_ERROR_INCOMPLETE_FACE(21,"目标不完整"), |
|
98 |
/** |
|
99 |
* 目标光照过曝或者欠曝 |
|
100 |
*/ |
|
101 |
EM_FEATURE_ERROR_ABNORMAL_FACE_EXPOSURE(22,"目标光照过曝或者欠曝"), |
|
102 |
/** |
|
103 |
* 目标饱和度过低 |
|
104 |
*/ |
|
105 |
EM_FEATURE_ERROR_FACE_SATURATION_LOW(23,"目标饱和度过低"), |
|
106 |
/** |
|
107 |
* 目标区域在图像中占比过大 |
|
108 |
*/ |
|
109 |
EM_FEATURE_ERROR_FACE_AREA_OVER_PROPORTION(24,"目标区域在图像中占比过大"), |
|
110 |
/** |
|
111 |
* 图像中未检出目标 |
|
112 |
*/ |
|
113 |
EM_FEATURE_ERROR_FACE_DETECTION_FAILE(25,"图像中未检出目标"); |
|
114 |
|
|
115 |
private int value; |
|
116 |
|
|
117 |
private String note; |
|
118 |
|
|
119 |
public String getNote() { |
|
120 |
return note; |
|
121 |
} |
|
122 |
|
|
123 |
public int getValue() { |
|
124 |
return value; |
|
125 |
} |
|
126 |
|
|
127 |
EM_FEATURE_ERROR_CODE(int givenValue, String note) { |
|
128 |
this.value = givenValue; |
|
129 |
this.note = note; |
|
130 |
} |
|
131 |
|
|
132 |
public static String getNoteByValue(int givenValue) { |
|
133 |
for (EM_FEATURE_ERROR_CODE enumType : EM_FEATURE_ERROR_CODE.values()) { |
|
134 |
if (givenValue == enumType.getValue()) { |
|
135 |
return enumType.getNote(); |
|
136 |
} |
|
137 |
} |
|
138 |
return null; |
|
139 |
} |
|
140 |
|
|
141 |
public static int getValueByNote(String givenNote) { |
|
142 |
for (EM_FEATURE_ERROR_CODE enumType : EM_FEATURE_ERROR_CODE.values()) { |
|
143 |
if (givenNote.equals(enumType.getNote())) { |
|
144 |
return enumType.getValue(); |
|
145 |
} |
|
146 |
} |
|
147 |
return -1; |
|
148 |
} |
|
149 |
|
|
150 |
public static EM_FEATURE_ERROR_CODE getEnum(int value) { |
|
151 |
for (EM_FEATURE_ERROR_CODE e : EM_FEATURE_ERROR_CODE.values()) { |
|
152 |
if (e.getValue() == value) { |
|
153 |
return e; |
|
154 |
} |
|
155 |
} |
|
156 |
return EM_FEATURE_ERROR_CODE.EM_FEATURE_ERROR_SUCCESS; |
|
157 |
} |
|
158 |
|
|
159 |
} |