From charlesreid1

Revision as of 10:04, 18 January 2014 by Admin (talk | contribs) (→‎Importing)

Installing

Pip

The python imaging library can be installed with pip:

$ pip install PIL

Importing

Sometimes you can import the PIL like this:

import PIL as ThePIL

with other installations though, you have to import it like this:

import Image

here is a link with some notes on how to use the PIL when you import it as import Image:

http://effbot.org/imagingbook/introduction.htm

Averaging

Color Averaging

See http://charlesmartinreid.com/wordpress/2012/08/python-image-averaging-and-color-averaging/

Image Averaging

Average two images, like this:

The average of this image:

Hipstamatic 0380.JPG

and this image:

Hipstamatic 0390.JPG

yields this image:

File:HipstamaticAverage 0380 0390.JPG


Image Averaging for Time Lapses

Why I want to take the average of two images:

I'm taking a timelapse photo, and want to stretch out my frames per second without the video seeming too choppy. So I wanted to add an image between each photo pair that averages the two images, doubling the number of frames and smoothing image transitions in the final timelapse.

Here, image averaging is used for more subtle image differences:

The average of

ClocktowerA.jpg

and

ClocktowerB.jpg

is

ClocktowerAvgAB.jpg