STIRA
0.1
|
A class for color adaptation Chromatic adaptation is the estimation of the representation of an object under a different light source than the one in which it was recorded. More...
#include <ChromaticAdaptation.h>
Public Member Functions | |
ChromaticAdaptation (const ColorValue sourceReferenceWhite, const ColorValue destinationReferenceWhite, ChromaticAdaptationType myType=CHROMATICADAPTATION_BRADFORD) | |
constructor More... | |
~ChromaticAdaptation () | |
destructor | |
void | ChangeSourceWhite (ColorValue sourceReferenceWhite) |
void | ChangeDestinationWhite (ColorValue destinationReferenceWhite) |
void | ChangeAdaptationType (ChromaticAdaptationType myType) |
ColorValue | AdaptXYZColor (ColorValue inValue) |
adapt color in XYZ coordinates to destination reference white More... | |
ColorValue | AdaptsRGBColor (ColorValue inValue) |
adapt color in sRGB coordinates to destination reference white More... | |
ColorValue | AdaptLabColor (ColorValue inValue) |
adapt color in L*a*b* coordinates to destination reference white L*a*b* space is expressed with D55 as reference white More... | |
bool | ChromaticAdapt (Image *pImage) |
A class for color adaptation Chromatic adaptation is the estimation of the representation of an object under a different light source than the one in which it was recorded.
References: 1) http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html 2) http://infoscience.epfl.ch/record/34049: "Chromatic adaptation performance of different RGB sensors" Süsstrunk et al, In: Proc. IS&T/SPIE Electronic Imaging 2001: Color Imaging, vol. 4300, 2001, p. 172-183
stira::imagetools::ChromaticAdaptation::ChromaticAdaptation | ( | const ColorValue | sourceReferenceWhite, |
const ColorValue | destinationReferenceWhite, | ||
ChromaticAdaptationType | myType = CHROMATICADAPTATION_BRADFORD |
||
) |
constructor
sourceReferenceWhite | source reference white in XYZ coordinates in the nominal range [0.0, 1.0]. |
destinationReferenceWhite | destination reference white in XYZ coordinates in the nominal range [0.0, 1.0]. |
myType | type of chromatic adaptation |
ColorValue stira::imagetools::ChromaticAdaptation::AdaptLabColor | ( | ColorValue | inValue | ) |
adapt color in L*a*b* coordinates to destination reference white L*a*b* space is expressed with D55 as reference white
inValue | input color in L*a*b*. |
References AdaptsRGBColor(), AdaptXYZColor(), stira::imagedata::Image::GetColor(), stira::imagedata::Image::GetHeight(), stira::imagedata::Image::GetNumberOfBands(), stira::imagedata::Image::GetWidth(), stira::imagedata::TransformColorSpace::LabtoXYZ(), stira::imagedata::ColorConstants::sD50_XYZ, stira::imagedata::Image::SetColor(), stira::imagedata::TransformColorSpace::SetReferenceWhite(), and stira::imagedata::TransformColorSpace::XYZtoLab().
ColorValue stira::imagetools::ChromaticAdaptation::AdaptsRGBColor | ( | ColorValue | inValue | ) |
adapt color in sRGB coordinates to destination reference white
inValue | input color in sRGB in the range [0.0, 255.0]. |
References AdaptXYZColor(), stira::imagedata::TransformColorSpace::SetReferenceWhite(), stira::imagedata::TransformColorSpace::sRGBtoXYZ(), and stira::imagedata::TransformColorSpace::XYZtosRGB().
Referenced by AdaptLabColor().
ColorValue stira::imagetools::ChromaticAdaptation::AdaptXYZColor | ( | ColorValue | inValue | ) |
adapt color in XYZ coordinates to destination reference white
inValue | input color in XYZ in the nominal range [0.0, 1.0]. |
References stira::imagedata::ColorValue::c, and stira::imagedata::ColorValue::type.
Referenced by AdaptLabColor(), and AdaptsRGBColor().