Class LearningBasedWB
- Namespace
- OpenCvSharp.XPhoto
- Assembly
- OpenCvSharp.dll
More sophisticated learning-based automatic white balance algorithm.
public class LearningBasedWB : WhiteBalancer, IDisposable
- Inheritance
-
LearningBasedWB
- Implements
- Inherited Members
Properties
HistBinNum
Defines the size of one dimension
public int HistBinNum { get; set; }
Property Value
RangeMaxVal
Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images)
public int RangeMaxVal { get; set; }
Property Value
SaturationThreshold
Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the channels exceeds
public float SaturationThreshold { get; set; }
Property Value
Methods
BalanceWhite(InputArray, OutputArray)
Applies white balancing to the input image.
public override void BalanceWhite(InputArray src, OutputArray dst)
Parameters
srcInputArrayInput image
dstOutputArrayWhite balancing result
Create(string?)
Creates an instance of LearningBasedWB
public static LearningBasedWB Create(string? model)
Parameters
modelstringPath to a .yml file with the model. If not specified, the default model is used
Returns
ExtractSimpleFeatures(InputArray, OutputArray)
Implements the feature extraction part of the algorithm.
public void ExtractSimpleFeatures(InputArray src, OutputArray dst)
Parameters
srcInputArrayInput three-channel image (BGR color space is assumed).
dstOutputArrayAn array of four (r,g) chromaticity tuples corresponding to the features listed above.