Skip to main content

DarkCoverage

Tests PyPI version

DarkCoverage is an image analysis tool that helps you measure and visualize the coverage of dark or light areas in images using customizable thresholds and a grid-based approach.

Its usage is simple: Just run the program, load the image, and then use the sliders to specify appropriate threshold for each area.

DarkCoverage Screenshot

Features

  • Load and analyze images with customizable number of rows and columns
  • Set individual thresholds for each grid cell
  • Color dark or light areas based on threshold values
  • View real-time coverage percentage for each cell and overall image
  • Compare with original image reference
  • Save processed images

Installation and Usage

With pip

Installation:

pip install darkcoverage

Usage:

darkcoverage

or if the darkcoverage script isn't on your PATH

python -m darkcoverage.main

With uv

First, install uv if you haven't already (see uv docs for more information)

Installation:

uv add darkcoverage

Usage:

uv run darkcoverage

Or run it without installing:

uvx darkcoverage

From Source

With pip

Installation:

  1. Clone the repository:

    git clone https://github.com/TZ387/darkcoverage.git
    cd darkcoverage
    
  2. Install the package:

    pip install -e .
    

Usage:

python -m darkcoverage.main

With uv

Installation:

  1. Clone the repository:

    git clone https://github.com/TZ387/darkcoverage.git
    cd darkcoverage
    
  2. Install dependencies and set up the project:

    uv sync
    

Usage:

uv run python -m darkcoverage.main

Running tests:

uv run pytest

Basic Workflow

  1. Click "Load Image" to open an image file (such as Example.jpg in the main folder).
  2. Adjust the number of rows and columns using the row and column inputs in the sliders window
  3. Set threshold values for each cell using the sliders
  4. Toggle between "Color Dark Parts" and "Color Light Parts" to choose which areas to highlight
  5. View the coverage percentages for each cell and the total image
  6. Save the processed image with "Save Image"

In case something goes wrong, you can use reset image option.

Project Structure

DarkCoverage/
├── .github/
│   └── workflows/
│       └── tests.yml
├── src/
│   └── darkcoverage/
│       ├── __init__.py
│       ├── main.py
│       ├── gui.py
│       ├── image_processing.py
│       └── widgets/
│           ├── __init__.py
│           ├── image_label.py
│           ├── reference_window.py
│           └── sliders_window.py
├── tests/
│   ├── conftest.py
│   ├── test_image_processing.py
│   └── test_sliders_window.py
├── .gitignore
├── AGENTS.md
├── CLAUDE.md -> AGENTS.md
├── uv.lock
├── LICENSE
├── pyproject.toml
├── README.md
├── Demonstration.png
└── Example.jpg

Requirements

  • Python 3.10+
  • PySide6
  • Pillow
  • NumPy

License

This project is licensed under the MIT License - see the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

darkcoverage-0.2.3.tar.gz (965.0 kB view details)

Uploaded Source

Built Distribution

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

darkcoverage-0.2.3-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file darkcoverage-0.2.3.tar.gz.

File metadata

  • Download URL: darkcoverage-0.2.3.tar.gz
  • Upload date:
  • Size: 965.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for darkcoverage-0.2.3.tar.gz
Algorithm Hash digest
SHA256 d322346c0d6f2d9cd0f74e29940ef8ad9e033c076238336607907bb5944186c2
MD5 85c8455c97332a0fc8a3a8abedaf617d
BLAKE2b-256 fded0d4c3ec13839aa0a8cd52eaca67c63476c329f8df86c5f68f0976af08420

See more details on using hashes here.

File details

Details for the file darkcoverage-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: darkcoverage-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for darkcoverage-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bcea8b6bda8036b2b4a93707a8477067b459719ca5a32b465d707681a900bf65
MD5 3595a000aea72b1b753b127853e7ca48
BLAKE2b-256 45de28290cac6bd55b0a671dbee08ad8151891831dc89fb78d01038980deb649

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page