pub trait LearningBasedWBConst: WhiteBalancerConst {
    fn as_raw_LearningBasedWB(&self) -> *const c_void;

    fn get_range_max_val(&self) -> Result<i32> { ... }
    fn get_saturation_threshold(&self) -> Result<f32> { ... }
    fn get_hist_bin_num(&self) -> Result<i32> { ... }
}
Expand description

More sophisticated learning-based automatic white balance algorithm.

As @ref GrayworldWB, this algorithm works by applying different gains to the input image channels, but their computation is a bit more involved compared to the simple gray-world assumption. More details about the algorithm can be found in Cheng2015 .

To mask out saturated pixels this function uses only pixels that satisfy the following condition:

block formula

Currently supports images of type @ref CV_8UC3 and @ref CV_16UC3.

Required Methods

Provided Methods

Maximum possible value of the input image (e.g. 255 for 8 bit images, 4095 for 12 bit images)

See also

setRangeMaxVal

Threshold that is used to determine saturated pixels, i.e. pixels where at least one of the channels exceeds inline formula are ignored.

See also

setSaturationThreshold

Defines the size of one dimension of a three-dimensional RGB histogram that is used internally by the algorithm. It often makes sense to increase the number of bins for images with higher bit depth (e.g. 256 bins for a 12 bit image).

See also

setHistBinNum

Implementors