Ever seen a fancy-shmancy "Meet the Team" page with crisp, matching photos of all the big-shot employees? Worry no more: photo-standardize has got you covered!
requires Numpy and OpenCV
- Single- or batch-image processing
- Automatic facial detection and centering
- Edge padding
- Replacement of greenscreen with background image
- Rotation
- Grayscaling
- Scaling
- Circle masking
After python standardize.py -f samples -r -15 -g -c -s 200 200
:
I couldn't find any great greenscreen images, OK?
After python standardize.py -f samples -c -s 200 200 -b skybg.jpg
:
usage: standardize.py [-h] [-i IMGS] [-f FOLDER] [-o OUTPUT] [-p PADDING] [-b BACKGROUND] [-r ROTATION] [-g]
[-s SIZE SIZE] [-c]
Standardizes face images to create a uniform look.
optional arguments:
-h, --help show this help message and exit
-i IMGS paths to images to standardize
-f FOLDER path to a folder with images to standardize
-o OUTPUT name of output folder for standardized images
-p PADDING amount of pixels of padding around each face. default: 30
-b BACKGROUND path to background image. Images must be taken in front of a greenscreen for this option to work.
NOTE: ensure BG image is larger than greenscreen image
-r ROTATION rotate by the amount of degrees specified
-g makes images grayscale
-s SIZE SIZE scales all images to the specified X, Y value
-c outputs circular images