The project is currently undergoing transition from pip-based build to uv-based build. Therefore, there may be problems with some installation instructions.
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.
- 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:
pip install darkcoverageUsage:
darkcoverageor if Python is not included to path
darkcoverage.mainInstallation:
First, install uv if you haven't already (see uv docs for more information)
Then install DarkCoverage:
uv add darkcoverageOr install globally with uvx:
uvx darkcoverageUsage:
# If installed with uv add
uv run darkcoverage
# If installed with uvx
uvx darkcoverageInstallation:
-
Clone the repository:
git clone https://github.com/TZ387/darkcoverage.git cd darkcoverage -
Install the package:
pip install -e .
Usage:
python -m darkcoverage.mainInstallation:
-
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- 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.
DarkCoverage/
├── src/
│ └── darkcoverage/
│ ├── __init__.py
│ ├── main.py
│ ├── gui.py
│ ├── image_processing.py
│ └── widgets/
│ ├── __init__.py
│ ├── image_label.py
│ ├── reference_window.py
│ └── sliders_window.py
├── .gitignore
├── uv.lock
├── LICENSE
├── pyproject.toml
├── README.md
├── Demonstration.png
└── Example.jpg
- Python 3.8+
- PySide6
- Pillow
- NumPy
This project is licensed under the MIT License - see the LICENSE file for details.
