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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -