Skip to content

Conversation

@Jiyone
Copy link
Collaborator

@Jiyone Jiyone commented May 20, 2025

image

SUMMARY :

The user must place matching .cht and CGATS files in [config]/color/it8.

The Color Calibration module initializes the checker list with built-in checkers, followed by any .cht (chart geometry) files that Ansel finds in [config]/color/it8.
It also builds a backend list of color definitions by loading any CGATS.17 files found in the same folder.

When the user selects a .cht checker from the list, Ansel compares its number of patches to those in each CGATS file from the backend list. It then populates the Chart color combobox with the CGATS files that have a matching patch count.
This combobox is only displayed if at least one matching file is found and a .cht checker is selected.

Once both a checker and a corresponding color file are selected, Ansel uses the lcms2 library to read the color data and populate the color checker structure based on the .cht file.

Finally, Ansel displays the chart on screen as usual.

If no CGATS files are found, a message is shown to inform the user.
image

NOTE :

ANSI CGATS.17 is THE standard text file format for exchanging color measurement data.
This standard text format (the ASCII version is by far the most common) is the format accepted by most color measurement and profiling applications.
They can be used with lcms2.

A .cht file defines the geometry of a color calibration chart, such as the layout and position of its color patches. It describes how the patches are arranged (e.g., rows, columns, spacing) so that image processing software can correctly identify and extract color information from a scanned or photographed chart. It does not contain any color data—only the structure of the chart.

@Jiyone Jiyone force-pushed the it8_r branch 5 times, most recently from 9f99132 to 6de60a0 Compare May 25, 2025 01:17
@Jiyone Jiyone marked this pull request as ready for review May 30, 2025 17:59
@Jiyone Jiyone force-pushed the it8_r branch 2 times, most recently from c552dbc to 9ae8c8c Compare May 30, 2025 18:14
@Jiyone Jiyone force-pushed the it8_r branch 2 times, most recently from 923b477 to d0b672b Compare June 24, 2025 21:30
Jiyone added 2 commits June 26, 2025 03:34
- Modified functions to utilize the patch number in both .cht and checker, so the gui only shows compatible .cht files.
- Updated the chart_spec structure to initialize all fields in _dt_color_checker_chart_spec_init().
- introduced SAFE_FREE and SAFE_G_FREE macros for safer memory deallocation.
- Enhanced the _dt_colorchecker_get_standard_type function to handle invalid CGATS types more gracefully.
- Improved the update_colorchecker_cht_list function to filter .cht files based on the selected color checker's patch count.
- Cleaned up unused functions and variables related to color checker handling.
- Ensured proper memory cleanup in the gui_cleanup function to prevent memory leaks.
Jiyone added 4 commits July 1, 2025 00:58
to add .cht files with built-ins and CGATS into their own combobox
- Optimization of the error message on the checker.
- Added a check for XYZ and Lab columns in the CGATS file.
- Optimization of some error messages.
@Jiyone Jiyone changed the title Introducing CGATS.17 for Colorchecker and IT8 Calibration Introduce external .cht and CGATS file handling for colorchecker based calibration Jul 6, 2025
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants