Core Optical, Inc.
ColorimetricConverter ConvertXYZtoCIELuv Method Industrial Strength, Scientific Grade
Transforms source data in-place from CIE XYZ to CIE 1976 L*u*v* space.

Namespace: PrecisionImage.Colorimetry
Assembly: PrecisionImage (in PrecisionImage.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax

public void ConvertXYZtoCIELuv(
	SourceData dataSource,
	Illuminant whitePoint = null
)

Parameters

dataSource
Type: PrecisionImage SourceData
A SourceData object encapsulating the image data to be converted.
whitePoint (Optional)
Type: PrecisionImage.Colorimetry Illuminant
A Illuminant object specifying the reference white point. This parameter is optional and defaults to D65.
Exceptions

Remarks

This method transforms data in CIE XYZ space to CIE 1976 L*u*v* space, referenced to the whitePoint illuminant's white point. The dataSource XYZ values must be stored in channels 0, 1 and 2 respectively. L*u*v* output values are stored in-place in channels 0, 1 and 2. To guarantee an invertable result, output values are not clamped to any arbitrary range and are stored as-is. The dataSource object must contain at least 3 channels or an OnlineArgumentOutOfRangeException exception will result.
Examples

The following converts the image data from Linear RGB to CIE XYZ, and then from CIE XYZ to CIE L*u*v* space referenced to CIE D50 illuminant.
using PrecisionImage;
using PrecisionImage.Colorimetry;

// Instantiate the SourceData object. "MyBitmapSource" is an rgb image with no alpha channel: 
SourceData imageData = new SourceData(MyBitmapSource);

// Instantiate the ColorimetricConverter object: 
ColorimetricConverter colorConverter = new ColorimetricConverter();

// Image data is currently in linear RGB space. Transform to CIE XYZ in-place (imageData must have exactly 3 channels 
// or exception will result), and then from XYZ to L*u*v* (in-place) referenced to D50 illuminant:
colorConverter.ConvertLinearRGBtoXYZ(imageData);
colorConverter.ConvertXYZtoCIELuv(imageData, StandardIlluminants.D50); // D50 default. 

// Assume some processing on one or more of the L*u*v* channels:
.
.
.
// After channel processing, transform L*a*b* values back to linear RGB (in-place):
colorConverter.ConvertCIELuvToXYZ(imageData, StandardIlluminants.D50); // D50 illumination default.
colorConverter.ConvertXYZtoLinearRGB(imageData);
See Also