Spectral Cube Color exports. More...
Enumerations | |
enum | CVSInterpolationMethod { CVSIM_linear = 0 } |
Interpolation method. More... | |
enum | CVSStdIlluminant { CVSSI_UNDEFINED = 0 , CVSSI_E = 1 , CVSSI_A = 2 , CVSSI_D50 = 3 , CVSSI_D65 = 4 } |
Standard Illumination. More... | |
enum | CVSStdObserver { CVSSO_UNDEFINED = 0 , CVSSO_CIE2006_2deg = 1 , CVSSO_CIE2006_10deg = 2 , CVSSO_CIE1964_10deg = 3 , CVSSO_CIE1931_2deg = 4 } |
Standard Observer. More... | |
Functions | |
cvbres_t | CVSConvertCubeToLab (CVCOMPOSITE ImageCube, CVSINTERPOLATOR Interpolator, IMG &ImageOut) |
Converts the Cube to a Lab image. More... | |
cvbres_t | CVSConvertCubeToXYZ (CVCOMPOSITE ImageCube, CVSINTERPOLATOR Interpolator, IMG &ImageOut) |
Converts the Cube to a XYZ image. More... | |
cvbres_t | CVSConvertLabToRGB8 (IMG ImageIn, CVSINTERPOLATOR Interpolator, IMG &ImageOut) |
Converts a Lab image to a sRGB image. More... | |
cvbres_t | CVSConvertXYZToLab (IMG ImageIn, CVSINTERPOLATOR Interpolator, IMG &ImageOut) |
Converts an image from XYZ to Lab. More... | |
cvbres_t | CVSCreateInterpolator (CVCOMPOSITE ImageCube, CVSStdObserver Observer, CVSStdIlluminant Illuminant, CVSInterpolationMethod Interpolation, CVSINTERPOLATOR &Interpolator) |
Creates an interpolator. More... | |
cvbres_t | CVSInterpolatorGetIlluminant (CVSINTERPOLATOR Interpolator, CVSStdIlluminant &Illuminant) |
Retrieves the standard illuminant in the matching handle. More... | |
cvbres_t | CVSInterpolatorGetObserver (CVSINTERPOLATOR Interpolator, CVSStdObserver &Observer) |
Retrieves the standard observer in the matching handle. More... | |
cvbres_t | CVSInterpolatorGetWavelengths (CVSINTERPOLATOR Interpolator, double WavelengthArray[], size_t &NumberOfWavelengths) |
Retrieves the wavelengths of the illuminant spectrum. More... | |
Spectral Cube Color exports.
enum CVSStdIlluminant |
enum CVSStdObserver |
cvbres_t CVSConvertCubeToLab | ( | CVCOMPOSITE | ImageCube, |
CVSINTERPOLATOR | Interpolator, | ||
IMG & | ImageOut | ||
) |
Converts the Cube to a Lab image.
Takes a normalized Image Cube and converts it to a Lab image
[in] | ImageCube | Normalized linear Cube with matching number of bands with the ones in Matching handle |
[in] | Interpolator | Handle contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. |
[in,out] | ImageOut | This 3-planed float32 image contains the values of Lab (L-value in plane=0, a-value in plane=1, b-value in plane=2). This function supports two ways as the output:
|
cvbres_t CVSConvertCubeToXYZ | ( | CVCOMPOSITE | ImageCube, |
CVSINTERPOLATOR | Interpolator, | ||
IMG & | ImageOut | ||
) |
Converts the Cube to a XYZ image.
Takes a normalized image Cube and converts it to a XYZ image
[in] | ImageCube | Normalized linear Cube of matching number of bands with the ones in Matching handle |
[in] | Interpolator | Handle contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. |
[in,out] | ImageOut | This 3-planed float32 image contains the values of XYZ (X-value in plane=0, Y-value in plane=1, Z-value in plane=2). This function supports two ways as the output:
|
Converts a Lab image to a sRGB image.
[in] | ImageIn | Lab image |
[in] | Interpolator | Whitepoint of the Standard Illuminant is used for the conversion algorithm |
[out] | ImageOut | sRGB uint8 image |
Converts an image from XYZ to Lab.
[in] | ImageIn | 3-planed image containing the XYZ-values |
[in] | Interpolator | Whitepoint of the Standard Illuminant is used for the conversion algorithm |
[in,out] | ImageOut | Takes a NULL pointer and constructs an float32 image handle containing Lab-values. Dimensions and data type and will be equal to ImageIn |
cvbres_t CVSCreateInterpolator | ( | CVCOMPOSITE | ImageCube, |
CVSStdObserver | Observer, | ||
CVSStdIlluminant | Illuminant, | ||
CVSInterpolationMethod | Interpolation, | ||
CVSINTERPOLATOR & | Interpolator | ||
) |
Creates an interpolator.
The interpolator is used to fit the wavelengths of the standard observer and the standard illuminant to the wavelengths in the Cube. As reference wavelengths the values of CVSFI_Wavelength in the cube metadata are used.
Internally the color matching functions are defined in the range:
The standard illuminant are defined in the range:
[in] | ImageCube | Metadata needs to contain wavelength info |
[in] | Observer | Standard observer used to access predefined Color Matching functions for the Lab and XYZ Conversion |
[in] | Illuminant | Standard illuminant used to access the predefined relative spectral power distribution for the Lab and XYZ Conversion |
[in] | Interpolation | Interpolation method used for the color matching function and illuminant spectrum |
[in,out] | Interpolator | Handle contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant |
cvbres_t CVSInterpolatorGetIlluminant | ( | CVSINTERPOLATOR | Interpolator, |
CVSStdIlluminant & | Illuminant | ||
) |
Retrieves the standard illuminant in the matching handle.
Getter function for the Standard Illuminant enum
[in] | Interpolator | Handle contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant |
[out] | Illuminant | Standard illuminant used to access the predefined relative spectral power distribution for the Lab and XYZ Conversion |
cvbres_t CVSInterpolatorGetObserver | ( | CVSINTERPOLATOR | Interpolator, |
CVSStdObserver & | Observer | ||
) |
Retrieves the standard observer in the matching handle.
Getter function for the Standard Observer enum
[in] | Interpolator | Handle contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant |
[out] | Observer | Standard observer used to access predefined Color Matching functions for the Lab and XYZ Conversion |
cvbres_t CVSInterpolatorGetWavelengths | ( | CVSINTERPOLATOR | Interpolator, |
double | WavelengthArray[], | ||
size_t & | NumberOfWavelengths | ||
) |
Retrieves the wavelengths of the illuminant spectrum.
Getter function for the illuminant's wavelengths
[in] | Interpolator | Handle contains the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant |
[in,out] | WavelengthArray | Wavelengths of the illuminant as double array. To get the array size set WavelengthArray to nullptr |
[in,out] | NumberOfWavelengths | Number of wavelengths in WavelengthArray. To get the array size set WavelengthArray to nullptr |