Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
colorchecker.h File Reference
#include "darktable.h"
+ Include dependency graph for colorchecker.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_color_checker_patch
 
struct  dt_color_checker_t
 
struct  dt_colorchecker_label_t
 
struct  dt_colorchecker_CGATS_label_make_name_t
 
struct  dt_colorchecker_chart_spec_t
 

Typedefs

typedef enum dt_color_checker_targets dt_color_checker_targets
 
typedef struct dt_color_checker_patch dt_color_checker_patch
 
typedef struct dt_color_checker_t dt_color_checker_t
 
typedef struct dt_colorchecker_label_t dt_colorchecker_label_t
 
typedef enum dt_colorchecker_CGATS_types dt_colorchecker_CGATS_types
 
typedef enum dt_colorchecker_material_types dt_colorchecker_material_types
 
typedef struct dt_colorchecker_CGATS_label_make_name_t dt_colorchecker_CGATS_label_make_name_t
 
typedef struct dt_colorchecker_chart_spec_t dt_colorchecker_chart_spec_t
 

Enumerations

enum  dt_color_checker_targets {
  COLOR_CHECKER_XRITE_24_2000 = 0 ,
  COLOR_CHECKER_XRITE_24_2014 = 1 ,
  COLOR_CHECKER_SPYDER_24 = 2 ,
  COLOR_CHECKER_SPYDER_24_V2 = 3 ,
  COLOR_CHECKER_SPYDER_48 = 4 ,
  COLOR_CHECKER_SPYDER_48_V2 = 5 ,
  COLOR_CHECKER_USER_REF = 6 ,
  COLOR_CHECKER_LAST
}
 
enum  dt_colorchecker_CGATS_types {
  CGATS_TYPE_IT8_7_1 = 0 ,
  CGATS_TYPE_IT8_7_2 = 1 ,
  CGATS_TYPE_CTI3 = 2 ,
  CGATS_TYPE_UNKOWN = 3
}
 
enum  dt_colorchecker_material_types {
  COLOR_CHECKER_MATERIAL_TRANSPARENT = 0 ,
  COLOR_CHECKER_MATERIAL_OPAQUE = 1 ,
  COLOR_CHECKER_MATERIAL_UNKNOWN = 2
}
 

Functions

dt_colorchecker_label_tdt_colorchecker_label_init (const char *label, const dt_color_checker_targets type, const char *path, const int patch_nb)
 
dt_color_checker_patchdt_colorchecker_patch_array_init (const size_t num_patches)
 
void dt_colorchecker_patch_cleanup (dt_color_checker_patch *patch)
 
void dt_colorchecker_patch_cleanup_list (void *_patch)
 
dt_color_checker_tdt_colorchecker_init ()
 
void dt_colorchecker_cleanup (dt_color_checker_t *checker)
 
void dt_colorchecker_label_free (gpointer data)
 
void dt_colorchecker_label_list_cleanup (GList **colorcheckers)
 
dt_color_checker_tdt_colorchecker_user_ref_create (const char *color_filename, const char *cht_filename)
 Creates a color checker from a reference file (CGATS format).
 
int dt_colorchecker_find_cht_files (GList **chts)
 Find all .cht files in the user config/color/it8 directory.
 
int dt_colorchecker_find_CGATS_reference_files (GList **ref_colorcheckers_files)
 Find all CGAT files in the user config/color/it8 directory.
 
int dt_colorchecker_find_builtin (GList **colorcheckers_label)
 Find all builtin colorcheckers.
 
void dt_colorchecker_copy (dt_color_checker_t *dest, const dt_color_checker_t *src)
 Copy the content of a color checker from source to destination.
 
static dt_color_checker_tdt_get_color_checker (const dt_color_checker_targets target_type, GList **colorchecker_label, const char *color_filename)
 
static size_t dt_color_checker_get_index (const dt_color_checker_t *const target_checker, const size_t coordinates[2])
 
static void dt_color_checker_get_coordinates (const dt_color_checker_t *const target_checker, size_t *coordinates, const size_t index)
 
