Extract the selected zone on a picture with opencv python -


i'm using opencv detect face in picture , want ot extract it, have photo man , expected result jpg image seleted face

enter image description here

i have detect face if can me extract face , save it!

thank all

you have add single line program.

consider variable detected_face, , following:

detected_face = img[y:y+h, x:x+w] cv2.imwrite('face.jpg', detected_face) 

you have .jpgfile of face stored in directory


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -