Color quantization toolkit for exploratory data analysis of images.
Project description
kcquant
This package enables you to perform exploratory data analysis on images, as well as easily quantize the colors of an image to be used for machine learning applications.
To install this package, use
pip install kcquant
Currently only one function (get_colors) exists, which displays the top n pixel values (RGB format) in an image.
from kcquant import get_colors
from PIL import Image
import numpy as np
# open image
img = Image.open(<file path>).convert('RGB')
# call get_colors()
# if image is in RGB set color='RGB'
# if image is in BGR set color='BGR'
get_colors(np.array(img), color = 'RGB', top=*n*)
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
kcquant-0.1.6.tar.gz
(2.7 kB
view hashes)