Feature: Automated Profile Verification & profcheck Reporting #8

Closed
opened 2026-08-21 10:29:35 +01:00 by gronod · 0 comments
Owner

Description

Integrate profcheck to automatically verify the generated ICC profile's quality by comparing it against the original .ti3 measurement data. Parse results and display a quality report card.

Toolchain Context

  • Backend: Rust (Tauri 2) — spawns profcheck via ProcessManager, parses structured output
  • Frontend: Vanilla JS report card UI

Implementation Plan

Backend (Rust)

  1. New Tauri command commands::run_profcheck(app, state, config):
    • Accept ProfcheckConfig struct: { ti3_path: String, icc_path: String }
    • Build args: ["-k", <ti3_path>, <icc_path>]
    • Spawn via ProcessManager
  2. Output parsing: Collect all stdout lines. After process exits, parse the accumulated output:
    • Extract Peak error, Average error, RMS values using regex patterns on the aggregated output
    • Return a ProfcheckResult struct: { peak_de: f64, avg_de: f64, rms_de: f64, percentile_90: f64 }
  3. Alternatively, if the upstream profcheck -u JSON output enhancement (see README §9.2) is available, parse JSON directly instead of regex.
  4. New Tauri command commands::get_profcheck_result(state, id) to retrieve the parsed result after process completion.

Frontend (JavaScript)

  1. Stage 5 panel (#stage-5):
    • Auto-triggered after Stage 4 completion (or manual "Verify" button)
    • Display a styled "Profile Quality Report Card":
      • Average ΔE: Large hero number with colour coding (green < 1.0, amber < 2.0, red ≥ 2.0)
      • Peak ΔE: Secondary metric
      • RMS ΔE: Tertiary metric
      • Quality verdict: "Excellent" / "Good" / "Acceptable" / "Poor" text badge
    • Collapsible raw profcheck output log
  2. Benchmark context: Display reference thresholds (e.g., "Professional profiles typically achieve average ΔE < 1.0")

New/Modified Files

  • [MODIFY] src-tauri/src/commands.rs — add run_profcheck, get_profcheck_result, structs
  • [MODIFY] src/index.html — expand Stage 5 panel with report card layout
  • [NEW] src/js/profcheck.js — Stage 5 frontend logic
  • [MODIFY] src/styles/main.css — report card styles, quality badges

Acceptance Criteria

  • profcheck spawns silently after profile generation
  • Peak, Average, and RMS ΔE values correctly extracted from output
  • Report card displays with appropriate colour-coded quality indicators
  • Quality verdict text accurately reflects the numerical results
  • Raw profcheck log available in collapsible panel
  • Graceful handling of profcheck failure or missing files

References

### Description Integrate `profcheck` to automatically verify the generated ICC profile's quality by comparing it against the original `.ti3` measurement data. Parse results and display a quality report card. ### Toolchain Context - **Backend**: Rust (Tauri 2) — spawns `profcheck` via `ProcessManager`, parses structured output - **Frontend**: Vanilla JS report card UI ### Implementation Plan #### Backend (Rust) 1. **New Tauri command** `commands::run_profcheck(app, state, config)`: - Accept `ProfcheckConfig` struct: `{ ti3_path: String, icc_path: String }` - Build args: `["-k", <ti3_path>, <icc_path>]` - Spawn via `ProcessManager` 2. **Output parsing**: Collect all stdout lines. After process exits, parse the accumulated output: - Extract `Peak error`, `Average error`, `RMS` values using regex patterns on the aggregated output - Return a `ProfcheckResult` struct: `{ peak_de: f64, avg_de: f64, rms_de: f64, percentile_90: f64 }` 3. **Alternatively**, if the upstream `profcheck -u` JSON output enhancement (see README §9.2) is available, parse JSON directly instead of regex. 4. **New Tauri command** `commands::get_profcheck_result(state, id)` to retrieve the parsed result after process completion. #### Frontend (JavaScript) 1. **Stage 5 panel** (`#stage-5`): - Auto-triggered after Stage 4 completion (or manual "Verify" button) - Display a styled "Profile Quality Report Card": - **Average ΔE**: Large hero number with colour coding (green < 1.0, amber < 2.0, red ≥ 2.0) - **Peak ΔE**: Secondary metric - **RMS ΔE**: Tertiary metric - **Quality verdict**: "Excellent" / "Good" / "Acceptable" / "Poor" text badge - Collapsible raw profcheck output log 2. **Benchmark context**: Display reference thresholds (e.g., "Professional profiles typically achieve average ΔE < 1.0") #### New/Modified Files - `[MODIFY]` `src-tauri/src/commands.rs` — add `run_profcheck`, `get_profcheck_result`, structs - `[MODIFY]` `src/index.html` — expand Stage 5 panel with report card layout - `[NEW]` `src/js/profcheck.js` — Stage 5 frontend logic - `[MODIFY]` `src/styles/main.css` — report card styles, quality badges ### Acceptance Criteria - [ ] profcheck spawns silently after profile generation - [ ] Peak, Average, and RMS ΔE values correctly extracted from output - [ ] Report card displays with appropriate colour-coded quality indicators - [ ] Quality verdict text accurately reflects the numerical results - [ ] Raw profcheck log available in collapsible panel - [ ] Graceful handling of profcheck failure or missing files ### References - [README.md §8 — Display of Results & Verification](README.md#8-display-of-results--verification) - Upstream ArgyllCMS `profcheck`: [gronod/argyllcms](https://git.i3omb.com/gronod/argyllcms)
gronod added this to the Milestone 4: Profiling & Verification Engine milestone 2026-08-21 10:29:35 +01:00
Sign in to join this conversation.