FIX 修复面部提取边界问题
This commit is contained in:
parent
f00e51b152
commit
4de4ad938b
|
|
@ -149,8 +149,8 @@ class FaceExtract:
|
||||||
for b, b1 in zip(
|
for b, b1 in zip(
|
||||||
list(range(int(y1), int(y2))), list(range(face_size))
|
list(range(int(y1), int(y2))), list(range(face_size))
|
||||||
):
|
):
|
||||||
if (a >= 0 and a <= r.orig_img.shape[1]) and (
|
if (a >= 0 and a < r.orig_img.shape[0]) and (
|
||||||
b >= 0 and b <= r.orig_img.shape[0]
|
b >= 0 and b < r.orig_img.shape[1]
|
||||||
):
|
):
|
||||||
template[a1][b1] = r.orig_img[a][b]
|
template[a1][b1] = r.orig_img[a][b]
|
||||||
print(int(x1), int(x2), int(y1), int(y2))
|
print(int(x1), int(x2), int(y1), int(y2))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue