Skip to content

A simple python code using in Face Recognition to capture photo using webcam, crop to image centered to face detected

License

Notifications You must be signed in to change notification settings

Ajinkz/CaptureCropPhoto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CaptureCropPhoto

site

A simple python code useful in Face Recognition for data collection to capture photo using webcam and crop to image centered to face detected

Prerequisites

  • Python 3.6.x
  • OpenCV 4.0.0 (pip install opencv-contrib-python)
  • Autocrop library (pip install autocrop)

Execution

python CaptureCropPhoto.py

Working

  • It will ask to enter user first name, last name, id, gender,etc
  • Then it will create a directory with the same and cv2 session will start
  • Press 'c' to capture photo.Press as many times as the number of photos of user you want
  • Press 's' to autocrop all photos in that directory to face region
  • Press 'x' to break & exit
  • Directory name will be in format <Id.no>_<First name>_<Last name>_<Gender M/F> e.g. 007_James_Bond_M
  • Directory structure will like this
├───007_James_Bond_M
     └───007_James_Bond_M0.jpg
     └───007_James_Bond_M1.jpg
     └───007_James_Bond_M2.jpg
     .
     .
     .

Acknowledgements

About

A simple python code using in Face Recognition to capture photo using webcam, crop to image centered to face detected

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages