From 02e8a2b4eb298109a40ed98e9a50dbfde600c89e Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 30 Sep 2020 11:30:42 +0800 Subject: [PATCH] bugfix --- kivyblocks/kivycamera.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kivyblocks/kivycamera.py b/kivyblocks/kivycamera.py index 00af435..5d879c8 100644 --- a/kivyblocks/kivycamera.py +++ b/kivyblocks/kivycamera.py @@ -21,8 +21,10 @@ class KivyCamera(Image): self.camera_id = camera_id self.faceCascade = None if face_detect: - # self.faceCascade = cv2.CascadeClassifier("Resources/haarcascades/haarcascade_frontalface_default.xml") # added self.faceCascade = cv2.CascadeClassifier('data/haarcascade/haarcascade_frontalface_default.xml') + if not self.faceCascade: + print('self.faceCascade is None') + self.update_task = Clock.schedule_interval(self.update, 1.0 / fps) def on_size(self,o,size):