Code Monkey home page Code Monkey logo

paintingreorganize's Introduction

paintingReorganize

To install

pip install -r requirements.txt

If that doesn't work you will have to manually track down and install these pip packages.

To use

python palette.py /path/to/input_file.jpg

Output will be written to output.png

Examples

Input:

Kupka - Mme Kupka Among Verticals

Input

Output:

Output

Input:

Van Gogh - Starry Night

Input

Output:

Output

Input:

Picasso - Demoiselles D'Avignon

Input

Output:

Output

Input:

Cezanne - The Large Bathers

Input

Output:

Output

How it works

Mostly based on PCA a little tutorial on what that means here

  1. Organize pixels according to their first principal component (the direction along which variance is greatest)

  2. Grab a column of pixels at a time, and organize them according to their first principal component

  3. Use the resulting columns one by one in the final result. With each column, check to see if flipping it upside down gives a better match to the previous column.

paintingreorganize's People

Contributors

ardila avatar pavellishin avatar

Watchers

Raul Zambrano avatar James Cloos 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.