回答編集履歴
2
d
answer
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
# 検出する。
|
11
11
|
faces = face_cascade.detectMultiScale(gray)
|
12
12
|
|
13
|
-
if len(
|
13
|
+
if len(faces) > 0:
|
14
14
|
max_face = max(faces, key=lambda x: x[2] * x[3])
|
15
15
|
|
16
16
|
# 矩形を画像に描画する。
|
1
d
answer
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
# 検出する。
|
11
11
|
faces = face_cascade.detectMultiScale(gray)
|
12
12
|
|
13
|
-
if len(face)
|
13
|
+
if len(face) > 0:
|
14
14
|
max_face = max(faces, key=lambda x: x[2] * x[3])
|
15
15
|
|
16
16
|
# 矩形を画像に描画する。
|