Ansel
0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
color_vocabulary.h
Go to the documentation of this file.
1
/*
2
This file is part of the Ansel project.
3
Copyright (C) 2022, 2024 Aurélien PIERRE.
4
Copyright (C) 2022 Martin Bařinka.
5
Copyright (C) 2022 Pascal Obry.
6
7
Ansel is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
Ansel is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with Ansel. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#include "
common/colorspaces_inline_conversions.h
"
22
23
#include <glib.h>
24
25
26
// declare a model average ± standard deviation
27
typedef
struct
gaussian_stats_t
28
{
29
float
avg
;
30
float
std
;
31
}
gaussian_stats_t
;
32
33
34
// bounds of the range
35
typedef
struct
range_t
36
{
37
float
bottom
;
38
float
top
;
39
}
range_t
;
40
41
42
// ID keys for the ethnicities database
43
typedef
enum
ethnicities_t
44
{
45
ETHNIE_CHINESE
= 0,
46
ETHNIE_THAI
= 1,
47
ETHNIE_KURDISH
= 2,
48
ETHNIE_CAUCASIAN
= 3,
49
ETHNIE_AFRICAN_AM
= 4,
50
ETHNIE_MEXICAN
= 5,
51
ETHNIE_END
= 6
52
}
ethnicities_t
;
53
54
55
// Translatable names for ethnicities
56
typedef
struct
ethnicity_t
57
{
58
char
*
name
;
59
ethnicities_t
ethnicity
;
60
}
ethnicity_t
;
61
62
63
// Database entry for skin parts color of an ethnicity
64
typedef
struct
skin_color_t
65
{
66
char
*
name
;
67
ethnicities_t
ethnicity
;
68
gaussian_stats_t
L
;
69
gaussian_stats_t
a
;
70
gaussian_stats_t
b
;
71
}
skin_color_t
;
72
73
74
#define SKINS 16
75
76
// returns a color name for color
77
const
char
*
Lch_to_color_name
(
dt_aligned_pixel_t
color);
78
79
// Parametric sweeping of Lch boundaries (in CIE Luv 1976) for all known skin tones +/- 2 std
80
void
get_skin_tones_range
();
81
82
// clang-format off
83
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
84
// vim: shiftwidth=2 expandtab tabstop=2 cindent
85
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
86
// clang-format on
get_skin_tones_range
void get_skin_tones_range()
Definition
color_vocabulary.c:367
ethnicities_t
ethnicities_t
Definition
color_vocabulary.h:44
ETHNIE_CAUCASIAN
@ ETHNIE_CAUCASIAN
Definition
color_vocabulary.h:48
ETHNIE_KURDISH
@ ETHNIE_KURDISH
Definition
color_vocabulary.h:47
ETHNIE_END
@ ETHNIE_END
Definition
color_vocabulary.h:51
ETHNIE_CHINESE
@ ETHNIE_CHINESE
Definition
color_vocabulary.h:45
ETHNIE_MEXICAN
@ ETHNIE_MEXICAN
Definition
color_vocabulary.h:50
ETHNIE_THAI
@ ETHNIE_THAI
Definition
color_vocabulary.h:46
ETHNIE_AFRICAN_AM
@ ETHNIE_AFRICAN_AM
Definition
color_vocabulary.h:49
Lch_to_color_name
const char * Lch_to_color_name(dt_aligned_pixel_t color)
Definition
color_vocabulary.c:184
colorspaces_inline_conversions.h
dt_aligned_pixel_t
float dt_aligned_pixel_t[4]
Definition
noiseprofile.c:28
ethnicity_t
Definition
color_vocabulary.h:57
ethnicity_t::name
char * name
Definition
color_vocabulary.h:58
ethnicity_t::ethnicity
ethnicities_t ethnicity
Definition
color_vocabulary.h:59
gaussian_stats_t
Definition
color_vocabulary.h:28
gaussian_stats_t::std
float std
Definition
color_vocabulary.h:30
gaussian_stats_t::avg
float avg
Definition
color_vocabulary.h:29
range_t
Definition
color_vocabulary.h:36
range_t::top
float top
Definition
color_vocabulary.h:38
range_t::bottom
float bottom
Definition
color_vocabulary.h:37
skin_color_t
Definition
color_vocabulary.h:65
skin_color_t::ethnicity
ethnicities_t ethnicity
Definition
color_vocabulary.h:67
skin_color_t::b
gaussian_stats_t b
Definition
color_vocabulary.h:70
skin_color_t::L
gaussian_stats_t L
Definition
color_vocabulary.h:68
skin_color_t::name
char * name
Definition
color_vocabulary.h:66
skin_color_t::a
gaussian_stats_t a
Definition
color_vocabulary.h:69
src
common
color_vocabulary.h
Generated by
1.9.8