Skip to content

bezverec/icc2000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICC 2000


Note

This tool is experimental, intended for educational and personal use. I am mostly toying with the concepts involved in correct color management.

Why 2000? It is my favorite designation of a set of personal tools concerning still images processing. Originally denoting JPEG 2000. Also my favorite year before everything in the world went to...

The tool has been tested only on Windows.


ICC 2000 is a Python/Tkinter desktop application for building RGB input ICC profiles from a ColorChecker SG chart.

It is designed as a practical profiling and validation tool for digitization and imaging workflows, with a strong focus on:

  • high-fidelity LUT-based profiling
  • validation against reference chart data
  • exported ICC regression checking
  • low-level ICC inspection and reporting
  • an English-first GUI with optional Czech localization

Screenshot

icc2000

Installation

Requirements

  • Git (optional)
  • Python with tkinter support
  • LittleCMS 2

On Windows, the repository includes lcms2.dll, so no additional system-wide LittleCMS installation is usually required.

Download this repo

git clone https://github.com/bezverec/icc2000.git
cd icc2000

or

  • download this repo as ZIP via your web browser, unzip, navigate to the root directory

Install Python dependencies

pip install -r requirements.txt

Running the application

From the project root:

python -m src.app

On Windows PowerShell, for example:

cd C:\temp\icc2000
python -m src.app

Main runtime dependencies

requirements.txt currently includes:

  • numpy
  • Pillow
  • opencv-python
  • matplotlib
  • openpyxl
  • colour-science

Notes

  • openpyxl is required for XLSX reference files
  • matplotlib is required for HTML report generation and charts
  • opencv-python is required for chart detection and manual corner editing

Features

Input and reference handling

  • Load RGB TIFF images in 8-bit or 16-bit per channel
  • Load reference data from:
    • CSV
    • TXT
    • XLSX
  • Support embedded ICC profiles in TIFF images
  • Support fallback ICC profiles when the TIFF has no embedded profile

Chart detection and patch measurement

  • Automatic ColorChecker SG chart detection
  • Manual corner refinement
  • Multiple patch sampling options:
    • shape:
      • ellipse
      • rect
    • mode:
      • trimmed_mean
      • median
      • mean
  • Adjustable patch inner ratio
  • Preview support for chart geometry, ROI, labels, and grid overlay

Profile fitting

  • Matrix + TRC
  • LUT polynomial
  • LUT root-polynomial
  • real 3D LUT

Supported PCS

  • XYZ
  • LAB

For LUT workflows, LAB is generally the preferred PCS because it tends to provide better perceptual fidelity.

Validation pipeline

The application supports three validation stages:

  • Measurement validation
    • compares the measured chart directly against the reference using the embedded or fallback ICC
  • Internal profile validation
    • compares the fitted internal model against the reference
  • Exported ICC validation
    • validates the final exported ICC profile against the reference using LittleCMS

Export and reporting

  • Export ICC profiles
  • Export validation CSV
  • Export exported-ICC validation CSV
  • Export HTML reports with:
    • charts
    • validation summaries
    • export regression overview
    • low-level ICC tag analysis

Recommended defaults

The GUI is configured with practical high-fidelity defaults intended for maximum quality.

Default preset

  • Maximum fidelity
  • profile type: LUT
  • LUT method: 3D LUT
  • PCS: LAB
  • LUT export grid: 25^3
  • sample shape: ellipse
  • sample mode: trimmed_mean
  • trim fraction: 0.10
  • patch inner ratio: 0.50
  • ICC revision: v4.4

Other presets

Maximum fidelity

Best quality, larger ICC file size.

Balanced

Smaller export LUT grid while preserving a modern LUT workflow.

Matrix/TRC compatibility

Simpler and more broadly compatible profile using PCS = XYZ.


Recommended workflow

  1. Load the input TIFF and reference data.
  2. Detect the chart.
  3. Refine the chart corners manually if needed.
  4. Measure the patches.
  5. Run Validate measurement.
  6. Run Fit profile.
  7. Run Validate profile.
  8. Export the ICC profile.
  9. Run Validate exported ICC.
  10. Export the HTML report.


CLI helper

A helper CLI is available for quick validation of an exported ICC profile:

python -m src.tools.validate_exported_icc --image input.tif --reference reference.csv --icc exported.icc

It uses the same sampler and the same LittleCMS-based validation pipeline as the GUI.


HTML report

The HTML report is intended as a compact technical summary of the full profiling session.

It can include:

  • input summary
  • measurement validation summary
  • internal profile validation summary
  • exported ICC validation summary
  • charts and histograms
  • worst-patch overviews
  • neutral-scale analysis
  • exported ICC regression view
  • low-level ICC analysis:
    • profile version
    • device class
    • color space
    • PCS
    • rendering intent
    • tag table
    • important tag presence
    • readable text tags such as desc, cprt, dmnd, dmdd

Notes on ICC quality

  • For LUT workflows, the best overall combination is usually:
    • 3D LUT + LAB + 25^3
  • 17^3 is often a good compromise between file size and export quality
  • The HTML report can show export regression, meaning the difference between the internal fitted model and the final exported ICC
  • ICC analysis also checks the presence of important tags and metadata such as:
    • A2B0
    • B2A0
    • rTRC/gTRC/bTRC
    • rXYZ/gXYZ/bXYZ
    • wtpt
    • desc
    • cprt
    • dmnd
    • dmdd
    • meta

Troubleshooting

The application does not start

Make sure Python is installed with tkinter support and that all dependencies are installed:

pip install -r requirements.txt

The application fails because LittleCMS is missing

Make sure lcms2.dll is available in the project root.

XLSX reference files do not load

Make sure openpyxl is installed:

pip install openpyxl

HTML report generation fails

Make sure matplotlib is installed and available in the active Python environment.

Chart detection is inaccurate

Use manual corner editing and then re-run patch measurement.


License

GPLv3.


AI generated code disclosure

The code is AI generated using ChatGPT 5.4.

About

ICC profiling Tool

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages