From abc101a299e98ac99f7396ca85d9a4a0111c2bdd Mon Sep 17 00:00:00 2001 From: Yuki Takeyama Date: Sun, 21 Jan 2024 19:14:26 +0900 Subject: [PATCH 1/2] Update OpenCVAnimOperator.py fix circle apit error --- OpenCVAnimOperator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenCVAnimOperator.py b/OpenCVAnimOperator.py index 08e495b..4bedec2 100644 --- a/OpenCVAnimOperator.py +++ b/OpenCVAnimOperator.py @@ -193,11 +193,11 @@ def modal(self, context, event): # draw face markers for (x, y) in shape: - cv2.circle(image, (x, y), 2, (0, 255, 255), -1) + cv2.circle(image, (int(x), int(y)), 2, (0, 255, 255), -1) # draw detected face for (x,y,w,h) in faces: - cv2.rectangle(image,(x,y),(x+w,y+h),(255,0,0),1) + cv2.rectangle(image,(int(x),int(y)),(x+w,y+h),(255,0,0),1) # Show camera image in a window cv2.imshow("Output", image) From a823b3f8aa94c55fd6868eaa32c696761feb6460 Mon Sep 17 00:00:00 2001 From: Yuki Takeyama Date: Sun, 21 Jan 2024 19:23:00 +0900 Subject: [PATCH 2/2] Fix error due to change in opencv circle api --- OpenCVAnimOperator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenCVAnimOperator.py b/OpenCVAnimOperator.py index 4bedec2..2cefb66 100644 --- a/OpenCVAnimOperator.py +++ b/OpenCVAnimOperator.py @@ -197,7 +197,7 @@ def modal(self, context, event): # draw detected face for (x,y,w,h) in faces: - cv2.rectangle(image,(int(x),int(y)),(x+w,y+h),(255,0,0),1) + cv2.rectangle(image,(x, y),(x+w,y+h),(255,0,0),1) # Show camera image in a window cv2.imshow("Output", image)