Skip to content

Python code for converting any image to a Painting By Numbers version of itself. Now supports GPU acceleration as well.

Notifications You must be signed in to change notification settings

CoderHam/PaintingByNumbersIFY

Repository files navigation

PaintingByNumbersIFY

Python code for converting any image to a Painting By Numbers version of itself.

Usage

python pbnify.py --help
usage: pbnify.py [-h] -i INPUT_IMAGE -o OUTPUT_IMAGE [-k NUM_OF_CLUSTERS]
                 [--outline]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT_IMAGE, --input-image INPUT_IMAGE
                        Path of input image.
  -o OUTPUT_IMAGE, --output-image OUTPUT_IMAGE
                        Path of output image.
  -k NUM_OF_CLUSTERS, --num-of-clusters NUM_OF_CLUSTERS
                        Number of kmeans clusters for dominant color
                        calculation. Defaults to 15.
  --outline             Save outline image containing edges.
python pbnify.py -i images/picasso.jpg -o images/picasso_PBN.jpg --outline -k 15

Original Image/s:

Image/s converted to their Painting By Number form:

Outline of Image/s converted to their Painting By Number form:

About

Python code for converting any image to a Painting By Numbers version of itself. Now supports GPU acceleration as well.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages