Skip to content

bennie/montage

Repository files navigation

Montage

An image montage (AKA: photomosaic) generator

Summary

Remember those posters you might have seen? Where a character or scene from a movie was made out of a montage of hundreds of images of said movie? Yeah. Those photomosaics are neat.

The Fluffiest Death

Closeup of Pixels

This project is to be able to make my own from a given set of images.

Directions

  1. Copy an image you want to montage to "data/goal.png"

  2. Edit "comfig.yaml" and change the value of 'imagedir' to your directory of source images.

  3. Run "make"

  4. Output will be "output.png"

If you wish to then repeat the process with a different image:

  1. Change out "data/goal.png" with a new image

  2. "make clean"

  3. "make"

How are you doing your color math?

  • An average is taken of each source frame. That is: sum all values of R, G, and B, and divide for average. The pixel is then determined to be that color.

  • The "nearest match" for the pixels is calculated via Euclidian distance on a cube:

    Color Cube Distance

    A range of acceptable distance is used and then random pixels that are within that range are selected to compose the montage.

    Equasion above is credit to wikipedia. And more info can be found at: https://en.wikipedia.org/wiki/Euclidean_distance

License

GPL 2 - See "LICENSE" in repo.

About

Create an image from other images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published