Zephyr Scientific Library (zscilib)
|
Functions | |
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 specified standard observer model. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
int | zsl_clr_conv_ct_uv60 (zsl_real_t ct, enum zsl_clr_obs obs, struct zsl_clr_uv60 *uv) |
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. More... | |
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 space correlation matrix. More... | |
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 RGB color space correlation matrix. More... | |
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. More... | |
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. More... | |
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 algorithm. More... | |
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 correlation matrix. More... | |
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 color space correlation matrix. More... | |
Helper functions to convert between color systems and coordinates.
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.
cct | Pointer to CIE 1960 correlated color temperature and Duv. |
obs | The CIE standard observer model to use for the conversion. |
xyy | Pointer to the output CIE 1931 xyY chromaticity. |
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.
cct | Pointer to CIE 1960 correlated color temperature and Duv. |
obs | The CIE standard observer model to use for the conversion. |
xyz | Pointer to the output CIE 1931 XYZ tristimulus. |
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 space correlation matrix.
ct | The color temperature to use. |
obs | The CIE standard observer model to use for the conversion. |
mtx | Pointer to the 3x3 XYZ to RGB color space correlation matrix. |
rgb | Pointer to the output zsl_clr_rgb8 value. |
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 RGB color space correlation matrix.
ct | The color temperature to use. |
obs | The CIE standard observer model to use for the conversion. |
mtx | Pointer to the 3x3 XYZ to RGB color space correlation matrix. |
rgb | Pointer to the output zsl_clr_rgbf value. |
int zsl_clr_conv_ct_uv60 | ( | zsl_real_t | ct, |
enum zsl_clr_obs | obs, | ||
struct zsl_clr_uv60 * | uv | ||
) |
Convert the specified color temperature to a (u,v) chromaticity.
ct | The color temperature to use. |
obs | The CIE standard observer model to use for the conversion. |
uv | Pointer to the output (u,v) chromaticity. |
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.
ct | The color temperature to use. |
obs | The CIE standard observer model to use for the conversion. |
xyz | Pointer to the output CIE 1931 XYZ tristimulus. |
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 specified standard observer model.
spd | Pointer to the spectral power distribution data to use. |
obs | The CIE standard observer model to use for the conversion. |
xyz | Pointer to the placeholder for the output XYZ tristimulus. |
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 algorithm.
method | The algoorithm to use for the conversion. |
uv | Pointer to input CIE 1960 (u, v) pair. |
cct | Pointer to output zsl_clr_cct. |
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.
uv60 | Pointer to the input CIE 1960 u,v pair. |
uv76 | Pointer to the input CIE 1976 u',v' pair. |
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.
uv | Pointer to the input CIE 1960 u,v pair. |
xyy | Pointer to the output xyY triplet. |
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.
uv | Pointer to the input CIE 1960 u,v pair. |
xyz | Pointer to the output XYZ tristimulus. |
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.
uv76 | Pointer to the input CIE 1976 u',v' pair. |
uv60 | Pointer to the input CIE 1960 u,v pair. |
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.
xyy | Pointer to the input xyY triplet. |
uv | Pointer to the output CIE 1960 u,v pair. |
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.
xyy | Pointer to the input xyY triplet. |
xyz | Pointer to the output XYZ triplet. |
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 correlation matrix.
xyz | The input CIE 1931 XYZ tristimulus value to convert to RGB. |
mtx | Pointer to the 3x3 XYZ to RGB color space correlation matrix. |
rgb | Pointer to the output zsl_clr_rgb8 value. |
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 color space correlation matrix.
Depending on the value of CONFIG_ZSL_CLR_RGBF_BOUND_CAP, the output values may be outside of the 0.0..1.0 range if the resulting value is out of gamut for the specified RGB color space.
xyz | The input CIE 1931 XYZ tristimulus value to convert to RGB. |
mtx | Pointer to the 3x3 XYZ to RGB color space correlation matrix. |
rgb | Pointer to the output zsl_clr_rgbf value. |
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.
xyz | Pointer to the input zsl_clr_xyz triplet. |
uv | Pointer to the output CIE 1960 u,v pair. |
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.
xyz | Pointer to the input XYZ triplet. |
xyy | Pointer to the output xyY triplet. |