ICSV - Image Color Similarity Visualization
Vienna Technical University - Course 'Visualization 2'. Author: Stefan Spelitz (0925601)
ICSV.Server.Images.ColorSpaceConverter Class Reference

Converts Bitmap data from sRGB -> XYZ -> CIE Lab color space, using D65 white point. More...

Static Public Member Functions

static double[][] ConvertRgbToLab (Bitmap bitmap)
 Converts the given sRGB bitmap to a double array. Resulting in values in CIE Lab color space. More...
 
static double[] ConvertRgbToXYZ (byte r, byte g, byte b)
 Converts the given RGB values in the range of [0,255] to XYZ coordinates. More...
 
static double[] ConvertXyzToLab (double[] vector)
 Converts the XYZ coordinates of ConvertRgbToXYZ to CIE Lab color space coordinates. More...
 

Detailed Description

Converts Bitmap data from sRGB -> XYZ -> CIE Lab color space, using D65 white point.

Member Function Documentation

static double [][] ICSV.Server.Images.ColorSpaceConverter.ConvertRgbToLab ( Bitmap  bitmap)
static

Converts the given sRGB bitmap to a double array. Resulting in values in CIE Lab color space.

Parameters
bitmapThe bitmap can be 8, 24 or 32 (with alpha) bit.
Returns
An array of size bitmap.width * bitmap.height, where each entry has 3 elements (L,a,b)
static double [] ICSV.Server.Images.ColorSpaceConverter.ConvertRgbToXYZ ( byte  r,
byte  g,
byte  b 
)
static

Converts the given RGB values in the range of [0,255] to XYZ coordinates.

Parameters
rred value
ggreen value
bblue value
Returns
An array with [0] = X, [1] = Y, [2] = Z. X,Y,Z are roughly in the range of [0, 1]
static double [] ICSV.Server.Images.ColorSpaceConverter.ConvertXyzToLab ( double[]  vector)
static

Converts the XYZ coordinates of ConvertRgbToXYZ to CIE Lab color space coordinates.

Parameters
vector[0] = X, [1] = Y, [2] = Z
Returns
An array with [0] = L, [1] = a, [2] = b. L (lightness) is in the range of [0,100]. a (green and red/magenta opposing channel) is in the range of roughly [-87, 99] b (blue and yellow opposing channel) is in the range of roughly [-108, 95]