No description
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .vscode | ||
| datafiles | ||
| docs | ||
| reqs | ||
| src | ||
| testdata | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| variquant.py | ||
VariQuant
An experimental tool for interactive color quantization.
This is alpha-quality software.
Known issues
- Program doesn't start without an image. Pass in an image path as a command line argument.
- Pixel mapping implementation can consume hundreds of megs of peak RAM
- HyAB distance is broken with most color space combinations
Algorithms
This program runs a divisive (top-down) hierarchical clustering pass over the colors and then refines the result with k-means. It's designed for flexibility and correctness; not for performance. That's why it's practical to run only for small images.
Most of the magic is in the file src/topdown_cut.py. See my book for details.
Command line
There's a command line interface that's enabled via the --no-gui argument. Run python variquant.py --help for details.
Installation
pip install -r reqs/requirements.txt
For development
First make sure you have pip-tools installed.
Then run pip-sync:
pip-sync reqs/requirements.txt reqs/requirements.dev.txt
To update requirements.dev.txt after adding a dependency:
pip-compile reqs/requirements.in > reqs/requirements.txt
pip-compile reqs/requirements.dev.in > reqs/requirements.dev.txt
