GainMaskGenerator Class#

Definition#

Namespace: P1.ImageSdk

Represents a generator for gain masks based on a reference image. More…

public class GainMaskGenerator

Remarks#

Represents a generator for gain masks based on a reference image.

The resulting gain mask can be used to correct uneven lighting and remove dust artifacts from other images captured with the same camera under similar conditions.

Constructors#

GainMaskGenerator()

Initializes a new instance of the GainMaskGenerator class with default settings.

Methods#

SetMaskingType(MaskingType type)

Sets which image channels to use for gain mask generation.

GetMaskingType()

Gets the current masking type used for gain mask generation.

SetScaleFactor(float scale)

Sets the scale factor used to resize the reference image during gain mask generation.

GetScaleFactor()

Gets the current scale factor used for resizing the reference image during gain mask generation.

SetEnableDustFix(bool enable)

Enables or disables the dust correction feature during gain mask generation.

GetEnableDustFix()

Gets whether the dust correction feature is currently enabled.

ComputeGainMask(RawImage image, string gainMaskPath)

Generates a gain mask based on the provided reference image and saves it to the specified file path.