C# Class StandardizedDiffuseAlbedoMaps.CameraCalibrationDatabase

This class hosts the camera calibration database
Show file Open project: Patapom/GodComplex Class Usage Examples

Public Methods

Method Description
Calibrate ( ImageUtility _xyY ) : ImageUtility.float3

Calibrates a raw luminance value

Typically, you start from a RAW XYZ value that you convert to xyY, pass the Y to this method and replace it into your orignal xyY, convert back to XYZ and voilà!

CalibrateWithSpatialCorrection ( float _U, float _V, ImageUtility _xyY ) : ImageUtility.float3

Calibrates a raw luminance value with spatial luminance correction

Typically, you start from a RAW XYZ value that you convert to xyY, pass it to this method and replace it into your orignal xyY, convert back to XYZ and voilà!

GetSpatialLuminanceCorrectionFactor ( float _U, float _V ) : float

Uses the white reference image to retrieve the luminance factor to apply based on the position in the image

IsPreparedFor ( float _ISOSpeed, float _ShutterSpeed, float _Aperture ) : bool

Tells if the database is prepared and can be used for processing colors of an image with the specified shot infos

PrepareCalibrationFor ( ImageUtility _Image ) : void

Prepares the interpolated calibration table to process the pixels in an image shot with the specified shot infos

PrepareCalibrationFor ( float _ISOSpeed, float _ShutterSpeed, float _Aperture ) : void

Prepares the interpolated calibration table to process the pixels in an image shot with the specified shot infos

Private Methods

Method Description
FindStartNode ( float _EV_ISOSpeed, float _EV_ShutterSpeed, float _EV_Aperture ) : GridNode

Finds the first grid node whose ISO, shutter speed and aperture values are immediately inferior to the ones provided

Method Details

Calibrate() public method

Calibrates a raw luminance value
Typically, you start from a RAW XYZ value that you convert to xyY, pass the Y to this method and replace it into your orignal xyY, convert back to XYZ and voilà!
public Calibrate ( ImageUtility _xyY ) : ImageUtility.float3
_xyY ImageUtility The uncalibrated value
return ImageUtility.float3

CalibrateWithSpatialCorrection() public method

Calibrates a raw luminance value with spatial luminance correction
Typically, you start from a RAW XYZ value that you convert to xyY, pass it to this method and replace it into your orignal xyY, convert back to XYZ and voilà!
public CalibrateWithSpatialCorrection ( float _U, float _V, ImageUtility _xyY ) : ImageUtility.float3
_U float The U coordinate in the image (U=X/Width)
_V float The V coordinate in the image (V=Y/Height)
_xyY ImageUtility
return ImageUtility.float3

GetSpatialLuminanceCorrectionFactor() public method

Uses the white reference image to retrieve the luminance factor to apply based on the position in the image
public GetSpatialLuminanceCorrectionFactor ( float _U, float _V ) : float
_U float The U coordinate in the image (U=X/Width)
_V float The V coordinate in the image (V=Y/Height)
return float

IsPreparedFor() public method

Tells if the database is prepared and can be used for processing colors of an image with the specified shot infos
public IsPreparedFor ( float _ISOSpeed, float _ShutterSpeed, float _Aperture ) : bool
_ISOSpeed float
_ShutterSpeed float
_Aperture float
return bool

PrepareCalibrationFor() public method

Prepares the interpolated calibration table to process the pixels in an image shot with the specified shot infos
public PrepareCalibrationFor ( ImageUtility _Image ) : void
_Image ImageUtility
return void

PrepareCalibrationFor() public method

Prepares the interpolated calibration table to process the pixels in an image shot with the specified shot infos
public PrepareCalibrationFor ( float _ISOSpeed, float _ShutterSpeed, float _Aperture ) : void
_ISOSpeed float
_ShutterSpeed float
_Aperture float
return void