Skip to content

genekogan/Mosaic

Repository files navigation

Photo mosaic

This openFrameworks application generates photo mosaics. Specify a target image ("outer image") and a directory of candidate images and the program will assign all the candidate images to a tile in the mosaic. All candidates are assigned exactly once with none missing and no duplicates. Thus the following samples are all made of exactly the same tiles, which is the animals categories of the Caltech-256 dataset. Samples:

Saraswati by Raja Ravi Varma Raja Ravi Varma

Tarsila do Amaral Tarsila

@genekogan @genekogan

How it works

  1. the target image is divided into a matrix of tiles, and a color histogram is extracted from each of the target image's tiles, as well as all the candidate images from the specified directory.

  2. a distance measurement is extracted between every possible pair of tile and candidate image. the metric used is the Earth Mover's Distance (EMD) between the histograms of each tile and candidate.

  3. the candidates are assigned to the grid so as to minimize the total EMD.

Requirements

About

automatic generation of photo mosaics in openframeworks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published