static const dt_color_checker_patchdt_color_checker_get_patch_by_name (const dt_color_checker_t *const target_checker, const char *name, size_t *index)
 
int dt_colorchecker_find (GList **colorcheckers_label)
 Find all builtin and .cht colorcheckers.
 
int dt_colorchecker_find_color (GList **color_label)
 Find all builtin and CGATS colorcheckers.
 

Variables

dt_color_checker_patch xrite_24_2000_patches []
 
dt_color_checker_t xrite_24_2000
 
dt_color_checker_patch xrite_24_2014_patches []
 
dt_color_checker_t xrite_24_2014
 
dt_color_checker_patch spyder_24_patches []
 
dt_color_checker_t spyder_24
 
dt_color_checker_patch spyder_24_v2_patch []
 
dt_color_checker_t spyder_24_v2
 
dt_color_checker_patch spyder_48_patches []
 
dt_color_checker_t spyder_48
 
dt_color_checker_patch spyder_48_v2_patch []
 
dt_color_checker_t spyder_48_v2
 
const char * CGATS_types [CGATS_TYPE_UNKOWN]
 
const char * colorchecker_material_types [COLOR_CHECKER_MATERIAL_UNKNOWN]
 

Typedef Documentation

◆ dt_color_checker_patch

◆ dt_color_checker_t

◆ dt_color_checker_targets

These are the CIELab values of Color Checker reference targets

◆ dt_colorchecker_CGATS_label_make_name_t

◆ dt_colorchecker_CGATS_types

◆ dt_colorchecker_chart_spec_t

◆ dt_colorchecker_label_t

◆ dt_colorchecker_material_types

Enumeration Type Documentation

◆ dt_color_checker_targets

These are the CIELab values of Color Checker reference targets

Enumerator
COLOR_CHECKER_XRITE_24_2000 
COLOR_CHECKER_XRITE_24_2014 
COLOR_CHECKER_SPYDER_24 
COLOR_CHECKER_SPYDER_24_V2 
COLOR_CHECKER_SPYDER_48 
COLOR_CHECKER_SPYDER_48_V2 
COLOR_CHECKER_USER_REF 
COLOR_CHECKER_LAST 

Definition at line 32 of file colorchecker.h.

◆ dt_colorchecker_CGATS_types

Enumerator
CGATS_TYPE_IT8_7_1 
CGATS_TYPE_IT8_7_2 
CGATS_TYPE_CTI3 
CGATS_TYPE_UNKOWN 

Definition at line 402 of file colorchecker.h.

◆ dt_colorchecker_material_types

Enumerator
COLOR_CHECKER_MATERIAL_TRANSPARENT 
COLOR_CHECKER_MATERIAL_OPAQUE 
COLOR_CHECKER_MATERIAL_UNKNOWN 

Definition at line 417 of file colorchecker.h.

Function Documentation

◆ dt_color_checker_get_coordinates()

static void dt_color_checker_get_coordinates ( const dt_color_checker_t *const  target_checker,
size_t *  coordinates,
const size_t  index 
)
inlinestatic

Definition at line 685 of file colorchecker.h.

References height, dt_color_checker_t::patches, and dt_color_checker_t::size.

◆ dt_color_checker_get_index()

static size_t dt_color_checker_get_index ( const dt_color_checker_t *const  target_checker,
const size_t  coordinates[2] 
)
inlinestatic

helper functions

Definition at line 677 of file colorchecker.h.

References height, dt_color_checker_t::patches, and dt_color_checker_t::size.

◆ dt_color_checker_get_patch_by_name()

static const dt_color_checker_patch * dt_color_checker_get_patch_by_name ( const dt_color_checker_t *const  target_checker,
const char *  name,
size_t *  index 
)
inlinestatic

◆ dt_colorchecker_cleanup()

◆ dt_colorchecker_copy()

◆ dt_colorchecker_find()

int dt_colorchecker_find ( GList **  colorcheckers_label)

Find all builtin and .cht colorcheckers.

Parameters
colorcheckers_labelthe NULL GList that will be populated with found .cht.
Returns
int Number of found colorcheckers.

Definition at line 722 of file colorchecker.h.

References dt_colorchecker_find_builtin(), dt_colorchecker_find_cht_files(), DT_DEBUG_VERBOSE, and dt_print().

Referenced by update_colorchecker_list().

◆ dt_colorchecker_find_builtin()

int dt_colorchecker_find_builtin ( GList **  colorcheckers_label)

Find all builtin colorcheckers.

Parameters
colorcheckers_labelNULL GList that will be populated with found colorcheckers.
Returns
int Number of found colorcheckers.

Definition at line 1506 of file common/colorchecker.c.

References _dt_get_builtin_colorchecker_name(), _dt_get_builtin_colorchecker_patch_nb(), COLOR_CHECKER_USER_REF, dt_colorchecker_label_init(), dt_free, IS_NULL_PTR, k, and name.

Referenced by dt_colorchecker_find().

◆ dt_colorchecker_find_CGATS_reference_files()

int dt_colorchecker_find_CGATS_reference_files ( GList **  ref_colorcheckers_files)

Find all CGAT files in the user config/color/it8 directory.

Parameters
ref_colorcheckers_filesNULL GList that will be populated with found IT8 files
Returns
int Number of found files

Definition at line 1536 of file common/colorchecker.c.

References _dt_colorchecker_user_ref_make_label(), DT_DEBUG_VERBOSE, dt_free, dt_loc_get_user_config_dir(), dt_print(), IS_NULL_PTR, and PATH_MAX.

Referenced by dt_colorchecker_find_color().

◆ dt_colorchecker_find_cht_files()

int dt_colorchecker_find_cht_files ( GList **  chts)

Find all .cht files in the user config/color/it8 directory.

Parameters
chtsNULL GList that will be populated with found IT8 files
Returns
int Number of found files

Definition at line 1569 of file common/colorchecker.c.

References _dt_colorchecker_cht_make_label(), dt_free, dt_loc_get_user_config_dir(), IS_NULL_PTR, and PATH_MAX.

Referenced by dt_colorchecker_find().

◆ dt_colorchecker_find_color()

int dt_colorchecker_find_color ( GList **  color_label)

Find all builtin and CGATS colorcheckers.

Parameters
color_labelA NULL GList that will be populated with found .CGATS files.
Returns
int The number of found .cht files.

Definition at line 739 of file colorchecker.h.

References dt_colorchecker_find_CGATS_reference_files(), dt_colorchecker_label_list_cleanup(), DT_DEBUG_VERBOSE, and dt_print().

Referenced by update_colorchecker_color_list().

◆ dt_colorchecker_init()

◆ dt_colorchecker_label_free()

void dt_colorchecker_label_free ( gpointer  data)

◆ dt_colorchecker_label_init()

dt_colorchecker_label_t * dt_colorchecker_label_init ( const char *  label,
const dt_color_checker_targets  type,
const char *  path,
const int  patch_nb 
)

◆ dt_colorchecker_label_list_cleanup()

void dt_colorchecker_label_list_cleanup ( GList **  colorcheckers)

◆ dt_colorchecker_patch_array_init()

◆ dt_colorchecker_patch_cleanup()

void dt_colorchecker_patch_cleanup ( dt_color_checker_patch patch)

◆ dt_colorchecker_patch_cleanup_list()

void dt_colorchecker_patch_cleanup_list ( void _patch)

Definition at line 500 of file colorchecker.h.

References dt_free, and dt_color_checker_patch::name.

Referenced by _dt_colorchecker_chart_spec_cleanup().

◆ dt_colorchecker_user_ref_create()

dt_color_checker_t * dt_colorchecker_user_ref_create ( const char *  color_filename,
const char *  cht_filename 
)

◆ dt_get_color_checker()

Variable Documentation

◆ CGATS_types

const char* CGATS_types[CGATS_TYPE_UNKOWN]
Initial value:
= {
"IT8.7/1",
"IT8.7/2",
"CTI3"
}

Definition at line 411 of file colorchecker.h.

Referenced by _dt_CGATS_get_type_value().

◆ colorchecker_material_types

const char* colorchecker_material_types[COLOR_CHECKER_MATERIAL_UNKNOWN]
Initial value:
= {
"Transparent",
"Opaque"
}

Definition at line 424 of file colorchecker.h.

Referenced by _dt_colorchecker_get_material_string().

◆ spyder_24

dt_color_checker_t spyder_24
Initial value:
= { .name = "Datacolor SpyderCheckr 24 before 2018",
.author = "Aur\303\251lien PIERRE",
.date = "dec, 9 2016",
.manufacturer = "DataColor",
.ratio = 2.f / 3.f,
.radius = 0.035,
.patches = 24,
.size = { 4, 6 },
.middle_grey = 03,
.white = 00,
.black = 05,
.values = spyder_24_patches }
@ COLOR_CHECKER_SPYDER_24
dt_color_checker_patch spyder_24_patches[]

Definition at line 196 of file colorchecker.h.

Referenced by dt_get_color_checker().

◆ spyder_24_patches

dt_color_checker_patch spyder_24_patches[]
Initial value:
= {
{ "A1", { 96.04, 2.16, 2.60 }, { 0.107, 0.844 } },
{ "A2", { 80.44, 1.17, 2.05 }, { 0.264, 0.844 } },
{ "A3", { 65.52, 0.69, 1.86 }, { 0.421, 0.844 } },
{ "A4", { 49.62, 0.58, 1.56 }, { 0.579, 0.844 } },
{ "A5", { 33.55, 0.35, 1.40 }, { 0.736, 0.844 } },
{ "A6", { 16.91, 1.43, -0.81 }, { 0.893, 0.844 } },
{ "B1", { 47.12, -32.50, -28.75 }, { 0.107, 0.615 } },
{ "B2", { 50.49, 53.45, -13.55 }, { 0.264, 0.615 } },
{ "B3", { 83.61, 3.36, 87.02 }, { 0.421, 0.615 } },
{ "B4", { 41.05, 60.75, 31.17 }, { 0.579, 0.615 } },
{ "B5", { 54.14, -40.80, 34.75 }, { 0.736, 0.615 } },
{ "B6", { 24.75, 13.78, -49.48 }, { 0.893, 0.615 } },
{ "C1", { 60.94, 38.21, 61.31 }, { 0.107, 0.385 } },
{ "C2", { 37.80, 7.30, -43.04 }, { 0.264, 0.385 } },
{ "C3", { 49.81, 48.50, 15.76 }, { 0.421, 0.385 } },
{ "C4", { 28.88, 19.36, -24.48 }, { 0.579, 0.385 } },
{ "C5", { 72.45, -23.60, 60.47 }, { 0.736, 0.385 } },
{ "C6", { 71.65, 23.74, 72.28 }, { 0.893, 0.385 } },
{ "D1", { 70.19, -31.90, 1.98 }, { 0.107, 0.155 } },
{ "D2", { 54.38, 8.84, -25.71 }, { 0.264, 0.155 } },
{ "D3", { 42.03, -15.80, 22.93 }, { 0.421, 0.155 } },
{ "D4", { 48.82, -5.11, -23.08 }, { 0.579, 0.155 } },
{ "D5", { 65.10, 18.14, 18.68 }, { 0.736, 0.155 } },
{ "D6", { 36.13, 14.15, 15.78 }, { 0.893, 0.155 } } }

Definition at line 170 of file colorchecker.h.

◆ spyder_24_v2

dt_color_checker_t spyder_24_v2
Initial value:
= { .name = "Datacolor SpyderCheckr 24 after 2018",
.author = "Aur\303\251lien PIERRE",
.date = "dec, 9 2016",
.manufacturer = "DataColor",
.ratio = 2.f / 3.f,
.radius = 0.035,
.patches = 24,
.size = { 4, 6 },
.middle_grey = 03,
.white = 00,
.black = 05,
.values = spyder_24_v2_patch }
@ COLOR_CHECKER_SPYDER_24_V2
dt_color_checker_patch spyder_24_v2_patch[]

