From 5e3eb426a1ffbfd3775c190575a7bb9f89e2d7e8 Mon Sep 17 00:00:00 2001 From: Benny Yang <675885711@qq.com> Date: Fri, 18 Nov 2022 22:52:21 +0800 Subject: [PATCH] imshow need waitKey and it should be out of for loop --- vision/body_analysis/ultraface/demo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vision/body_analysis/ultraface/demo.py b/vision/body_analysis/ultraface/demo.py index f53775672..1f53c2bc7 100644 --- a/vision/body_analysis/ultraface/demo.py +++ b/vision/body_analysis/ultraface/demo.py @@ -64,4 +64,5 @@ def faceDetector(orig_image, threshold = 0.7): for i in range(boxes.shape[0]): box = scale(boxes[i, :]) cv2.rectangle(orig_image, (box[0], box[1]), (box[2], box[3]), color, 4) - cv2.imshow('', orig_image) +cv2.imshow('', orig_image) +cv2.waitKey()