Skip to main content

Image processing based on CIELAB color space.

Project description

🌈 cie-utils

Advanced image processing in Python using the CIELAB color space.

CI PyPI Docs License: MIT Python pre-commit


cie-utils is a Python library for image preprocessing and color analysis using the perceptually uniform CIELAB color space.


✨ Features

✅ RGB ➡️ LAB / Lch conversion
✅ CLAHE, PCA, false color filters
✅ Background removal via pixel std deviation
✅ Cluster-based segmentation: KMeans, GaussianMixture, Agglomerative
✅ Histogram, PDF, and scatter plot visualization
✅ CSV export of processed image stats
✅ Clean and modular structure for reuse


📦 Installation

From PyPI

pip install cie-utils

From GitHub

pip install git+https://github.com/jarh1992/cie-utils.git

From local source (for development)

# Using Poetry (recommended for development)
poetry install

# Or using pip
pip install .

🧪 Example Usage

from cie-utils import normalize_img, rgb2lab

lab_img = rgb2lab(normalize_img(img, ref_img))

🧰 Development & Code Style

This project uses Poetry for dependency management:

  • 🖤 black for code formatting
  • 🔠 isort for import sorting
  • 🧼 flake8 for linting
  • pytest for testing
  • 🧪 pre-commit hooks enabled in .pre-commit-config.yaml

To install dev dependencies:

poetry install
poetry run pre-commit install

Run tests:

poetry run pytest

📚 Documentation

Documentation is automatically generated with Sphinx and hosted via GitHub Pages:

👉 https://jarh1992.github.io/cie-utils/

Documentation is automatically rebuilt and deployed on every release.


🚀 Release Process

Releases are automated via GitHub Actions. To create a new release:

./release_workflow.sh [patch|minor|major]

This will:

  1. Bump the version in pyproject.toml
  2. Commit and push a version tag
  3. GitHub Actions automatically:
    • Runs tests on Python 3.11 and 3.12
    • Publishes the package to PyPI
    • Deploys updated documentation to GitHub Pages

📝 License

MIT License. See LICENSE for details.

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

cie_utils-1.0.3.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

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

cie_utils-1.0.3-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file cie_utils-1.0.3.tar.gz.

File metadata

  • Download URL: cie_utils-1.0.3.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.0 CPython/3.12.13 Linux/6.17.0-1010-azure

File hashes

Hashes for cie_utils-1.0.3.tar.gz
Algorithm Hash digest
SHA256 91b56d3468514e04bf1b3495dc75eb984d6ec2afdaacbdc566e06da69dcbbc85
MD5 bc4fbcfb0df6da38603c43a8ee2a100e
BLAKE2b-256 a182cdd1631a83c8c0fd981dc46fd012618369b1a95e8c07552a73da36d64213

See more details on using hashes here.

File details

Details for the file cie_utils-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: cie_utils-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.0 CPython/3.12.13 Linux/6.17.0-1010-azure

File hashes

Hashes for cie_utils-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 31713cf13a2440273da690f3ae57b37a1b72974ad3fbe0e2b8a683efa9f98182
MD5 c53d6883c4a6611499e2f8e2ac4e5ca4
BLAKE2b-256 ffb97f8a8e65d7b52908f1a0bbb08c0301d379549e4cb67927680ab6b657aca5

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