Definition at line 241 of file colorchecker.h.

Referenced by dt_get_color_checker().

◆ spyder_24_v2_patch

dt_color_checker_patch spyder_24_v2_patch[]
Initial value:
= {{ "A1", { 96.04, 2.16, 2.60 }, { 0.107, 0.844 } },
{ "A2", { 80.44, 1.17, 2.05 }, { 0.264, 0.844 } },
{ "A3", { 65.52, 0.69, 1.86 }, { 0.421, 0.844 } },
{ "A4", { 49.62, 0.58, 1.56 }, { 0.579, 0.844 } },
{ "A5", { 33.55, 0.35, 1.40 }, { 0.736, 0.844 } },
{ "A6", { 16.91, 1.43, -0.81 }, { 0.893, 0.844 } },
{ "B1", { 47.12, -32.50, -28.75 }, { 0.107, 0.615 } },
{ "B2", { 50.49, 53.45, -13.55 }, { 0.264, 0.615 } },
{ "B3", { 83.61, 3.36, 87.02 }, { 0.421, 0.615 } },
{ "B4", { 41.05, 60.75, 31.17 }, { 0.579, 0.615 } },
{ "B5", { 54.14, -40.80, 34.75 }, { 0.736, 0.615 } },
{ "B6", { 24.75, 13.78, -49.48 }, { 0.893, 0.615 } },
{ "C1", { 60.94, 38.21, 61.31 }, { 0.107, 0.385 } },
{ "C2", { 37.80, 7.30, -43.04 }, { 0.264, 0.385 } },
{ "C3", { 49.81, 48.50, 15.76 }, { 0.421, 0.385 } },
{ "C4", { 28.88, 19.36, -24.48 }, { 0.579, 0.385 } },
{ "C5", { 72.45, -23.57, 60.47 }, { 0.736, 0.385 } },
{ "C6", { 71.65, 23.74, 72.28 }, { 0.893, 0.385 } },
{ "D1", { 70.19, -31.85, 1.98 }, { 0.107, 0.155 } },
{ "D2", { 54.38, 8.84, -25.71 }, { 0.264, 0.155 } },
{ "D3", { 42.03, -15.78, 22.93 }, { 0.421, 0.155 } },
{ "D4", { 48.82, -5.11, -23.08 }, { 0.579, 0.155 } },
{ "D5", { 65.10, 18.14, 18.68 }, { 0.736, 0.155 } },
{ "D6", { 36.13, 14.15, 15.78 }, { 0.893, 0.155 } } }

Definition at line 216 of file colorchecker.h.

◆ spyder_48

dt_color_checker_t spyder_48
Initial value:
= { .name = "Datacolor SpyderCheckr 48 before 2018",
.author = "Aur\303\251lien PIERRE",
.date = "dec, 9 2016",
.manufacturer = "DataColor",
.ratio = 2.f / 3.f,
.radius = 0.035,
.patches = 48,
.size = { 8, 6 },
.middle_grey = 24,
.white = 21,
.black = 29,
.values = spyder_48_patches }
@ COLOR_CHECKER_SPYDER_48
dt_color_checker_patch spyder_48_patches[]

Definition at line 310 of file colorchecker.h.

Referenced by dt_get_color_checker().

◆ spyder_48_patches

dt_color_checker_patch spyder_48_patches[]

Definition at line 261 of file colorchecker.h.

◆ spyder_48_v2

dt_color_checker_t spyder_48_v2
Initial value:
= { .name = "Datacolor SpyderCheckr 48 after 2018",
.author = "Aur\303\251lien PIERRE",
.date = "dec, 9 2016",
.manufacturer = "DataColor",
.ratio = 2.f / 3.f,
.radius = 0.035,
.patches = 48,
.size = { 8, 6 },
.middle_grey = 24,
.white = 21,
.black = 29,
.values = spyder_48_v2_patch }
dt_color_checker_patch spyder_48_v2_patch[]
@ COLOR_CHECKER_SPYDER_48_V2

Definition at line 379 of file colorchecker.h.

