Yearbook

A convenience for cropping and outputting images, by Dan Nguyen (@dancow)

A very thin wrapper around ruby-opencv and rmagick (which themselves are wrappers around OpenCV and ImageMagick + GraphicsMagick) for producing face-cropped images from a source image.

This is in very-early stage...I'm using it mostly as a quickie image cropper for various projects, as well as a way to learn the cool thor gem.

Installation

Load all the dependencies mentioned above (ha!)

Then:

gem install yearbook

Usage

In Ruby

require 'yearbook'

image = Yearbook::Image.new('path/to/somebody.jpg') image.clip_and_print_best_face('output/to/somebodys-face.jpg')

Command-line tool

yearbook face george-washington.jpg # will print out to "george-washington-face.jpg" by default