STIRA
0.1
|
transformations between color spaces More...
#include <TransformColorSpace.h>
Public Member Functions | |
TransformColorSpace () | |
constructor | |
~TransformColorSpace () | |
destructor | |
void | SetMaxColorValue (double maxColorValue) |
sets new maximum value for color component WARNING: use this class as an object instead of directly the static methods when using this method if not, the standard value 255 is going to be used no matter what | |
void | SetReferenceWhite (ColorValue referenceWhite) |
sets new reference white level WARNING: use this class as an object instead of directly the static methods when using this method if not, the standard value D65 is going to be used no matter what | |
ColorValue | GetReferenceWhite () |
sets new reference white level WARNING: use this class as an object instead of directly the static methods when using this method if not, the standard value D65 is going to be used no matter what | |
ColorValue | sRGBtoXYZ (ColorValue rgbValue) |
converts incoming sRGB color to XYZ conversion coefficients and formulae from http://www.brucelindbloom.com/ XYZ values are normalized in range 0 to 1 More... | |
ColorValue | XYZtosRGB (ColorValue xyzValue) |
converts incoming XYZ color to sRGB conversion coefficients and formulae from http://www.brucelindbloom.com/ XYZ values are normalized in range 0 to 1 More... | |
ColorValue | AdobeRGBtoXYZ (ColorValue rgbValue) |
converts incoming AdobeRGB color to XYZ conversion coefficients and formulae from http://www.brucelindbloom.com/ XYZ values are normalized in range 0 to 1 More... | |
ColorValue | XYZtoAdobeRGB (ColorValue xyzValue) |
converts incoming XYZ color to AdobeRGB conversion coefficients and formulae from http://www.brucelindbloom.com/ More... | |
ColorValue | sRGBtoLuv (ColorValue rgbValue) |
converts incoming sRGB color to Luv conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | LuvtosRGB (ColorValue luvValue) |
converts incoming Luv color to sRGB conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | XYZtoLuv (ColorValue xyzValue) |
converts incoming XYZ color to Luv conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | LuvtoXYZ (ColorValue luvValue) |
converts incoming Luv color to XYZ XYZ values are normalized in range 0 to 1 conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | sRGBtoLab (ColorValue rgbValue) |
converts incoming sRGB color to Lab conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | LabtosRGB (ColorValue luvValue) |
converts incoming Lab color to sRGB conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | AdobeRGBtoLab (ColorValue rgbValue) |
converts incoming Adobe RGB color to Lab conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | LabtoAdobeRGB (ColorValue luvValue) |
converts incoming Lab color to Adobe RGB conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | XYZtoLab (ColorValue xyzValue) |
converts incoming XYZ color to Lab conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | LabtoXYZ (ColorValue labValue) |
converts incoming Lab color to XYZ XYZ values are normalized in range 0 to 1 conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white More... | |
ColorValue | RGBtoCMY (ColorValue rgbValue) |
converts incoming RGB color to CMY Beware, since RGB and CMYK spaces are both device-dependent spaces, there is no simple or general conversion formula that converts between them. This indicative implementation is based on the simplest textbook formulae C=1-R; M=1-R and Y=1-B... More... | |
ColorValue | CMYtoRGB (ColorValue cmyValue) |
converts incoming CMY color to RGB Beware, since RGB and CMYK spaces are both device-dependent spaces, there is no simple or general conversion formula that converts between them. This indicative implementation is based on the simplest textbook formulae... More... | |
ColorValue | RGBtoHSV (ColorValue rgbValue) |
converts incoming RGB color to HSV HSV = Hue, Saturation and Value, according to Travis. H is between 0 and 360 degrees; S and V are between 0 and 1 More... | |
ColorValue | HSVtoRGB (ColorValue hsvValue) |
converts incoming HSV color to RGB More... | |
ColorValue | RGBtoHSI (ColorValue rgbValue) |
converts incoming RGB color to HSI HSI = Hue, Saturation and Intensity, according to definition by Gonzalez and Woods. More... | |
ColorValue | HSItoRGB (ColorValue hsiValue) |
converts incoming HSI color to RGB More... | |
ColorValue | RGBtoHSL (ColorValue rgbValue) |
converts incoming RGB color to HSL http://www.rapidtables.com/convert/color/rgb-to-hsl.htm HSL = Hue, Saturation and Lightness H=[0..360] S=[0..1] L=[0..1] More... | |
ColorValue | HSLtoRGB (ColorValue hslValue) |
converts incoming HSL color to RGB More... | |
ColorValue | LabtoLCH (ColorValue labValue) |
converts incoming Lab color to LCH More... | |
ColorValue | LCHtoLab (ColorValue lchValue) |
converts incoming LCH color to Lab More... | |
ColorValue | SpectralValuesToXYZ (double *pSpectralValuesArray, int wavelengthMin, int wavelengthMax) |
Converts from spectral data to XYZ, default with reference illuminant D50 Calculation of tristimulus values from spectral data at 10nm intervals according to the "CIE Method" See: http://www.digitalcolour.org/understanding/Tristimulus.htms. More... | |
ColorValue | SpectralValuesToLab (double *pSpectralValuesArray, int wavelengthMin, int wavelengthMax) |
Converts from spectral data to Lab, default with reference illuminant D50 Calculation of tristimulus values from spectral data at 10nm intervals according to the "CIE Method" See: http://www.digitalcolour.org/understanding/Tristimulus.htms. More... | |
double | DeltaE1976 (ColorValue lab1, ColorValue lab2) |
computes difference between two colours in Lab space according to 1976 formulation http://en.wikipedia.org/wiki/Color_difference More... | |
double | DeltaE1994 (ColorValue lab1, ColorValue lab2) |
computes difference between two colours in Lab space according to 1994 formulation http://en.wikipedia.org/wiki/Color_difference More... | |
double | DeltaE2000 (ColorValue lab1, ColorValue lab2) |
computes difference between two colours in Lab space according to 2000 formulation http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CIE2000.html More... | |
double | DeltaE2000 (double *pSpectralValues1, double *pSpectralValues2, int wavelengthMin, int wavelengthMax) |
computes difference between two colours expressed as arrays of spectral values to delta E 2000 formulation http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CIE2000.html More... | |
Static Public Member Functions | |
static ColorValue | RGBtoYUV (ColorValue rgbValue) |
converts incoming RGB color to YUV In fact European R'G'B' to Y'U'V' for non-linear signals. The YUV standard (also called CCIR 601), known before as YCrCb (Y Cr Cb), is a colour representation model dedicated to analogue video. Equation (73) in http://www.poynton.com/PDFs/coloureq.pdf or formula on http://en.wikipedia.org/wiki/YUV More... | |
static ColorValue | YUVtoRGB (ColorValue yuvValue) |
converts incoming YUV color to RGB In fact European Y'U'V' to R'G'B' for non-linear signals. The YUV standard (also called CCIR 601), known before as YCrCb (Y Cr Cb), is a colour representation model dedicated to analogue video. Equation (74) in http://www.poynton.com/PDFs/coloureq.pdf or formula on http://en.wikipedia.org/wiki/YUV More... | |
static double | RGBToGray (ColorValue rgbValue) |
Computes for an RGB triplet the corresponding gray value. More... | |
static ColorValue | RGBToSepia (ColorValue rgbValue) |
converts an RGB color into its corresponding sepia color Sepia tone refers to the coloring of grayscale images to simulate the faded brownish color of some early photographs: http://blogs.techrepublic.com.com/howdoi/?p=120 warning: do not use NORMAL_OUT when writing result to disk, because this will make the image appear gray instead of sepia since its scales all channels independently More... | |
static ColorValue | RGBToSepia2 (ColorValue rgbValue) |
converts an RGB color into its corresponding sepia color (alternative method) www.wvutech.edu/mclark/CSCI121-2006/Lectures/ConditionalStatements.pdf More... | |
static ColorValue | RGBToSepia2 (double grayValue) |
converts a gray value into its corresponding sepia color (same as above, but with grayscale input) www.wvutech.edu/mclark/CSCI121-2006/Lectures/ConditionalStatements.pdf More... | |
transformations between color spaces
If used with standard settings (reference white point D65; RGB in range 0-255), the static member functions can be used without object. If however different settings are required, you MUST first create a Color object and set the appropriate variables.
References: http://www.poynton.com/PDFs/coloureq.pdf HSI: Digital Image Processing Using MATLAB (DIPUM) by Gonzalez, Woods, and Eddins http://www.imageprocessingplace.com/ HSV: http://nl.wikipedia.org/wiki/HSV_(kleurruimte) XYZ: http://www.brucelindbloom.com/ Delta E and reference white points: http://www.digitalcolour.org/toolbox.htm Illuminants: Danny Pascale. "A Review of RGB color spaces". Babel Color. "http://www.babelcolor.com/download/A review of RGB color spaces.pdf".
ColorValue stira::imagedata::TransformColorSpace::AdobeRGBtoLab | ( | ColorValue | rgbValue | ) |
converts incoming Adobe RGB color to Lab conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
rgbValue | incoming RGB color |
ColorValue stira::imagedata::TransformColorSpace::AdobeRGBtoXYZ | ( | ColorValue | rgbValue | ) |
converts incoming AdobeRGB color to XYZ conversion coefficients and formulae from http://www.brucelindbloom.com/ XYZ values are normalized in range 0 to 1
rgbValue | incoming RGB color |
References stira::imagedata::ColorValue::c, stira::common::MathUtils::ClipValue(), and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::AdobeRGBToXYZ().
ColorValue stira::imagedata::TransformColorSpace::CMYtoRGB | ( | ColorValue | cmyValue | ) |
converts incoming CMY color to RGB Beware, since RGB and CMYK spaces are both device-dependent spaces, there is no simple or general conversion formula that converts between them. This indicative implementation is based on the simplest textbook formulae...
cmyValue | incoming CMY color |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::CMYToRGB().
double stira::imagedata::TransformColorSpace::DeltaE1976 | ( | ColorValue | lab1, |
ColorValue | lab2 | ||
) |
computes difference between two colours in Lab space according to 1976 formulation http://en.wikipedia.org/wiki/Color_difference
lab1 | first colour |
lab2 | second colour |
References stira::imagedata::ColorValue::c.
double stira::imagedata::TransformColorSpace::DeltaE1994 | ( | ColorValue | lab1, |
ColorValue | lab2 | ||
) |
computes difference between two colours in Lab space according to 1994 formulation http://en.wikipedia.org/wiki/Color_difference
lab1 | first colour |
lab2 | second colour |
References stira::imagedata::ColorValue::c.
double stira::imagedata::TransformColorSpace::DeltaE2000 | ( | ColorValue | lab1, |
ColorValue | lab2 | ||
) |
computes difference between two colours in Lab space according to 2000 formulation http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CIE2000.html
lab1 | first colour |
lab2 | second colour |
References stira::imagedata::ColorValue::c.
Referenced by stira::imagedata::ProfileCorrect::FindClosestGridPoint(), and stira::imagedata::ProfileCorrect::FindNearestNeighbors().
double stira::imagedata::TransformColorSpace::DeltaE2000 | ( | double * | pSpectralValues1, |
double * | pSpectralValues2, | ||
int | wavelengthMin, | ||
int | wavelengthMax | ||
) |
computes difference between two colours expressed as arrays of spectral values to delta E 2000 formulation http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CIE2000.html
pSpectralValues1 | spectral data for first colour (step size 10nm). |
pSpectralValues2 | spectral data for second colour (step size 10nm). |
wavelengthMin | lowest wavelength (min. 380nm). |
wavelengthMax | highest wavelength (max. 770nm). |
ColorValue stira::imagedata::TransformColorSpace::HSItoRGB | ( | ColorValue | hsiValue | ) |
converts incoming HSI color to RGB
hsiValue | incoming HSI color |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::HSIToRGB().
ColorValue stira::imagedata::TransformColorSpace::HSLtoRGB | ( | ColorValue | hslValue | ) |
converts incoming HSL color to RGB
hslValue | incoming HSL color |
References stira::imagedata::ColorValue::c.
Referenced by stira::imagedata::Image::HSLToRGB().
ColorValue stira::imagedata::TransformColorSpace::HSVtoRGB | ( | ColorValue | hsvValue | ) |
converts incoming HSV color to RGB
hsvValue | incoming HSV color |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::ApplyPoissonNoise(), stira::imagetools::FractalGenerator::GetMathWidth(), and stira::imagedata::Image::HSVToRGB().
ColorValue stira::imagedata::TransformColorSpace::LabtoAdobeRGB | ( | ColorValue | luvValue | ) |
converts incoming Lab color to Adobe RGB conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
labValue | incoming Lab color |
ColorValue stira::imagedata::TransformColorSpace::LabtoLCH | ( | ColorValue | labValue | ) |
converts incoming Lab color to LCH
labValue | incoming Lab color |
References stira::common::MathUtils::ApplyModulo(), stira::imagedata::ColorValue::c, and stira::common::MathUtils::ToDegrees().
ColorValue stira::imagedata::TransformColorSpace::LabtosRGB | ( | ColorValue | luvValue | ) |
converts incoming Lab color to sRGB conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
labValue | incoming Lab color |
Referenced by stira::imagetools::GretagMacbethColorChecker::Generate(), and stira::imagedata::Image::LabTosRGB().
ColorValue stira::imagedata::TransformColorSpace::LabtoXYZ | ( | ColorValue | labValue | ) |
converts incoming Lab color to XYZ XYZ values are normalized in range 0 to 1 conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
labValue | incoming Lab color |
References stira::imagedata::ColorValue::c, stira::imagedata::ColorConstants::sEpsilon, stira::imagedata::ColorConstants::sKappa, and stira::imagedata::ColorValue::type.
Referenced by stira::imagetools::ChromaticAdaptation::AdaptLabColor().
ColorValue stira::imagedata::TransformColorSpace::LCHtoLab | ( | ColorValue | lchValue | ) |
converts incoming LCH color to Lab
labValue | incoming LCH color |
References stira::imagedata::ColorValue::c, and stira::common::MathUtils::ToRadians().
ColorValue stira::imagedata::TransformColorSpace::LuvtosRGB | ( | ColorValue | luvValue | ) |
converts incoming Luv color to sRGB conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
luvValue | incoming Luv color |
Referenced by stira::imagedata::Image::LuvTosRGB().
ColorValue stira::imagedata::TransformColorSpace::LuvtoXYZ | ( | ColorValue | luvValue | ) |
converts incoming Luv color to XYZ XYZ values are normalized in range 0 to 1 conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
luvValue | incoming Luv color |
References stira::imagedata::ColorValue::c, stira::imagedata::ColorConstants::sEpsilon, stira::imagedata::ColorConstants::sKappa, and stira::imagedata::ColorValue::type.
ColorValue stira::imagedata::TransformColorSpace::RGBtoCMY | ( | ColorValue | rgbValue | ) |
converts incoming RGB color to CMY Beware, since RGB and CMYK spaces are both device-dependent spaces, there is no simple or general conversion formula that converts between them. This indicative implementation is based on the simplest textbook formulae C=1-R; M=1-R and Y=1-B...
rgbValue | incoming RGB color |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::RGBToCMY().
|
static |
Computes for an RGB triplet the corresponding gray value.
rgbValue | the input RGB triplet |
References stira::imagedata::ColorValue::c.
Referenced by stira::imagetools::ImageTools::ConvertToGrayImage().
ColorValue stira::imagedata::TransformColorSpace::RGBtoHSI | ( | ColorValue | rgbValue | ) |
converts incoming RGB color to HSI HSI = Hue, Saturation and Intensity, according to definition by Gonzalez and Woods.
rgbValue | incoming RGB color |
References stira::imagedata::ColorValue::c, stira::imagedata::ColorValue::GetMin(), and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::RGBToHSI().
ColorValue stira::imagedata::TransformColorSpace::RGBtoHSL | ( | ColorValue | rgbValue | ) |
converts incoming RGB color to HSL http://www.rapidtables.com/convert/color/rgb-to-hsl.htm HSL = Hue, Saturation and Lightness H=[0..360] S=[0..1] L=[0..1]
rgbValue | incoming RGB color |
References stira::imagedata::ColorValue::c, stira::imagedata::ColorValue::GetMax(), stira::imagedata::ColorValue::GetMin(), and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::RGBToHSL().
ColorValue stira::imagedata::TransformColorSpace::RGBtoHSV | ( | ColorValue | rgbValue | ) |
converts incoming RGB color to HSV HSV = Hue, Saturation and Value, according to Travis. H is between 0 and 360 degrees; S and V are between 0 and 1
rgbValue | incoming YUV color |
References stira::imagedata::ColorValue::c, stira::imagedata::ColorValue::GetMax(), stira::imagedata::ColorValue::GetMin(), and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::ApplyPoissonNoise(), and stira::imagedata::Image::RGBToHSV().
|
static |
converts an RGB color into its corresponding sepia color Sepia tone refers to the coloring of grayscale images to simulate the faded brownish color of some early photographs: http://blogs.techrepublic.com.com/howdoi/?p=120 warning: do not use NORMAL_OUT when writing result to disk, because this will make the image appear gray instead of sepia since its scales all channels independently
rgbValue | the input RGB triplet |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
|
static |
converts an RGB color into its corresponding sepia color (alternative method) www.wvutech.edu/mclark/CSCI121-2006/Lectures/ConditionalStatements.pdf
rgbValue | the input RGB triplet |
Referenced by stira::imagetools::ImageTools::ConvertToSepiaImage().
|
static |
converts a gray value into its corresponding sepia color (same as above, but with grayscale input) www.wvutech.edu/mclark/CSCI121-2006/Lectures/ConditionalStatements.pdf
grayValue | the input gray value |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
|
static |
converts incoming RGB color to YUV In fact European R'G'B' to Y'U'V' for non-linear signals. The YUV standard (also called CCIR 601), known before as YCrCb (Y Cr Cb), is a colour representation model dedicated to analogue video. Equation (73) in http://www.poynton.com/PDFs/coloureq.pdf or formula on http://en.wikipedia.org/wiki/YUV
rgbValue | incoming RGB color |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::RGBToYUV().
ColorValue stira::imagedata::TransformColorSpace::SpectralValuesToLab | ( | double * | pSpectralValuesArray, |
int | wavelengthMin, | ||
int | wavelengthMax | ||
) |
Converts from spectral data to Lab, default with reference illuminant D50 Calculation of tristimulus values from spectral data at 10nm intervals according to the "CIE Method" See: http://www.digitalcolour.org/understanding/Tristimulus.htms.
The reason for the choice of D50 is that we also need the spectral reflectances of the illuminant.
pSpectralValuesArray | spectral data (step size 10nm). |
wavelengthMin | lowest wavelength (min. 380nm). |
wavelengthMax | highest wavelength (max. 770nm). |
ColorValue stira::imagedata::TransformColorSpace::SpectralValuesToXYZ | ( | double * | pSpectralValuesArray, |
int | wavelengthMin, | ||
int | wavelengthMax | ||
) |
Converts from spectral data to XYZ, default with reference illuminant D50 Calculation of tristimulus values from spectral data at 10nm intervals according to the "CIE Method" See: http://www.digitalcolour.org/understanding/Tristimulus.htms.
The reason for the choice of D50 is that we also need the spectral reflectances of the illuminant.
pSpectralValuesArray | spectral data (step size 10nm). |
wavelengthMin | lowest wavelength (min. 380nm). |
wavelengthMax | highest wavelength (max. 770nm). |
References stira::imagedata::ColorValue::c, stira::imagedata::ColorConstants::sD50IlluminantSpectrum, stira::imagedata::ColorConstants::sMatchingFunctionCIEx, stira::imagedata::ColorConstants::sMatchingFunctionCIEy, stira::imagedata::ColorConstants::sMatchingFunctionCIEz, stira::imagedata::ColorConstants::sMaximumWavelength, stira::imagedata::ColorConstants::sMinimumWavelength, stira::imagedata::ColorConstants::sSpectralNormalizationConstantD50, and stira::imagedata::ColorConstants::sWavelengthStepSize.
ColorValue stira::imagedata::TransformColorSpace::sRGBtoLab | ( | ColorValue | rgbValue | ) |
converts incoming sRGB color to Lab conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
rgbValue | incoming RGB color |
Referenced by stira::imagedata::Image::sRGBToLab().
ColorValue stira::imagedata::TransformColorSpace::sRGBtoLuv | ( | ColorValue | rgbValue | ) |
converts incoming sRGB color to Luv conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
rgbValue | incoming RGB color |
Referenced by stira::imagedata::Image::sRGBToLuv().
ColorValue stira::imagedata::TransformColorSpace::sRGBtoXYZ | ( | ColorValue | rgbValue | ) |
converts incoming sRGB color to XYZ conversion coefficients and formulae from http://www.brucelindbloom.com/ XYZ values are normalized in range 0 to 1
rgbValue | incoming RGB color |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by stira::imagetools::ChromaticAdaptation::AdaptsRGBColor(), and stira::imagedata::Image::sRGBToXYZ().
ColorValue stira::imagedata::TransformColorSpace::XYZtoAdobeRGB | ( | ColorValue | xyzValue | ) |
converts incoming XYZ color to AdobeRGB conversion coefficients and formulae from http://www.brucelindbloom.com/
xyzValue | incoming XYZ color in range 0 to 1 |
References stira::imagedata::ColorValue::c, stira::common::MathUtils::ClipValue(), and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::XYZToAdobeRGB().
ColorValue stira::imagedata::TransformColorSpace::XYZtoLab | ( | ColorValue | xyzValue | ) |
converts incoming XYZ color to Lab conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
xyzValue | incoming XYZ color in range 0 to 1 |
References stira::imagedata::ColorValue::c, stira::imagedata::ColorConstants::sEpsilon, stira::imagedata::ColorConstants::sKappa, and stira::imagedata::ColorValue::type.
Referenced by stira::imagetools::ChromaticAdaptation::AdaptLabColor().
ColorValue stira::imagedata::TransformColorSpace::XYZtoLuv | ( | ColorValue | xyzValue | ) |
converts incoming XYZ color to Luv conversion coefficients and formulae from http://www.brucelindbloom.com/ WARNING: default, we use D65 as reference white; use TransformColorSpace as an object instead of directly calling this static method to be able to set a different reference white
xyzValue | incoming XYZ color in range 0 to 1 |
References stira::imagedata::ColorValue::c, stira::imagedata::ColorConstants::sEpsilon, stira::imagedata::ColorConstants::sKappa, and stira::imagedata::ColorValue::type.
ColorValue stira::imagedata::TransformColorSpace::XYZtosRGB | ( | ColorValue | xyzValue | ) |
converts incoming XYZ color to sRGB conversion coefficients and formulae from http://www.brucelindbloom.com/ XYZ values are normalized in range 0 to 1
xyzValue | incoming XYZ color |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by stira::imagetools::ChromaticAdaptation::AdaptsRGBColor(), and stira::imagedata::Image::XYZTosRGB().
|
static |
converts incoming YUV color to RGB In fact European Y'U'V' to R'G'B' for non-linear signals. The YUV standard (also called CCIR 601), known before as YCrCb (Y Cr Cb), is a colour representation model dedicated to analogue video. Equation (74) in http://www.poynton.com/PDFs/coloureq.pdf or formula on http://en.wikipedia.org/wiki/YUV
yuvValue | incoming YUV color |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by stira::imagedata::Image::YUVToRGB().