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.2.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.2-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cie_utils-1.0.2.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Linux/6.14.0-1017-azure

File hashes

Hashes for cie_utils-1.0.2.tar.gz
Algorithm Hash digest
SHA256 fd6590e273b61d74e6b8aa3b162cd2201d117eba495ab218f498b60d3839ce7c
MD5 79576e9239330d7925c922dc2368db93
BLAKE2b-256 aee95b2d0e81e237bb25409beb7264f7598d9da3cbd774999447a3e0bc62c284

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cie_utils-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Linux/6.14.0-1017-azure

File hashes

Hashes for cie_utils-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0bb300aa404d87cc00b5beffd956d4489b07a00e7703a34929a6f6969e099e2f
MD5 bc7564592b2e4d83ef0d4f8c91d32574
BLAKE2b-256 11dcbc5e5156c62ca885b6e1a9b96d4e96477b085f4586422bcf1a3e4a74dc01

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