From b8773672606c299f96575c8b7466f0e958ccc2dd Mon Sep 17 00:00:00 2001 From: David Date: Sun, 19 Aug 2018 17:41:57 -0400 Subject: [PATCH] Fix for Issue #13 Swapped + operator for np.concatenate to ensure that the resulting array is 2 by X. This ensures that we are able to draw the point in the array. --- facelib/LandmarksProcessor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facelib/LandmarksProcessor.py b/facelib/LandmarksProcessor.py index e960f65..0baa1e3 100644 --- a/facelib/LandmarksProcessor.py +++ b/facelib/LandmarksProcessor.py @@ -192,7 +192,7 @@ def draw_landmarks (image, image_landmarks, color): cv2.polylines(image, tuple(np.array([v]) for v in (right_eye, left_eye, mouth)), True, color, lineType=cv2.LINE_AA) # the rest of the cicles - for x, y in right_eyebrow+left_eyebrow+mouth+right_eye+left_eye+nose: + for x, y in np.concatenate((right_eyebrow, left_eyebrow, mouth, right_eye, left_eye, nose), axis=0): cv2.circle(image, (x, y), 1, color, 1, lineType=cv2.LINE_AA) # jaw big circles for x, y in jaw: