Skip to content

Instantly share code, notes, and snippets.

@Unitoi01
Created May 12, 2018 21:56
Show Gist options
  • Save Unitoi01/18d5c398e53683c95a75122c14bf1be5 to your computer and use it in GitHub Desktop.
Save Unitoi01/18d5c398e53683c95a75122c14bf1be5 to your computer and use it in GitHub Desktop.
showRectangle openCV
for (x,y,w,h) in faces:
pic = cv.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
gray= cv.rectangle(gray,(x,y),(x+w,y+h),(0),2)
roi_gray = gray[y:y+h, x:x+w]
roi_color = img[y:y+h, x:x+w]
cv.imshow('pic',pic)
cv.waitKey(0)
cv.destroyAllWindows()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment