forked from edgardoh/darktable
-
Notifications
You must be signed in to change notification settings - Fork 30
Introduce external .cht and CGATS file handling for colorchecker based calibration #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Jiyone
wants to merge
21
commits into
aurelienpierreeng:master
Choose a base branch
from
Jiyone:it8_r
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9f99132 to
6de60a0
Compare
aurelienpierre
requested changes
May 25, 2025
c552dbc to
9ae8c8c
Compare
Added definitions and functions to validate and create a ColorChecker from an IT8 file.
Add material type handling and improve CGATS support.
923b477 to
d0b672b
Compare
And some minor code cleanup.
- 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.
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.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




SUMMARY :
The user must place matching
.chtand 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
.chtchecker from the list, Ansel compares its number of patches to those in each CGATS file from the backend list. It then populates theChart colorcombobox 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
.chtchecker 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
.chtfile.Finally, Ansel displays the chart on screen as usual.
If no CGATS files are found, a message is shown to inform the user.

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
.chtfile 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.