Skip to main content

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*)

image

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

kcquant-0.1.5.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

kcquant-0.1.5-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page