Referenced by dt_get_color_checker().

◆ spyder_48_v2_patch

dt_color_checker_patch spyder_48_v2_patch[]

Definition at line 330 of file colorchecker.h.

◆ xrite_24_2000

dt_color_checker_t xrite_24_2000
Initial value:
= { .name = "Xrite ColorChecker 24 before 2014",
.author = "X-Rite",
.date = "3/27/2000",
.manufacturer = "X-Rite/Gretag Macbeth",
.ratio = 2.f / 3.f,
.radius = 0.055f,
.patches = 24,
.size = { 4, 6 },
.middle_grey = 21,
.white = 18,
.black = 23,
@ COLOR_CHECKER_XRITE_24_2000
dt_color_checker_patch xrite_24_2000_patches[]

Definition at line 104 of file colorchecker.h.

Referenced by dt_get_color_checker().

◆ xrite_24_2000_patches

dt_color_checker_patch xrite_24_2000_patches[]
Initial value:
= {
{ "A1", { 37.986, 13.555, 14.059 }, { 0.087, 0.125}},
{ "A2", { 65.711, 18.13, 17.81 }, { 0.250, 0.125}},
{ "A3", { 49.927, -04.88, -21.905 }, { 0.417, 0.125}},
{ "A4", { 43.139, -13.095, 21.905 }, { 0.584, 0.125}},
{ "A5", { 55.112, 08.844, -25.399 }, { 0.751, 0.125}},
{ "A6", { 70.719, -33.397, -0.199 }, { 0.918, 0.125}},
{ "B1", { 62.661, 36.067, 57.096 }, { 0.087, 0.375}},
{ "B2", { 40.02, 10.41, -45.964 }, { 0.250, 0.375}},
{ "B3", { 51.124, 48.239, 16.248 }, { 0.417, 0.375}},
{ "B4", { 30.325, 22.976, -21.587 }, { 0.584, 0.375}},
{ "B5", { 72.532, -23.709, 57.255 }, { 0.751, 0.375}},
{ "B6", { 71.941, 19.363, 67.857 }, { 0.918, 0.375}},
{ "C1", { 28.778, 14.179, -50.297 }, { 0.087, 0.625}},
{ "C2", { 55.261, -38.342, 31.37 }, { 0.250, 0.625}},
{ "C3", { 42.101, 53.378, 28.19 }, { 0.417, 0.625}},
{ "C4", { 81.733, 04.039, 79.819 }, { 0.584, 0.625}},
{ "C5", { 51.935, 49.986, -14.574 }, { 0.751, 0.625}},
{ "C6", { 51.038, -28.631, -28.638 }, { 0.918, 0.625}},
{ "D1", { 96.539, -0.425, 1.186 }, { 0.087, 0.875}},
{ "D2", { 81.257, -0.638, -0.335 }, { 0.250, 0.875}},
{ "D3", { 66.766, -0.734, -0.504 }, { 0.417, 0.875}},
{ "D4", { 50.867, -0.153, -0.27 }, { 0.584, 0.875}},
{ "D5", { 35.656, -0.421, -1.231 }, { 0.751, 0.875}},
{ "D6", { 20.461, -0.079, -0.973 }, { 0.918, 0.875}} }

Definition at line 78 of file colorchecker.h.

◆ xrite_24_2014

dt_color_checker_t xrite_24_2014
Initial value:
= { .name = "Xrite ColorChecker 24 after 2014",
.author = "X-Rite",
.date = "3/28/2015",
.manufacturer = "X-Rite/Gretag Macbeth",
.ratio = 2.f / 3.f,
.radius = 0.055f,
.patches = 24,
.size = { 4, 6 },
.middle_grey = 21,
.white = 18,
.black = 23,
@ COLOR_CHECKER_XRITE_24_2014
dt_color_checker_patch xrite_24_2014_patches[]

Definition at line 150 of file colorchecker.h.

Referenced by dt_get_color_checker().

◆ xrite_24_2014_patches

dt_color_checker_patch xrite_24_2014_patches[]

Definition at line 118 of file colorchecker.h.