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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cie_utils-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 5a942fa4e035086304cd7b888c0919fb6c7f41e108e266ef062751f475b8e534
MD5 970c6bb6efa4b22519e1043e769aa215
BLAKE2b-256 1c23b82eb4a555bfb0841be3746e73f4d4b87950706da155e2dabf6c16db4f0d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cie_utils-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7327036236704650842f54ba579e65bd390a7711a63de932a8ab1ae79c0b9ad2
MD5 8f42dd0c59755a1dfd9467eb8c6d4a7e
BLAKE2b-256 bc1a6cee193c9b73b47bcde7c7cbd13d07de59a13f7a5135d35b10bcf2167cee

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