Generate pixel art from images using Canny edge detection
Project description
pixel8
Generate pixel art from images using Canny edge detection.
Overview
pixel8 is a Python package that transforms regular images into pixel art using the Canny edge detection algorithm. It's perfect for creating stylized artwork, tattoo designs, or just having fun with image processing.
Installation
pip install pixel8
Usage
Command Line Interface
# Basic usage
pixel8 input.jpg 1.5
# Save output to file
pixel8 input.jpg 2.0 --output pixel_art.png
# Don't display the result
pixel8 input.jpg 1.5 --output result.png --no-show
Python API
import pixel8
# Generate pixel art
result = pixel8.create_pixel_line_art(
image_path="input.jpg",
pixelation_factor=1.5,
output_path="output.png",
show_result=True
)
# Use individual components
from pixel8 import gaussian_kernel, conv, gradient
# Create custom edge detection pipeline
kernel = gaussian_kernel(5, 1.2)
# ... rest of your pipeline
Parameters
- pixelation_factor (float): Controls the pixelation threshold. Higher values = fewer pixels, more stylized result
Requirements
- Python 3.8+
- NumPy
- Matplotlib
- scikit-image
- Pillow
Development
# Clone the repository
git clone https://github.com/yourusername/pixel8.git
cd pixel8
# Install in development mode
pip install -e .
# Install development dependencies
pip install -e .[dev]
Motivation
I stumbled across some beautiful pixel art and wanted to teach myself how to make it. I am also in the process of deciding what tattoo to get next. Thought I'd put the two together and design my next tattoo in pixel art.
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 pixel8-1.0.0.tar.gz.
File metadata
- Download URL: pixel8-1.0.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32a913781b11481a80127d80664464c16d62e2262a0a58884bbefdc4acffba6d
|
|
| MD5 |
00e112c336f27c9a778ccddc3fae5418
|
|
| BLAKE2b-256 |
63a98ffcbc9def51d40ff1666bac99e6720ca779282ac1fafacd959a26c66a9c
|
File details
Details for the file pixel8-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pixel8-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c686c938d340f473dd68bb1a51abbb8ac788813a7c2a593f8e94c6e4c08dada
|
|
| MD5 |
c81b84d2beb8ba2342ddd8040925f87d
|
|
| BLAKE2b-256 |
107b7a6a298497992c05d47970024c8304418eeb9b2dccfa96e6c4be61e61292
|