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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cie_utils-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 2500a8c9f38208a5ed8f849280fda94083bd96e215b61c83c8bfa26d28d59f8f
MD5 2ca93181f32e8332febaf51212411a2d
BLAKE2b-256 7db7cd2c66392b81939bb7419bf04e26364b99e633fb5ba499a5bdcf1e114736

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cie_utils-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab019ce0a9b86ac6fb61ce493c17bd056f2996d892e2c3a94beb93fee5bb9bea
MD5 aaa52eb662192da3ea9a6c560025cd63
BLAKE2b-256 aa76c270fcb6e586b246d3c3d09ff33ba4e47ec96573c3ac6a12429ef6147abb

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