-1

I followed a tutorial to put a rectangle around a detected face on the webcam. It works really good, but I want to draw an image like this: mask over the face. How can I do this? Code (I am running the opencv3 version)

Noah Christopher
  • 166
  • 1
  • 13
Noah Cristino
  • 757
  • 8
  • 29

1 Answers1

3

Solved. I used this where frame was the webcam and x_offset and y_offset were the offsets from the face track function.

s_img = cv2.imread("iron.jpg")
    l_img = frame
    l_img[y_offset:y_offset+s_img.shape[0], x_offset:x_offset+s_img.shape[1]] = s_img
Noah Cristino
  • 757
  • 8
  • 29