ImageGear .NET v25.2 - Updated
CalculateCameraToRGBMatrix(IGDoubleMatrix,ImGearIlluminant,IGDoubleMatrix,ImGearIlluminant,ImGearDoublePoint) Method




ImageGear.Core Assembly > ImageGear.Processing Namespace > ImGearCameraRawProcessing Class > CalculateCameraToRGBMatrix Method : CalculateCameraToRGBMatrix(IGDoubleMatrix,ImGearIlluminant,IGDoubleMatrix,ImGearIlluminant,ImGearDoublePoint) Method
XYZ to camera colorspace conversion matrix under Illuminant 1.
Illuminant 1 value.
XYZ to camera colorspace conversion matrix under Illuminant 2.
Illuminant 2 value.
XY coordinates of camera white point.
Calculates the matrix for conversion from camera color space to linear sRGB color space.
Syntax
'Declaration
 
Public Overloads Shared Function CalculateCameraToRGBMatrix( _
   ByVal colorMatrix1 As IGDoubleMatrix, _
   ByVal illuminant1 As ImGearIlluminant, _
   ByVal colorMatrix2 As IGDoubleMatrix, _
   ByVal illuminant2 As ImGearIlluminant, _
   ByVal whitePoint As ImGearDoublePoint _
) As Double(,)
'Usage
 
Dim colorMatrix1 As IGDoubleMatrix
Dim illuminant1 As ImGearIlluminant
Dim colorMatrix2 As IGDoubleMatrix
Dim illuminant2 As ImGearIlluminant
Dim whitePoint As ImGearDoublePoint
Dim value() As Double
 
value = ImGearCameraRawProcessing.CalculateCameraToRGBMatrix(colorMatrix1, illuminant1, colorMatrix2, illuminant2, whitePoint)

Parameters

colorMatrix1
XYZ to camera colorspace conversion matrix under Illuminant 1.
illuminant1
Illuminant 1 value.
colorMatrix2
XYZ to camera colorspace conversion matrix under Illuminant 2.
illuminant2
Illuminant 2 value.
whitePoint
XY coordinates of camera white point.

Return Value

Double array.
Remarks
Calculates the matrix for conversion from camera color space to linear sRGB color space, based on two known color matrices corresponding to different light conditions, and a white point. By "linear sRGB color space" we assume a linear (Gamma = 1.0) RGB color space that uses sRGB primaries and reference white. This color space can be converted to sRGB by applying sRGB gamma correction function.

If only one color matrix is known, pass null to colorMatrix2.

Dimensions of colorMatrix1 and colorMatrix2 must be equal to (n, 3), where n is channel count of native camera color space (3 or 4). Result matrix dimensions are (3, n).

See Also

Reference

ImGearCameraRawProcessing Class
ImGearCameraRawProcessing Members
Overload List
ImGearIlluminant Enumeration
ImGearDoublePoint Structure

Is this page helpful?
Yes No
Thanks for your feedback.