Introduction

Commuter 2 is the current actively developed (relatively speaking) version of the Commuter photo mosaic generation programme. Commuter 2 is the result of combining a laptop with frequent train journeys. The main differences between the two versions are:

As always, Commuter 2 is released under the BSD licence, share and enjoy.

Installing

Pre-requisites

You will need:

Building Commuter

Grab Commuter 2.2 and then:

gunzip commuter-2_2.tar.gz
tar xf commuter-2_2.tar
cd commuter-2_2
make
make install

Existing user? Don't forget to read the Changelog.

You may need to be root for the last stage since by default Commuter will install into /usr/local/bin/. You can change the installation path by editing Makefile. If you get build errors, check the list of known problems and fixes in the INSTALL file. If none of that helps feel free to let me know. If you get different build errors and fix them, definitely let me know.

How to use

Albums

An album ('library' in Commuter 1 speak) is a collection of images which Commuter uses as tiles. An album needs to be created before any mosaics can be made. Unlike Commuter 1 an album is a single file rather than a directory of lots of files.

Albums are managed by the comalb tool. The general format is comalb switches command paths

In reverse order; paths are one or more paths to add to the album. A path can either be a directory to process recursively or an individual file. comalb will import any image format understood by ImageMagick (with the exception of .txt files, because that's just silly).

The command is either add or create. Simply, add will add the paths to an existing album, create will create a new album, overwriting any old one.

The available switches are:

Name Description
-a filename The filename of the album to process, defaults to default.calb
-n name A descriptive name for the album, e.g. "Holiday photos", required for create.
-x width The width of the tiles to create, required for create.
-y height The height of the tiles to create, required for create.

So a typical album creation may be: comalb -n "Photos" -x 40 -y 40 create ~/photos

Creating a mosaic

Mosaics are created with: commuter switches input_image

The input image can be in any format understood by ImageMagick. The switches are as follows:

Name Description
-a filename The filename of the album to use, defaults to default.calb
-d If set, commuter will not use a tile twice within an image. Otherwise, commuter will always pick the closest matching tile regardless of how many times it has been used.
-j 0-100 Sets the JPEG quality level of the output.
-n yes/no Sets whether commuter will tint the tile it chooses to the average colour of a perfectly matching tile.
-o filename The filename to output to, defaults to output.jpg. Note the output format is always JPEG regardless of the filename specified.
-p duplicates/tolerance In the case where a tile cannot be chosen due to the current choices for duplicate restriction and matching tolerance, which of these factors should be preserved for a second matching attempt. So, if "duplicates" is chosen the tolerance requirement will be ignored if necessary to find a matching tile. Default is "duplicates".
-r centre/straight Sets the order in which tiles are allocated to the final image. "centre" allocates tiles in the centre of the image first, "straight" allocates top-to-bottom, left-to-right.
-t value Sets a 'matching tolerance' for tiles. A tile can be only be used if its average colour is within this value of a hypothetical perfect tile. Experiment for your albums, but sensible values are expected to be in the thousands.
-z Puts commuter into pedantry mode. If a tile cannot be matched due to duplication and tolerance restrictions, fail rather than break the restrictions.

A complete example: commuter -a holiday.calb -t 5000 -d -p tolerance -o out.jpg bob.jpg