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'
# n=5 will display top 5 pixel colors in image
# n=10 will display top 10 pixel colors in image
n=10
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.10.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kcquant-0.1.10-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file kcquant-0.1.10.tar.gz.

File metadata

  • Download URL: kcquant-0.1.10.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/2.7.10 Darwin/18.5.0

File hashes

Hashes for kcquant-0.1.10.tar.gz
Algorithm Hash digest
SHA256 6a1f84b3c5ad511d6121ade6589b5edadadebc39bcf30e3c1d053888e2bf69fe
MD5 6a70775f7aea4335b242d6861e66c802
BLAKE2b-256 2627f4bdd3a66efffa625423c521c17103acbfb7a4ff9122dbedf7f2ae35c949

See more details on using hashes here.

File details

Details for the file kcquant-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: kcquant-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/2.7.10 Darwin/18.5.0

File hashes

Hashes for kcquant-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 e3676c74b004167fc04338d910b485c5a40c4531c9dbb96499c062c2bab67233
MD5 7b2eedc19bd67fbf4e003b50bc95fde8
BLAKE2b-256 25a357b0c68b763d06d4137b5cd2f6d23aa536f5e4d2c434a610b60fbc55b961

See more details on using hashes here.

Supported by

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