CVB.Net 14.1
ColorConversion Class Reference

Color conversion of hyperspectral cubes. More...

Classes

class  Interpolator
 Spectral interpolator class containing the interpolated values of the relative spectral power distribution from color matching functions and standard illuminant. More...
 

Public Types

enum  StdObserver {
  Undefined = 0 , Cie2006_2deg = 1 , Cie2006_10deg = 2 , Cie1964_10deg = 3 ,
  Cie1931_2deg = 4
}
 Standard observer. More...
 
enum  StdIlluminant {
  Undefined = 0 , E = 1 , A = 2 , D50 = 3 ,
  D65 = 4
}
 Standard illumination. More...
 
enum  InterpolationMethod { Linear }
 Interpolation method. More...
 

Static Public Member Functions

static Image ToXYZ (this Cube cube, Interpolator interpolator)
 Converts a normalized cube to a XYZ image. More...
 
static Image ToLab (this Cube cube, Interpolator interpolator)
 Converts a normalized cube to a Lab image. More...
 
static Image XyzToLab (Image imgXYZ, Interpolator interpolator)
 Converts an XYZ image to Lab. More...
 
static Image LabToRgb8 (Image imgLab, Interpolator interpolator)
 Converts a Lab image to a sRGB 8bit image. More...
 

Detailed Description

Color conversion of hyperspectral cubes.

Member Enumeration Documentation

◆ InterpolationMethod

Interpolation method.

Enumerator
Linear 

Linear interpolation. At the border the last value is used.

◆ StdIlluminant

Standard illumination.

Enumerator
Undefined 

Undefined standard illuminant.

Equal power spectrum.

Illuminant A.

D50 

Illuminant D50.

D65 

Illuminant D65.

◆ StdObserver

Standard observer.

Enumerator
Undefined 

Undefined standard observer.

Cie2006_2deg 

2006 Observer with 2 deg.

Cie2006_10deg 

2006 Observer with 10 deg.

Cie1964_10deg 

1964 Observer with 10 deg.

Cie1931_2deg 

1931 Observer with 2 deg.

Member Function Documentation

◆ LabToRgb8()

static Image LabToRgb8 ( Image  imgLab,
Interpolator  interpolator 
)
static

Converts a Lab image to a sRGB 8bit image.

Parameters
imgLab3-planed float/double image containing Lab values.
interpolatorSpectral interpolator to be used during conversion.
Returns
3-planed uint8 image containing the values of sRGB (R-value in plane 0, G-value in plane 1, B-value in plane 2).

◆ ToLab()

static Image ToLab ( this Cube  cube,
Interpolator  interpolator 
)
static

Converts a normalized cube to a Lab image.

Parameters
cubeNormalized cube. Number of bands in the cube must match with the number of bands in the interpolator.
interpolatorSpectral interpolator to be used during conversion.
Returns
3-planed float image containing the values of Lab (L-value in plane 0, a-value in plane 1, b-value in plane 2).

◆ ToXYZ()

static Image ToXYZ ( this Cube  cube,
Interpolator  interpolator 
)
static

Converts a normalized cube to a XYZ image.

Parameters
cubeNormalized cube. Number of bands in the cube must match with the number of bands in the interpolator.
interpolatorSpectral interpolator to be used during conversion.
Returns
3-planed float image containing the values of XYZ (X-value in plane=0, Y-value in plane=1, Z-value in plane=2).

◆ XyzToLab()

static Image XyzToLab ( Image  imgXYZ,
Interpolator  interpolator 
)
static

Converts an XYZ image to Lab.

Parameters
imgXYZ3-planed float/double image containing XYZ values.
interpolatorSpectral interpolator to be used during conversion.
Returns
3-planed float image containing the values of Lab (L-value in plane 0, a-value in plane 1, b-value in plane 2).