Giter Site home page Giter Site logo

mosaic's Introduction

mosaic

Create mosaic guide given an input image and the number of tiles

Script

I wrote this script with the following problem in mind: I wanted to make a mosaic, for which I thought of using Idee's tiles; but before buying the tiles, I needed to have an idea of how many tiles I would need for each colour.

Luckily there are detailed pictures of each kind of tile on Idee's website, so I could write a script that:

  1. Takes in input an image;
  2. Divides it in squares of equal dimension (tiles);
  3. Fills each tile with the average colour of its content;
  4. Finds for each tile the most similar tile from Idee.

Read more here.

Example

On the left the source image, on the right the image tiled with Idee's tiles:

The script also produces a version where every colour gets a different letter:

Other than providing the number of tiles for each colour:

Letter Count
A 31
B 5
E 16
F 7
G 4
H 2
J 142
M 20
N 58
O 7
P 3
Q 213
R 81
S 561
T 526
U 42
V 782

This is me with the result:

mosaic's People

Contributors

naelvis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.