Giter VIP home page Giter VIP logo

frame-resize's Introduction

frame-resize

Resize your photos for a digital frame -- detect and center faces.

This python script uses facedetect and imagemagick to resize images, centering on faces if they can be detected by facedetect. If all the faces don't fit in the frame, the script resizes so that the largest face is centered.

Steps to install and run

  1. Make sure imagemagick is installed.
  2. Install python PIL (sudo apt-get install python-imaging in Ubuntu 16.04).
  3. Install facedetect using the instructions at https://www.thregr.org/~wavexx/software/facedetect/.
  4. Change the height and width at the top of the python file to the max height and width of your digital frame.
  5. Place your photos in their own directory.
  6. Change the name of the directory in the path variable at the top of the python file to the full name of the directory you placed the photos in.
  7. Run the python file (works in Python 3)
  8. Cropped images will be placed in a subdirectory of your path called crop-datetime. Upload/transfer these to your frame, and you're done!

frame-resize's People

Contributors

vvanhee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.