DarkCoverage
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.
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:
-
Clone the repository:
git clone https://github.com/TZ387/darkcoverage.git cd darkcoverage
-
Install the package:
pip install -e .
Usage:
python -m darkcoverage.main
With uv
Installation:
-
Clone the repository:
git clone https://github.com/TZ387/darkcoverage.git cd darkcoverage
-
Install dependencies and set up the project:
uv sync
Usage:
uv run python -m darkcoverage.main
Running tests:
uv run pytest
Basic Workflow
- Click "Load Image" to open an image file (such as Example.jpg in the main folder).
- Adjust the number of rows and columns using the row and column inputs in the sliders window
- Set threshold values for each cell using the sliders
- Toggle between "Color Dark Parts" and "Color Light Parts" to choose which areas to highlight
- View the coverage percentages for each cell and the total image
- 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.
Metadata
Release files for darkcoverage 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| darkcoverage-0.2.3.tar.gz | 965.0 kB | Without provenance | Details for darkcoverage-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| darkcoverage-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for darkcoverage-0.2.3-py3-none-any.whl |
Total release size: 976.1 kB
Release files / darkcoverage-0.2.3.tar.gz
| Download URL | darkcoverage-0.2.3.tar.gz |
|---|---|
| Size | 965.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d322346c0d6f2d9cd0f74e29940ef8ad9e033c076238336607907bb5944186c2
|
|
BLAKE2b-256 checksum How to use checksums |
fded0d4c3ec13839aa0a8cd52eaca67c63476c329f8df86c5f68f0976af08420
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / darkcoverage-0.2.3-py3-none-any.whl
| Download URL | darkcoverage-0.2.3-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcea8b6bda8036b2b4a93707a8477067b459719ca5a32b465d707681a900bf65
|
|
BLAKE2b-256 checksum How to use checksums |
45de28290cac6bd55b0a671dbee08ad8151891831dc89fb78d01038980deb649
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for darkcoverage 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.