RawImage.PickWhiteBalanceGain Method
Definition
Namespace: P1.ImageSdk
Generates a White Balance Gain value from a Point defined on the View
public P1.ImageSdk.Color PickWhiteBalanceGain(ConvertConfig config, Point2D point, int radius);
The recommended way to use this function is to present an Image on Screen for the user to select the Point to pick the White Balance Gain from. Using a pointing device the user could select the Point on that Image View. The coordinate system for that Point should match the Image View’s coordinate system, assuming the origin is the top left corner of that image. To be able to map that Point on the image data, the input ConvertConfig must have the exact same geometry defined (including Crop and Scaling). You can reuse the same ConvertConfig used for the Image as it is not going to be modified. Average RGB gain is calculated from the area defined by sampleSize and used to calculate a white balance.
Parameters:
config |
A ConvertConfig object containing the Geometry transformation the view was based upon. |
point |
The X,Y coordinates of the center of the sampled area based on the View Coordinate System |
radius |
A value between 1 and 10 that determines the size of the area to average. 1 is a single pixel area, 10 is 10x10 (100) pixels with x,y in the center |
Returns:
The white balance calculated based on the input. Note the alpha value of the Color is undefined