回答編集履歴
1
改善
test
CHANGED
@@ -1,23 +1,39 @@
|
|
1
1
|
```python
|
2
2
|
|
3
|
-
|
3
|
+
for face in faces:
|
4
4
|
|
5
|
-
|
5
|
+
print('anger: {}'.format(likelihood_name[face.anger_likelihood]))
|
6
6
|
|
7
|
-
|
7
|
+
print('joy: {}'.format(likelihood_name[face.joy_likelihood]))
|
8
8
|
|
9
|
-
|
9
|
+
print('surprise: {}'.format(likelihood_name[face.surprise_likelihood]))
|
10
10
|
|
11
|
-
|
11
|
+
|
12
12
|
|
13
|
-
|
13
|
+
for i, vertex in enumerate(face.bounding_poly.vertices,0):
|
14
14
|
|
15
|
-
|
15
|
+
if i == 0 :
|
16
16
|
|
17
|
-
|
17
|
+
global ver1x
|
18
18
|
|
19
|
-
global ver
|
19
|
+
global ver1y
|
20
20
|
|
21
|
+
ver1x = vertex.x #左上のx座標
|
22
|
+
|
23
|
+
ver1y = vertex.y #左上のy座標
|
24
|
+
|
25
|
+
|
26
|
+
|
21
|
-
|
27
|
+
if i == 2 :
|
28
|
+
|
29
|
+
global ver2x
|
30
|
+
|
31
|
+
global ver2y
|
32
|
+
|
33
|
+
ver2x = vertex.x #右下のx座標
|
34
|
+
|
35
|
+
ver2y = vertex.y #右下のy座標
|
36
|
+
|
37
|
+
|
22
38
|
|
23
39
|
```
|