Skip to content

Instantly share code, notes, and snippets.

@poudyalanil
Created July 18, 2020 11:52
Show Gist options
  • Save poudyalanil/4f8bc0b2d48c03ae2b153ef82115fb8d to your computer and use it in GitHub Desktop.
Save poudyalanil/4f8bc0b2d48c03ae2b153ef82115fb8d to your computer and use it in GitHub Desktop.
Face Detection
# detect faces
face_cordinates = trained_data.detectMultiScale(greyscale_frame)
#x and y is the upper left corner coordinate and w and h are the corresponding width and height of the rectangle
for (x,y,w,h) in face_cordinates:
cv2.rectangle(frame,(x,y),(x+w,y+h),(0,255,0),2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment