.
diff --git a/README.md b/README.md
index 89443fc..86605f2 100644
--- a/README.md
+++ b/README.md
@@ -2,13 +2,16 @@
Interactive Color Range Analyzer (ICRA)
- A fully-featured, PySide6-powered desktop application for precise color matching, image analysis, and statistics generation.
+ A professional desktop application for high-precision color matching, clustering analysis, and batch statistics generation.
## Features
- **High-Performance Image Processing:** Native, vectorized NumPy operations for lightning-fast HSV conversion and color matching.
-- **Batch Folder Processing:** Load a folder of images and instantly export an aggregated `icra_stats.csv` with localized formatting (dot or comma decimals depending on your language).
+- **Automatic Background Exclusion:** Intelligently ignores background pixels (configurable in `config.toml`) to ensure they don't interfere with your analysis.
+- **Grouping Score (Clustering):** A high-performance 9x9 box-sum algorithm that rewards solid "splashes" of color and penalizes thin lines or fragmented noise.
+- **Batch Processing & Customizable Export:** Load a folder of images and instantly export `icra_stats.csv` and `icra_settings.json`. Features a dedicated **Weighting Dialog** to customize the impact of each core component.
+- **Import/Export Settings:** Save your HSV ranges, exclusion zones, and weighting preferences to a JSON file and reload them later for consistent analysis across different sessions.
- **Eyedropper Tool:** Quickly pick target matching colors directly from the image canvas.
- **Advanced Selection:** Support for exclusion zones (rectangles and free-draw polygons) overlaid on the image, all dynamically rendered via `QGraphicsView`.
- **Modern UI & UX:**
@@ -18,6 +21,37 @@
- Keyboard shortcuts for rapid workflow.
- **Configurable:** Uses `config.toml` to drive everything from overlay matching colors to default sliders and application language (`en`/`de`).
+## Core Concepts
+
+### 1. HSV Color Matching
+Instead of simple RGB, ICRA uses the **HSV (Hue, Saturation, Value)** color space. This allows for more intuitive color selection:
+- **Hue (0-360°):** The base "color" (Red, Green, Blue, etc.).
+- **Saturation (0-100%):** The intensity or "vibrancy".
+- **Value (0-100%):** The brightness.
+Matching is performed by checking if each pixel's HSV values fall within your defined ranges.
+
+### 2. Scoring Components
+The **Composite Score** is calculated weighted by your preferences:
+- **Match (Keep):** Percentage of matching pixels *after* excluding your manual shapes and background areas.
+- **Match (All):** Percentage of matching pixels across the entire image.
+- **Brightness Score:** Calculated from the average brightness of the "Keep" areas. If "Prefer Dark" is ON, lower brightness results in a higher score.
+- **Grouping Score:** Uses a 9x9 box-sum density check. Higher values indicate that matching pixels are clustered into solid blocks rather than scattered noise.
+
+### 3. Background Filtering
+To ensure accurate statistics, ICRA automatically filters out the image background (e.g., the dark grey/black backdrop in weapon screenshots). These settings are fully configurable in `config.toml`, allowing you to adjust the target color and the tolerance required for exclusion.
+
+### 4. Exclusion Zones
+Use the **Exclusion Tool** to draw rectangles or polygons over areas you want to ignore. This is essential for focusing your analysis on specific parts of a complex image while ignoring background noise or irrelevant details.
+
+## Typical Workflow
+
+1. **Load Data:** Drag and drop a folder or use the `File` menu to load your images.
+2. **Pick Color:** Use the Eyedropper tool to select your target color directly from the image.
+3. **Refine HSV:** Fine-tune the Hue, Saturation, and Value sliders to perfect the mask.
+4. **Draw Exclusions:** Add exclusion shapes to ignore parts of the image that shouldn't be counted.
+5. **Export:** Click `Export Folder Stats`. Define your weights (e.g., prioritize the Grouping Score if you want coherent splashes) and save your results.
+6. **Persistent Settings:** Use `File -> Export Settings` to save your configuration, or `File -> Import Settings` to restore a previous setup.
+
## Requirements
- Python 3.11+
- [uv](https://github.com/astral-sh/uv) for dependency management
@@ -42,16 +76,21 @@ uv run pytest tests/ -v
## Project Layout
```
app/
- assets/ # Shared branding
- lang/ # Localization strings (TOML format)
- logic/ # Configuration loading and application constants
- qt/ # PySide6 implementation (main_window, custom UI widgets, vectorized image processing)
-tests/ # Pytest unit tests
-config.toml # Configurable overlay colors, slider defaults
-main.py # Entry point -> PySide6 launcher
+ assets/ # Icons and branding
+ lang/ # Translations (TOML)
+ qt/ # UI implementation and NumPy processing
+tests/ # Unit tests for core analysis
+config.toml # User-facing configuration
+main.py # Entry point
+LICENSE # GNU GPLv3 terms
```
-## Development Notes
-- The legacy `Tkinter` codebase has been completely removed in favor of `PySide6`.
-- Quick syntax check: `uv run python -m compileall app main.py`
-- Contributions welcome!
+## Development
+- **Tests**: Run `uv run pytest tests/ -v` to verify the core logic.
+- **Environment**: Managed via `uv`. Run `uv sync` to ensure your environment matches the lockfile.
+
+## Contributing
+Contributions are welcome! Open an issue or submit a pull request.
+
+## License
+GPLv3 License. See the LICENSE file for details.
diff --git a/app/qt/main_window.py b/app/qt/main_window.py
index ea8d150..3dece99 100644
--- a/app/qt/main_window.py
+++ b/app/qt/main_window.py
@@ -1299,13 +1299,6 @@ class MainWindow(QtWidgets.QMainWindow, I18nMixin):
self.status_label.setText(self._t("status.defaults_restored"))
self._refresh_overlay_only()
- def _coming_soon(self) -> None:
- QtWidgets.QMessageBox.information(
- self,
- self._t("dialog.info_title"),
- "Feature coming soon in the PySide6 migration.",
- )
-
# Shortcuts --------------------------------------------------------------
def _setup_shortcuts(self) -> None:
diff --git a/pyproject.toml b/pyproject.toml
index 0d36943..cd08fe8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
description = "Interactive Color Range Analyzer (ICRA) desktop app (PySide6)"
readme = "README.md"
authors = [{ name = "ICRA contributors" }]
-license = "MIT"
+license = "GPL-3.0-only"
requires-python = ">=3.10"
dependencies = [
"numpy>=1.26",