![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for color_vocabulary.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | gaussian_stats_t |
| struct | range_t |
| struct | ethnicity_t |
| struct | skin_color_t |
Macros | |
| #define | SKINS 16 |
Typedefs | |
| typedef struct gaussian_stats_t | gaussian_stats_t |
| typedef struct range_t | range_t |
| typedef enum ethnicities_t | ethnicities_t |
| typedef struct ethnicity_t | ethnicity_t |
| typedef struct skin_color_t | skin_color_t |
Enumerations | |
| enum | ethnicities_t { ETHNIE_CHINESE = 0 , ETHNIE_THAI = 1 , ETHNIE_KURDISH = 2 , ETHNIE_CAUCASIAN = 3 , ETHNIE_AFRICAN_AM = 4 , ETHNIE_MEXICAN = 5 , ETHNIE_END = 6 } |
Functions | |
| char * | Lch_to_color_name (dt_aligned_pixel_t color) |
Name the colour at color in plain language, e.g. "salmon" or "olive drab". | |
| void | get_skin_tones_range () |
| #define SKINS 16 |
Definition at line 77 of file color_vocabulary.h.
| typedef enum ethnicities_t ethnicities_t |
| typedef struct ethnicity_t ethnicity_t |
| typedef struct gaussian_stats_t gaussian_stats_t |
| typedef struct skin_color_t skin_color_t |
| enum ethnicities_t |
| Enumerator | |
|---|---|
| ETHNIE_CHINESE | |
| ETHNIE_THAI | |
| ETHNIE_KURDISH | |
| ETHNIE_CAUCASIAN | |
| ETHNIE_AFRICAN_AM | |
| ETHNIE_MEXICAN | |
| ETHNIE_END | |
Definition at line 46 of file color_vocabulary.h.
| void get_skin_tones_range | ( | ) |
Definition at line 273 of file color_vocabulary.c.
References _compute_range(), skin_color_t::a, skin_color_t::b, range_t::bottom, dt_Lab_to_XYZ(), dt_XYZ_to_xyY(), get_skin_color(), i, k, skin_color_t::L, L, Lab, Lch, M_PI_F, SKINS, range_t::top, xyY, and XYZ.
| char * Lch_to_color_name | ( | dt_aligned_pixel_t | color | ) |
Name the colour at color in plain language, e.g. "salmon" or "olive drab".
Classifies by hue and lightness against a 15 x 5 grid of names, after two special cases: a chroma below 2.0 is "gray", and a colour falling inside the measured spread of any reference skin tone is named as such instead ("average Thai skin tone"), listing every ethnicity whose range it matches, one per line.
| color | CIE Lab 1976 turned into polar coordinates (Lch), as produced by dt_Lab_2_LCH(): L in percent, chroma, and hue NORMALIZED to [0, 1] – not degrees. Passing degrees puts every lookup out of the table's domain. |
const char * that told the caller neither. The one call site leaked whenever a skin tone matched. Allocating on every path is what makes the contract statable. Definition at line 224 of file color_vocabulary.c.
References _compute_range(), _get_ethnicity_name(), _lch_color_names, skin_color_t::a, skin_color_t::b, color, dt_util_dstrcat(), skin_color_t::ethnicity, ETHNIE_END, FALSE, get_skin_color(), IS_NULL_PTR, skin_color_t::L, L, Lab, LCH_HUE_SECTORS, LCH_LIGHTNESS_SECTORS, out, SKINS, and TRUE.
Referenced by _sample_tooltip_callback().