From 00b26003930055297b63eb711dc5b0f978329ddb Mon Sep 17 00:00:00 2001 From: charleswg Date: Wed, 19 May 2021 23:27:08 -0500 Subject: [PATCH] Missing return(image) in draw_rect_landmarks and draw_landmarks --- facelib/LandmarksProcessor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/facelib/LandmarksProcessor.py b/facelib/LandmarksProcessor.py index 52e5f8b..38feb91 100644 --- a/facelib/LandmarksProcessor.py +++ b/facelib/LandmarksProcessor.py @@ -718,6 +718,7 @@ def draw_landmarks (image, image_landmarks, color=(0,255,0), draw_circles=True, if transparent_mask: mask = get_image_hull_mask (image.shape, image_landmarks) image[...] = ( image * (1-mask) + image * mask / 2 )[...] + return(image) def draw_rect_landmarks (image, rect, image_landmarks, face_type, face_size=256, transparent_mask=False, landmarks_color=(0,255,0)): draw_landmarks(image, image_landmarks, color=landmarks_color, transparent_mask=transparent_mask) @@ -729,7 +730,8 @@ def draw_rect_landmarks (image, rect, image_landmarks, face_type, face_size=256, points = transform_points ( [ ( int(face_size*0.05), 0), ( int(face_size*0.1), int(face_size*0.1) ), ( 0, int(face_size*0.1) ) ], image_to_face_mat, True) imagelib.draw_polygon (image, points, (0,0,255), 2) - + return(image) + def calc_face_pitch(landmarks): if not isinstance(landmarks, np.ndarray): landmarks = np.array (landmarks) @@ -899,4 +901,4 @@ def get_transform_mat (image_landmarks, output_size, face_type, scale=1.0): mat = cv2.getAffineTransform(l_t,pts2) return mat -""" \ No newline at end of file +"""