Zephyr Scientific Library (zscilib)
|
Go to the documentation of this file.
21 #ifndef ZEPHYR_INCLUDE_ZSL_COLORIMETRY_H_
22 #define ZEPHYR_INCLUDE_ZSL_COLORIMETRY_H_
@ ZSL_CLR_RGB_CCM_SRGB_D65
zsl_clr_rgb_ccm
List of included 3x3 XYZ to RGB color space correlation matrices.
int zsl_clr_conv_uv60_cct(enum zsl_clr_uv_cct_method method, struct zsl_clr_uv60 *uv, struct zsl_clr_cct *cct)
Converts a CIE 1960 (u, v) pair to a CIE 1960 CCT and Duv pair using the specified conversion algorit...
struct zsl_clr_spd::@2 comps[]
int zsl_clr_lef_lerp(enum zsl_clr_lef lef, unsigned int nm, zsl_real_t *val)
Interpolates a single value from the specified CIE luminous efficiency function using linear interpol...
zsl_clr_obs
List of supported CIE standard observer models. All models cover the 360 nm to 830 nm range in 5 nm s...
int zsl_clr_conv_ct_uv60(zsl_real_t ct, enum zsl_clr_obs obs, struct zsl_clr_uv60 *uv)
int zsl_clr_conv_xyz_rgbf(struct zsl_clr_xyz *xyz, struct zsl_mtx *mtx, struct zsl_clr_rgbf *rgb)
Converts a CIE 1931 XYZ tristimulus to an floating point RGBA value using the supplied XYZ to RGB col...
int zsl_clr_norm_spd(struct zsl_clr_spd *spd)
Normalises the supplied spectral power distribution data to a 1.0 range. This function call is destru...
void zsl_clr_lef_get(enum zsl_clr_lef lef, const struct zsl_clr_spd **data)
Retrieves a pointer to the zsl_clr_spd data for the specified CIE luminous efficiency function.
int zsl_clr_conv_ct_rgb8(zsl_real_t ct, enum zsl_clr_obs obs, struct zsl_mtx *mtx, struct zsl_clr_rgb8 *rgb)
Converts an exact CIE 1960 CCT (Duv = 0.0) to an 8-bit RGBA value using the supplied XYZ to RGB color...
int zsl_clr_conv_xyy_xyz(struct zsl_clr_xyy *xyy, struct zsl_clr_xyz *xyz)
Converts a CIE 1931 xyY chromaticity to its XYZ tristimulus equivalent.
int zsl_clr_conv_cct_xyz(struct zsl_clr_cct *cct, enum zsl_clr_obs obs, struct zsl_clr_xyz *xyz)
Converts a CIE 1960 CCT and Duv pair to a CIE 1931 XYZ tristimulus.
RGBA color using 16-bit values.
Represents a m x n matrix, with data stored in row-major order.
Data representing a single CIE 1960 CCT, Duv value pair.
int zsl_clr_illum_get(enum zsl_clr_obs obs, enum zsl_clr_illum illum, const struct zsl_clr_illum_data **data)
Retrieves a pointer to the zsl_clr_illum_data for the specified illuminant.
int zsl_clr_conv_xyy_uv60(struct zsl_clr_xyy *xyy, struct zsl_clr_uv60 *uv)
Converts a CIE 1931 xyY chromaticity to its CIE 1960 uv equivalent.
enum zsl_clr_obs observer
@ ZSL_CLR_UV_CCT_METHOD_OHNO2011
Yoshi Ohno 2011 CORM.
RGBA color using floating-space notation from 0.0 .. 1.0.
@ ZSL_CLR_RGB_CCM_ADOBERGB98
int zsl_clr_conv_uv76_uv60(struct zsl_clr_uv76 *uv76, struct zsl_clr_uv60 *uv60)
Converts a CIE 1976 u'v' value to its CIE 1960 uv equivalent.
zsl_clr_uv_cct_method
The algorithm to use when converting a CIE 1960 UV value to CCT, Duv.
Spectral power distribution for a specific illumination.
CIE 1931 XYZ tristimulus values.
@ ZSL_CLR_RGB_CCM_DCI_P3_PLUS
CIE 1931 XYZ tristimulus values for a standard illuminant.
int zsl_clr_conv_uv60_xyz(struct zsl_clr_uv60 *uv, struct zsl_clr_xyz *xyz)
Converts a CIE 1960 uv value to its CIE 1931 XYZ tristimulus equivalent.
enum zsl_clr_obs observer
zsl_real_t cct
Correlated color temperature.
int zsl_clr_conv_xyz_xyy(struct zsl_clr_xyz *xyz, struct zsl_clr_xyy *xyy)
Converts CIE 1931 XYZ tristimulus values to the xyY chromaticity equivalent.
int zsl_clr_conv_spd_xyz(const struct zsl_clr_spd *spd, enum zsl_clr_obs obs, struct zsl_clr_xyz *xyz)
Converts the supplied spectral power distribution data into it's equivalent XYZ tristimulus using the...
int zsl_clr_conv_uv60_uv76(struct zsl_clr_uv60 *uv60, struct zsl_clr_uv76 *uv76)
Converts a CIE 1960 uv value to its CIE 1976 u'v' equivalent.
@ ZSL_CLR_RGB_CCM_CIE_RGB
enum zsl_clr_illum illuminant
int zsl_clr_conv_cct_xyy(struct zsl_clr_cct *cct, enum zsl_clr_obs obs, struct zsl_clr_xyy *xyy)
Converts a CIE 1960 CCT and Duv pair to a CIE 1931 xyY chromaticity.
CIE 1976 UCS chromaticity coordinates.
enum zsl_clr_obs observer
CIE 1931 XYZ tristimulus values for a standard observer model in 5 nm steps from 360-830 nm (95 steps...
int zsl_clr_conv_xyz_uv60(struct zsl_clr_xyz *xyz, struct zsl_clr_uv60 *uv)
Converts CIE 1931 XYZ tristimulus values to its CIE 1960 uv equivalent.
struct zsl_clr_obs_data::@1 data[95]
zsl_clr_lef
List of supported CIE luminous efficiency functions. All functions cover the 380 nm to 780 nm range i...
enum zsl_clr_illum illuminant
CIE 1931 xyY chromaticity coordinates.
struct zsl_clr_illum_data::@0 data
int zsl_clr_conv_uv60_xyy(struct zsl_clr_uv60 *uv, struct zsl_clr_xyy *xyy)
Converts a CIE 1960 uv value to its CIE 1931 xyY chromaticity equivalent.
@ ZSL_CLR_RGB_CCM_SRGB_D50
@ ZSL_CLR_LEF_CIE51_SCOTOPIC
int zsl_clr_conv_xyz_rgb8(struct zsl_clr_xyz *xyz, struct zsl_mtx *mtx, struct zsl_clr_rgb8 *rgb)
Converts a CIE 1931 XYZ tristimulus to an 8-bit RGBA value using the supplied XYZ to RGB color space ...
@ ZSL_CLR_UV_CCT_METHOD_OHNO2014
Yoshi Ohno 2014.
RGBA color using 8-bit values.
void zsl_clr_obs_get(enum zsl_clr_obs obs, const struct zsl_clr_obs_data **data)
Retrieves a pointer to the zsl_clr_obs_data for the specified CIE standard observer model.
@ ZSL_CLR_RGB_CCM_ACES_P0
zsl_real_t duv
Distance of the measured chromaticity from the Planckian locus (AKA black body curve).
void zsl_clr_rgbccm_get(enum zsl_clr_rgb_ccm ccm, struct zsl_mtx **mtx)
Retrieves a pointer to a standard 3x3 XYZ to RGB color space correlation matrix.
int zsl_clr_conv_ct_rgbf(zsl_real_t ct, enum zsl_clr_obs obs, struct zsl_mtx *mtx, struct zsl_clr_rgbf *rgb)
Converts an exact CIE 1960 CCT (Duv = 0.0) to an floating point RGBA value using the supplied XYZ to ...
API header file for matrices in zscilib.
zsl_clr_illum
List of supported CIE standard illuminants.
enum zsl_clr_obs observer
API header file for zscilib.
int zsl_clr_conv_ct_xyz(zsl_real_t ct, enum zsl_clr_obs obs, struct zsl_clr_xyz *xyz)
Converts an exact CIE 1960 CCT (Duv = 0.0) to a CIE 1931 XYZ tristimulus.
@ ZSL_CLR_LEF_CIE88_PHOTOPIC
enum zsl_clr_obs observer
enum zsl_clr_illum illuminant
@ ZSL_CLR_RGB_CCM_BT_2020
@ ZSL_CLR_RGB_CCM_PAL_SECAM
enum zsl_clr_illum illuminant
enum zsl_clr_obs observer
CIE 1960 UCS chromaticity coordinates.
@ ZSL_CLR_UV_CCT_METHOD_MCCAMY
McCamy's approximation.
enum zsl_clr_illum illuminant
@ ZSL_CLR_RGB_CCM_ACES_P1
@ ZSL_CLR_RGB_CCM_SONY_SGAMUT3_CINE