¡@

Home 

python Programming Glossary: boxscale

Detect face then autocrop pictures

http://stackoverflow.com/questions/13211745/detect-face-then-autocrop-pictures

cv.GetSize cv_im cv_im.tostring def imgCrop image cropBox boxScale 1 # Crop a PIL image with the provided box x left y upper w.. h height # Calculate scale factors xDelta max cropBox 2 boxScale 1 0 yDelta max cropBox 3 boxScale 1 0 # Convert cv box to PIL.. xDelta max cropBox 2 boxScale 1 0 yDelta max cropBox 3 boxScale 1 0 # Convert cv box to PIL box left upper right lower PIL_box..