Giter Site home page Giter Site logo

mosaic-pics's Introduction

🔳Mosaic-Pics

中文

sample image

  • For demostration purpose, this Image has 30% alpha blended with original, for raw output visits picture_output

Usage

> main.py

arguments:
  -src --source         the image to stimulate
  -s --size             the size of each pieces
  -d --dest             the images output folder
  -f --folder           the folder containing images used to stimulate the source

optional arguments:
  -m --method          the method used to compute difference of two colors,
                         default use euclidean (can be change in settings.py)
  -r --repeat           allow build with repeating images
  -fa --factor          result size compared to original size

  ---
  method currently supported
  ---
  euclidean              classic euclidean distance between colors
  weighted euclidean     euclidean but RGB fit to human perception: 0.3R, 0.59G, 0.11B
  weighted euclidean+    closer approx than weighted euclidean: 2R, 4G, 3B
  weighted euclidean++   closer approx than weighted euclidean, details see source
  all                    run all methods

  method source: https://en.wikipedia.org/wiki/Color_difference
  ps: use " to surround multiple words input

  ---
  relative speed (my machine)
  ---
  euclidean:             k
  weighted euclidean:    k+-(~5%)
  weighted euclidean+:   k+-(~5%)
  weighted euclidean++:  k+(~20%)

Note

  • On first run it will create a database in source folder, subsequent run with same database will be much faster for large database, see settings.py for more details
  • You should config settings.py before the first run on new database folder
  • This program only accept .jpg and .png files and does not search files recursively in the folder

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.