A tiny image processing library with k-means and Voronoi diagram.
Project description
README
This is a tiny image processing library to conver your images to Voronoi mosaic or Warhol effect images. We used k-means clustering algorithms to determine the position of Voronoi sites and pixel groups of Warhol effect.
How to use
pip install imgrit
The library depends on Pillow, NumPy, and SciPy.
The following is the input image.
from PIL import Image
import imgrit
my_image = Image.open("../images/original.jpg")
voronoi_mosaic = imgrit.voronoi_mosaic(my_image, 250)
voronoi_mosaic.save("voronoi-mosaic.png")
warhol_effect = imgrit.warhol_effect(my_image, 10)
warhol_effect.save("warhol-effect.png")
OpenSea
If you'd like to see more images, please visit Asakura Gallery Digital at OpenSea.
Citations
under preparetion.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imgrit-0.1.2.tar.gz.
File metadata
- Download URL: imgrit-0.1.2.tar.gz
- Upload date:
- Size: 108.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3fd6893cea1b95e87c6a251aa69c55516964621bc254ca033297f807ff07905
|
|
| MD5 |
9ffaefbf30b2b7db273fdc8eb89600b3
|
|
| BLAKE2b-256 |
be8f9fd5c7303af413c7b6bd68bf56341461505a4afd983edd95b7fc0d98bb8a
|
File details
Details for the file imgrit-0.1.2-py3-none-any.whl.
File metadata
- Download URL: imgrit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
660febd9935f778e7b9481755b670428468c1917d11e1a2282aad1f021966903
|
|
| MD5 |
3b6fc7d677365ea748036b64ffe78bbe
|
|
| BLAKE2b-256 |
c14e0d635f4e83bd754751a4e05c1629ee3d7e3a10d8a8864936d8392c8e410b
|