make facedetect.py work when the nested cascade is not specified
This commit is contained in:
parent
5f8f56ea0e
commit
036c438904
@ -49,6 +49,7 @@ if __name__ == '__main__':
|
||||
rects = detect(gray, cascade)
|
||||
vis = img.copy()
|
||||
draw_rects(vis, rects, (0, 255, 0))
|
||||
if not nested.empty():
|
||||
for x1, y1, x2, y2 in rects:
|
||||
roi = gray[y1:y2, x1:x2]
|
||||
vis_roi = vis[y1:y2, x1:x2]
|
||||
|
Loading…
x
Reference in New Issue
Block a user