Skip to main content

Streetart by clustering.

Project description

pycht_logo

Street art by clustering.

Pics by @alys.cheshire

But, said Alice, if the world has absolutely no sense, who's stopping us from inventing one ? L. Caroll

⚡️ Quick start

Take a nice picture :

Generate a 4 colors stencil model :

>> from pycht import Pycht

>> Pycht().stencil('cat.jpg', 'stencil_cat.jpg', 4)
Stencil 1 stencil 2 stencil 3 stencil 4

Final result rendering with all stencils :

Cut it, paint it, stare at it, leave it. Enjoy !

🛠 Installation

:snake: You need to install Python 3.6 or above.

Installation can be done by using pip. There are wheels available for Linux, MacOS, and Windows.

pip install pycht

You can also install the latest development version as so:

pip install git+https://github.com/tlentali/pycht

# Or, through SSH:
pip install git+ssh://git@github.com/tlentali/pycht.git

🥄 How ?

Behind this script, you will find algos used for marketing, financial prediction and client targeting. The pics is tranlated into a matrice, each value indicate a pixel color in three dimension. Then, a clustering algorithm is used to reshape the picture by colors. The number of colors desired is a parameter and is chosen directly by the user. As an output you have the picture with the number of color you choose and a picture by color to elaborate each stencils one by one.

🖖 Contributing

Feel free to contribute in any way you like, we're always open to new ideas and approaches. If you want to contribute to the code base please check out the CONTRIBUTING.md file. Also take a look at the issue tracker and see if anything takes your fancy.

This project follows the all-contributors specification. Again, contributions of any kind are welcome!

📜 License

pycht is free and open-source software licensed under the MIT license.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycht-0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

pycht-0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pycht-0.1.tar.gz.

File metadata

  • Download URL: pycht-0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for pycht-0.1.tar.gz
Algorithm Hash digest
SHA256 8d44d25f04a6254e5ef5580662702921d2e0934ebf5eda7a307dc4ad7a694fb8
MD5 e776c0b3a567fecd6bd228ca48521d1d
BLAKE2b-256 ab4554c4ac2557b53751197785702cd9113bf3353690f15a1a60debb3068e2c2

See more details on using hashes here.

File details

Details for the file pycht-0.1-py3-none-any.whl.

File metadata

  • Download URL: pycht-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for pycht-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee443662e8e5d1bcae14ebd83a420848fa02baecacc33c834e1f68eed3af6268
MD5 6afb6c3c39bc5b83c43128d48ff17e44
BLAKE2b-256 51cc6f97aacc91e0d2d0b5ee41f02a61a3c1a3ce224e5bcc883efb667cb58364

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page